CHAMAR METODO DE WEBSERVICE EM VB6

LORDFLOYD 13/06/2012 12:01:43
#404054
Bom dia pessoal,

Preciso consumir um webservice em vb6, ja configurei o soap toolkit 3.0 com sucesso, consigo acessar o método de autentificação com usuario e senha,
mas ao passar parâmetros para outro método de inserção, não tenho conseguido. Segue o exemplo:

V_URL = [Ô]http://xxx/default.asmx?wsdl[Ô]

Set SoapClient = New MSSOAPLib30.SoapClient30

SoapClient.ClientProperty([Ô]ServerHTTPRequest[Ô]) = True
Call SoapClient.MSSoapInit(V_URL)

SoapClient.ConnectorProperty([Ô]EnableAutoProxy[Ô]) = True


[ô]Metodo de autenticação:
AuthenticateUserResult = SoapClient.AuthenticateUser([Ô]usuario[Ô], [Ô]senha[Ô])


[ô]Chamada do Metodo com problema
SoapClient.ImportVisitInstance AuthenticateUserResult, [Ô]V998;LMBQ;SUP001;31300239;;;2012-05-24 16:00:00;2012-05-24 17:00:00;ABERT;1;TESTE;0;;[Ô]

acredito que a chamada no vb6 esta errada...

Segue o método (SOAP) :
<soapenv:Envelope xmlns:soapenv=[Ô]http://schemas.xmlsoap.org/soap/envelope/[Ô] xmlns:int=[Ô]http://hostname.com/Biz/Integration[Ô]>
<soapenv:Header/>
<soapenv:Body>
<int:ImportVisitInstance>
<!--Optional:-->
<int:session>d55c0296-c0c0-4a7f-87bc-4c6baab62a10</int:session>
<!--Optional:-->
<int:itemArray>
<!--Zero or more repetitions:-->
<int:VisitInstanceType>
<!--Optional:-->
<int:cdVisitInstance>V998</int:cdVisitInstance>
<!--Optional:-->
<int:cdVisitType>LMBQ</int:cdVisitType>
<!--Optional:-->
<int:cdRegion>SUP001</int:cdRegion>
<!--Optional:-->
<int:cdStore>31300239</int:cdStore>
<!--Optional:-->
<int:cdCancellationReason></int:cdCancellationReason>
<!--Optional:-->
<int:cdCreationReason></int:cdCreationReason>
<!--Optional:-->
<int:dtPlannedStart>2012-05-24 16:00:00</int:dtPlannedStart>
<!--Optional:-->
<int:dtPlannedEnd>2012-05-24 17:00:00</int:dtPlannedEnd>
<!--Optional:-->
<int:cdStatus>ABERT</int:cdStatus>
<!--Optional:-->
<int:nrSequence>1</int:nrSequence>
<!--Optional:-->
<int:dsComments>TESTE 2</int:dsComments>
<!--Optional:-->
<int:flHighImportance>0</int:flHighImportance>
<!--Optional:-->
<int:Flexi1>?</int:Flexi1>
<!--Optional:-->
<int:Flexi2>?</int:Flexi2>
</int:VisitInstanceType>
</int:itemArray>
</int:ImportVisitInstance>
</soapenv:Body>
</soapenv:Envelope>

Ja pesquisei aqui no forum, mas nao obtive sucesso.
Obrigado
KERPLUNK 13/06/2012 12:11:49
#404056
O pacote soap, não ajuda muito para identificar o problema, mostre o WSDL do método...
LORDFLOYD 13/06/2012 14:00:22
#404069
Estou começando agora a mexer com WS.
Segue:

Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: [Ô]http://springwireless.com/Biz/Integration/ImportVisitInstance[Ô]

<?xml version=[Ô]1.0[Ô] encoding=[Ô]utf-8[Ô]?>
<soap:Envelope xmlns:xsi=[Ô]http://www.w3.org/2001/XMLSchema-instance[Ô] xmlns:xsd=[Ô]http://www.w3.org/2001/XMLSchema[Ô] xmlns:soap=[Ô]http://schemas.xmlsoap.org/soap/envelope/[Ô]>
<soap:Body>
<ImportVisitInstance xmlns=[Ô]http://springwireless.com/Biz/Integration[Ô]>
<session>string</session>
<itemArray>
<VisitInstanceType>
<cdVisitInstance>string</cdVisitInstance>
<cdVisitType>string</cdVisitType>
<cdRegion>string</cdRegion>
<cdStore>string</cdStore>
<cdCancellationReason>string</cdCancellationReason>
<cdCreationReason>string</cdCreationReason>
<dtPlannedStart>string</dtPlannedStart>
<dtPlannedEnd>string</dtPlannedEnd>
<cdStatus>string</cdStatus>
<nrSequence>string</nrSequence>
<dsComments>string</dsComments>
<flHighImportance>string</flHighImportance>
<Flexi1>string</Flexi1>
<Flexi2>string</Flexi2>
</VisitInstanceType>
<VisitInstanceType>
<cdVisitInstance>string</cdVisitInstance>
<cdVisitType>string</cdVisitType>
<cdRegion>string</cdRegion>
<cdStore>string</cdStore>
<cdCancellationReason>string</cdCancellationReason>
<cdCreationReason>string</cdCreationReason>
<dtPlannedStart>string</dtPlannedStart>
<dtPlannedEnd>string</dtPlannedEnd>
<cdStatus>string</cdStatus>
<nrSequence>string</nrSequence>
<dsComments>string</dsComments>
<flHighImportance>string</flHighImportance>
<Flexi1>string</Flexi1>
<Flexi2>string</Flexi2>
</VisitInstanceType>
</itemArray>
</ImportVisitInstance>
</soap:Body>
</soap:Envelope>



<s:element name=[Ô]ImportVisitInstance[Ô]><s:complexType><s:sequence><s:element minOccurs=[Ô]0[Ô] maxOccurs=[Ô]1[Ô] name=[Ô]session[Ô] type=[Ô]s:string[Ô]/><s:element minOccurs=[Ô]0[Ô] maxOccurs=[Ô]1[Ô] name=[Ô]itemArray[Ô] type=[Ô]tns:ArrayOfVisitInstanceType[Ô]/></s:sequence></s:complexType></s:element><s:complexType name=[Ô]ArrayOfVisitInstanceType[Ô]><s:sequence><s:element minOccurs=[Ô]0[Ô] maxOccurs=[Ô]unbounded[Ô] name=[Ô]VisitInstanceType[Ô] nillable=[Ô]true[Ô] type=[Ô]tns:VisitInstanceType[Ô]/></s:sequence></s:complexType><s:complexType name=[Ô]VisitInstanceType[Ô]><s:sequence><s:element minOccurs=[Ô]0[Ô] maxOccurs=[Ô]1[Ô] name=[Ô]cdVisitInstance[Ô] type=[Ô]s:string[Ô]/><s:element minOccurs=[Ô]0[Ô] maxOccurs=[Ô]1[Ô] name=[Ô]cdVisitType[Ô] type=[Ô]s:string[Ô]/><s:element minOccurs=[Ô]0[Ô] maxOccurs=[Ô]1[Ô] name=[Ô]cdRegion[Ô] type=[Ô]s:string[Ô]/><s:element minOccurs=[Ô]0[Ô] maxOccurs=[Ô]1[Ô] name=[Ô]cdStore[Ô] type=[Ô]s:string[Ô]/><s:element minOccurs=[Ô]0[Ô] maxOccurs=[Ô]1[Ô] name=[Ô]cdCancellationReason[Ô] type=[Ô]s:string[Ô]/><s:element minOccurs=[Ô]0[Ô] maxOccurs=[Ô]1[Ô] name=[Ô]cdCreationReason[Ô] type=[Ô]s:string[Ô]/><s:element minOccurs=[Ô]0[Ô] maxOccurs=[Ô]1[Ô] name=[Ô]dtPlannedStart[Ô] type=[Ô]s:string[Ô]/><s:element minOccurs=[Ô]0[Ô] maxOccurs=[Ô]1[Ô] name=[Ô]dtPlannedEnd[Ô] type=[Ô]s:string[Ô]/><s:element minOccurs=[Ô]0[Ô] maxOccurs=[Ô]1[Ô] name=[Ô]cdStatus[Ô] type=[Ô]s:string[Ô]/><s:element minOccurs=[Ô]0[Ô] maxOccurs=[Ô]1[Ô] name=[Ô]nrSequence[Ô] type=[Ô]s:string[Ô]/><s:element minOccurs=[Ô]0[Ô] maxOccurs=[Ô]1[Ô] name=[Ô]dsComments[Ô] type=[Ô]s:string[Ô]/><s:element minOccurs=[Ô]0[Ô] maxOccurs=[Ô]1[Ô] name=[Ô]flHighImportance[Ô] type=[Ô]s:string[Ô]/><s:element minOccurs=[Ô]0[Ô] maxOccurs=[Ô]1[Ô] name=[Ô]Flexi1[Ô] type=[Ô]s:string[Ô]/><s:element minOccurs=[Ô]0[Ô] maxOccurs=[Ô]1[Ô] name=[Ô]Flexi2[Ô] type=[Ô]s:string[Ô]/></s:sequence></s:complexType><s:element name=[Ô]ImportVisitInstanceResponse[Ô]>

LORDFLOYD 14/06/2012 09:51:28
#404117
Melhor formatado:
<s:element name=[Ô]ImportVisitInstance[Ô]>
<s:complexType>
<s:sequence>
<s:element minOccurs=[Ô]0[Ô] maxOccurs=[Ô]1[Ô] name=[Ô]session[Ô] type=[Ô]s:string[Ô] />
<s:element minOccurs=[Ô]0[Ô] maxOccurs=[Ô]1[Ô] name=[Ô]itemArray[Ô] type=[Ô]tns:ArrayOfVisitInstanceType[Ô] />
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name=[Ô]ArrayOfVisitInstanceType[Ô]>
<s:sequence>
<s:element minOccurs=[Ô]0[Ô] maxOccurs=[Ô]unbounded[Ô] name=[Ô]VisitInstanceType[Ô] nillable=[Ô]true[Ô] type=[Ô]tns:VisitInstanceType[Ô] />
</s:sequence>
</s:complexType>
<s:complexType name=[Ô]VisitInstanceType[Ô]>
<s:sequence>
<s:element minOccurs=[Ô]0[Ô] maxOccurs=[Ô]1[Ô] name=[Ô]cdVisitInstance[Ô] type=[Ô]s:string[Ô] />
<s:element minOccurs=[Ô]0[Ô] maxOccurs=[Ô]1[Ô] name=[Ô]cdVisitType[Ô] type=[Ô]s:string[Ô] />
<s:element minOccurs=[Ô]0[Ô] maxOccurs=[Ô]1[Ô] name=[Ô]cdRegion[Ô] type=[Ô]s:string[Ô] />
<s:element minOccurs=[Ô]0[Ô] maxOccurs=[Ô]1[Ô] name=[Ô]cdStore[Ô] type=[Ô]s:string[Ô] />
<s:element minOccurs=[Ô]0[Ô] maxOccurs=[Ô]1[Ô] name=[Ô]cdCancellationReason[Ô] type=[Ô]s:string[Ô] />
<s:element minOccurs=[Ô]0[Ô] maxOccurs=[Ô]1[Ô] name=[Ô]cdCreationReason[Ô] type=[Ô]s:string[Ô] />
<s:element minOccurs=[Ô]0[Ô] maxOccurs=[Ô]1[Ô] name=[Ô]dtPlannedStart[Ô] type=[Ô]s:string[Ô] />
<s:element minOccurs=[Ô]0[Ô] maxOccurs=[Ô]1[Ô] name=[Ô]dtPlannedEnd[Ô] type=[Ô]s:string[Ô] />
<s:element minOccurs=[Ô]0[Ô] maxOccurs=[Ô]1[Ô] name=[Ô]cdStatus[Ô] type=[Ô]s:string[Ô] />
<s:element minOccurs=[Ô]0[Ô] maxOccurs=[Ô]1[Ô] name=[Ô]nrSequence[Ô] type=[Ô]s:string[Ô] />
<s:element minOccurs=[Ô]0[Ô] maxOccurs=[Ô]1[Ô] name=[Ô]dsComments[Ô] type=[Ô]s:string[Ô] />
<s:element minOccurs=[Ô]0[Ô] maxOccurs=[Ô]1[Ô] name=[Ô]flHighImportance[Ô] type=[Ô]s:string[Ô] />
<s:element minOccurs=[Ô]0[Ô] maxOccurs=[Ô]1[Ô] name=[Ô]Flexi1[Ô] type=[Ô]s:string[Ô] />
<s:element minOccurs=[Ô]0[Ô] maxOccurs=[Ô]1[Ô] name=[Ô]Flexi2[Ô] type=[Ô]s:string[Ô] />
</s:sequence>
</s:complexType>
<s:element name=[Ô]ImportVisitInstanceResponse[Ô]>
<s:complexType>
<s:sequence>
<s:element minOccurs=[Ô]0[Ô] maxOccurs=[Ô]1[Ô] name=[Ô]ImportVisitInstanceResult[Ô] type=[Ô]tns:VisitInstanceTypeResponse[Ô] />
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name=[Ô]VisitInstanceTypeResponse[Ô]>
<s:sequence>
<s:element minOccurs=[Ô]1[Ô] maxOccurs=[Ô]1[Ô] name=[Ô]Result[Ô] type=[Ô]tns:StandartErrorCodes[Ô] />
<s:element minOccurs=[Ô]0[Ô] maxOccurs=[Ô]1[Ô] name=[Ô]VisitInstance[Ô] type=[Ô]tns:ArrayOfVisitInstanceTypeResponseItem[Ô] />
</s:sequence>
</s:complexType
Tópico encerrado , respostas não são mais permitidas