asp + soap

  • Thread starter Thread starter Lord Brett Sinclair
  • Start date Start date
L

Lord Brett Sinclair

Hello everyone
With VB, on an aspx page, I need to access some webservices APIs.
I found some example in VB6 using MS XML library components :

Dim HttpReq As New MSXML2.XMLHTTP40
dim strRequestXML as string

strRequestXML= fill out the request xml document here

HttpReq.open("POST", "http://Somwehere/somepage.asp", False)
HttpReq.setRequestHeader = "Content-Type", "application/soap; charset bla
bla bla

HttpReq.send strRequestXML

MsgBox(HttpReq.responseText)



How can I accomplish the same in asp.net page using vb ?

Thank you
 
The easiest method is using the WSDL for a "web service" and creating a
proxy using either a) a web reference or b) the WSDL.exe tool.

If this is a simple posting mechanism that recieves an XML doc embedded in
SOAP, you can fake the WSDL by setting up an equivalent ASMX page in your
app and examining the WSDL. YOu will have to change the page ported to, but
it is fairly easy.

Now, this does not guarantee that you will get it to work, as the developer
of the ASP page may not have set it up correctly. You can include the SOAP
toolkit or MS XML into your ASPX application (to call the service) or use
the newer .NET networking (inter-networking) objects.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

**********************************************************************
Think Outside the Box!
**********************************************************************
 
If you are using Visual Studio.NET, the easiest method would be to create a
new web reference, which will set up a wrapper class for this web service.
 
Back
Top