Ryan Chong
asked on
Calling Web Service: part 2
Hi, As refer to http:Q_21111980.html
I got a web method as GetOutboundStatus, so how can i call it using the following info (probably using SOAP Toolkit 3.0)?
I got SOAP request as:
POST /function/1.0/functionserv ice.asmx HTTP/1.1
Host: webservices.mydomain.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://webservices.mydomain.com/function/1.0/GetOutboundStatus"
<?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>
<GetOutboundStatus xmlns="http://webservices.mydomain.com/function/1.0/">
<customerID>string</custom erID>
<password>string</password >
<transactionIDs>
<string>string</string>
<string>string</string>
</transactionIDs>
<requestSettings>
<DIMEDocuments>
<SecretKeys>
<SecretKey xsi:nil="true" />
<SecretKey xsi:nil="true" />
</SecretKeys>
</DIMEDocuments>
<SecurityMode>
<UseDIME>boolean</UseDIME>
<DigitallySigned>boolean</ DigitallyS igned>
</SecurityMode>
</requestSettings>
</GetOutboundStatus>
</soap:Body>
</soap:Envelope>
And i got SOAP response as:
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?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>
<GetOutboundStatusResponse xmlns="http://webservices.mydomain.com/function/1.0/">
<GetOutboundStatusResult>
<RecipientStatus>
<Attemps>string</Attemps>
<CSID>string</CSID>
<CallTime>string</CallTime >
<TransactionID>string</Tra nsactionID >
<Charges>string</Charges>
<Pages>string</Pages>
<Phone>string</Phone>
<Seconds>string</Seconds>
<Speed>string</Speed>
<Status>string</Status>
<ProviderTxId>string</Prov iderTxId>
</RecipientStatus>
<RecipientStatus>
<Attemps>string</Attemps>
<CSID>string</CSID>
<CallTime>string</CallTime >
<TransactionID>string</Tra nsactionID >
<Charges>string</Charges>
<Pages>string</Pages>
<Phone>string</Phone>
<Seconds>string</Seconds>
<Speed>string</Speed>
<Status>string</Status>
<ProviderTxId>string</Prov iderTxId>
</RecipientStatus>
</GetOutboundStatusResult>
</GetOutboundStatusRespons e>
</soap:Body>
</soap:Envelope>
thks
I got a web method as GetOutboundStatus, so how can i call it using the following info (probably using SOAP Toolkit 3.0)?
I got SOAP request as:
POST /function/1.0/functionserv
Host: webservices.mydomain.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://webservices.mydomain.com/function/1.0/GetOutboundStatus"
<?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>
<GetOutboundStatus xmlns="http://webservices.mydomain.com/function/1.0/">
<customerID>string</custom
<password>string</password
<transactionIDs>
<string>string</string>
<string>string</string>
</transactionIDs>
<requestSettings>
<DIMEDocuments>
<SecretKeys>
<SecretKey xsi:nil="true" />
<SecretKey xsi:nil="true" />
</SecretKeys>
</DIMEDocuments>
<SecurityMode>
<UseDIME>boolean</UseDIME>
<DigitallySigned>boolean</
</SecurityMode>
</requestSettings>
</GetOutboundStatus>
</soap:Body>
</soap:Envelope>
And i got SOAP response as:
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?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>
<GetOutboundStatusResponse
<GetOutboundStatusResult>
<RecipientStatus>
<Attemps>string</Attemps>
<CSID>string</CSID>
<CallTime>string</CallTime
<TransactionID>string</Tra
<Charges>string</Charges>
<Pages>string</Pages>
<Phone>string</Phone>
<Seconds>string</Seconds>
<Speed>string</Speed>
<Status>string</Status>
<ProviderTxId>string</Prov
</RecipientStatus>
<RecipientStatus>
<Attemps>string</Attemps>
<CSID>string</CSID>
<CallTime>string</CallTime
<TransactionID>string</Tra
<Charges>string</Charges>
<Pages>string</Pages>
<Phone>string</Phone>
<Seconds>string</Seconds>
<Speed>string</Speed>
<Status>string</Status>
<ProviderTxId>string</Prov
</RecipientStatus>
</GetOutboundStatusResult>
</GetOutboundStatusRespons
</soap:Body>
</soap:Envelope>
thks
Have you tried
Set retList = soapclient.GetOutboundStat
or
Set retList = soapclient.GetOutboundStat
ASKER
Hi EDDYKT,
Same error as i tried out your suggestions above.. any other suggestion? Still need urgent help, thks
Same error as i tried out your suggestions above.. any other suggestion? Still need urgent help, thks
Sorry I don't know much about SOAP toolkit
Per my comment under https://www.experts-exchange.com/questions/21111980/Calling-webservices-from-vb6.html
It looks to me like the fourth parameter, requestSettings, is an optional parameter of a user-defined type. Can you confirm this?
Have you tried leaving it off of the call, e.g.,
tmp = soapclient.GetOutboundStat us("custom erID", "password", tmpArr())
It looks to me like the fourth parameter, requestSettings, is an optional parameter of a user-defined type. Can you confirm this?
Have you tried leaving it off of the call, e.g.,
tmp = soapclient.GetOutboundStat
ASKER
>>Have you tried leaving it off of the call, e.g.,
tmp = soapclient.GetOutboundStat us("custom erID", "password", tmpArr())
I got:
Invalid procedure call or argument
Problem still not resolve.. :(
tmp = soapclient.GetOutboundStat
I got:
Invalid procedure call or argument
Problem still not resolve.. :(
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thks aParser, thks for the useful info here, will try to complete my application development, and hopefully will close this question soon, thks again for your assistatnce here ;-)
Any problems? Anything I can do to help?
ASKER
Thks for the assistance, aParser. You help me a lot here! :-)
Is it still a good idea to use the MS SOAP toolkit?
I read something saying it was deprecated by .NET.
We use VB6 with no plans at the moment to switch to .NET.
I read something saying it was deprecated by .NET.
We use VB6 with no plans at the moment to switch to .NET.
ASKER
Private soapclient As MSSOAPLib.soapclient
Private Sub Command1_Click()
Set soapclient = New MSSOAPLib.soapclient
soapclient.mssoapinit "http://webservices.junk.net/fax/1.0/faxservice.asmx?WSDL"
soapclient.ConnectorProper
Dim tmp As String
Dim tmpArr(0) As String
Dim retList As IXMLDOMNodeList
Dim node As IXMLDOMNode
tmpArr(0) = "123456789"
Set retList = soapclient.GetOutboundStat
For Each node In retList
MsgBox node.xml
Next
End Sub
but failed with Type Mismatch Error on line:
Set retList = soapclient.GetOutboundStat
and when i debug soapclient.detail, i got:
Client:Type conversion failure for element requestSettings HRESULT=0x80020005
Can someone guide me where i was wrong?! Still need an urgent help, thks