Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > VB6 SOAP SDK to C# .NET

Reply
Thread Tools

VB6 SOAP SDK to C# .NET

 
 
TC
Guest
Posts: n/a
 
      04-13-2005
Hey All,

I have been asked to port a VB6 COM component that makes SOAP calls to .Net.
The server side SOAP calls are written in PHP and after referencing the
WSDL, the SOAP methods do not offer any return type when viewed in the
Object Browser.

The responses are currently extracted from an XML document.

Below is a sample of the code that I was handed in VB using the SOAP SDK
--I did not write this -- don't shoot the messenger


Private Const ENC = "http://schemas.xmlsoap.org/soap/encoding/"
Private Const XSI = "http://www.w3.org/1999/XMLSchema-instance"
Private Const XSD = "http://www.w3.org/1999/XMLSchema"

Set Connector = New HttpConnector
Set Serializer = New SoapSerializer
Set Reader = New SoapReader

URI = "urn:" & "soap"
Connector.Property("EndPointURL") = "http://www.soaptest.com/soap.php"
Connector.Connect
Connector.Property("SoapAction") = URI & "#" & method
Connector.BeginMessage
Serializer.Init Connector.InputStream
Serializer.startEnvelope , ENC
Serializer.SoapNamespace "xsi", XSI
Serializer.SoapNamespace "SOAP-ENC", ENC
Serializer.SoapNamespace "xsd", XSD
Serializer.startBody
Serializer.startElement "trackmail", URI, , "method"


Serializer.startElement "subject"
Serializer.SoapAttribute "type", , "xsd:string", "xsi"
Serializer.writeString msgsubject
Serializer.endElement
Serializer.startElement "text"
Serializer.SoapAttribute "type", , "xsd:string", "xsi"
Serializer.writeString msgtext
Serializer.endElement

Serializer.endElement
Serializer.endBody
Serializer.endEnvelope
Connector.EndMessage

'have the reader parse the response
Reader.Load Connector.OutputStream

If Reader.RPCResult.nodeTypedValue = "Succeeded" Then
MsgBox "Success"
Else
MsgBox "Failed"
End If



I am looking to port these SOAP calls to C#. For example:

soapmethods MySoap=new soapmethods();
MySoap.methodname("arg1","arg2");

The above is fine for sending material to the server. What I should I put
to the left of the above method call if I am expecting an XML document
returned from the server?

Can anyone advise based upon the sample provided?

Thanks & Regards,

TC


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SOAP SDK deprecated - how to use .Net framework instead to call web service. bay_dar@yahoo.com ASP .Net Web Services 0 10-03-2006 05:18 PM
Canon SDK - VB6 & RCMakeImageItem function xrayspecs Digital Photography 0 02-20-2005 07:57 PM
Load Test - Calling ASP.NET Web Service from VB6 using MS SOAP Tool Kit Clement ASP .Net Web Services 0 11-22-2003 08:20 AM
WS-Security Authentication Using SOAP Toolkit and VB6 Client Mike Cook ASP .Net Web Services 0 07-17-2003 04:53 PM
SOAP Client creation in ASP.NET using MS SOAP Toolkit Sham Ramakrishnan ASP .Net 2 07-01-2003 11:29 AM



Advertisments