I am developing an application that uses live parcel tracing with
Canada Post. My experience with web services is limited- being
familiar with "Adding a web reference" for services made in .Net
Canada Post's web service is not .Net based (and they have not
disclosed the environment to me).
I have two problems. They may be related, but I do not know.
1) the web service I am to consume is secured with a username and
password. I have those. When I add the web reference, I am prompted
for these, with a login window that looks like an IE login window.
After I enter those, I am presented with a second login window- this
one has a 4 fields, the URL, Username, Password and Domain. I don't
have anything to enter in the domain. I leave it empty.
2) after supplying my username and password I get a generic error-
basically, the "Web Reference" method does not appear to work.
I provided wrong credentials to see if it was a username and password
issue, and it's not. Canada Post assures me my account works.
Typically, my experience has been to perform the above, and the Add
Web Reference window displays a list of available methods.
I'm just getting XML that tells me something was wrong on the other
side.
The error looks like this:
<?xml version="1.0" encoding="UTF-8" ?>
<https://obc.canadapost.ca/sap/bc/soap/rfc?sap-client=100##- <SOAP-
ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/
envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<https://obc.canadapost.ca/sap/bc/soap/rfc?sap-client=100##- <SOAP-
ENV:Body>
<https://obc.canadapost.ca/sap/bc/soap/rfc?sap-client=100##- <SOAP-
ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>Internal Server Error</faultstring>
<detail>SoapDoc::Init: Cannot set inout buffer</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
I know this is probably not that helpfull, but I would appreciate a
pointer to somewhere on how to consume not .net web services with
vb.net.
Thanks in advance
Rob W