473,386 Members | 1,804 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

VB6 SOAP SDK to C# .NET

TC
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
Nov 23 '05 #1
0 1298

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: bigbinc | last post by:
I have setup a soap machine on linux and similar configuration works properly. on a windows mahcine, I get these erros on the addressbook, samples, any ideas. I am pretty sure my classpaths are...
2
by: Artur | last post by:
Hi Newsgroup, im currently working on programming a asp.net application consuming an Webservice hosted on Apache/Axis. I have generated WSDL and Proxy classes from VisualStudio.net. But when...
8
by: xmail123 | last post by:
Hi, As was pointed out whatever you return from a WebMethod needs to be serializable to SOAP. An ArrayList is not serializable. I will be needing to return other data types from web methods. ...
31
by: Bryan Dickerson | last post by:
Ok, simple question: from a VB.Net web service (as I've said before, I'm a newbie to SOAP), how would I get the SOAP body into a string? My boss and I concur that it, at least from our...
0
by: Jigar.Patel | last post by:
I have simple remoting server exposing following simple method. When I try to add webreference to this server in another project, it gives me following error: Custom tool error: Unable to import...
0
by: info | last post by:
Dear all, is the first time that I use SOAP, and i must say that i'm having several problems. this is SOAP message that expects the server =================XML EXPECTED FROM THE...
1
by: gcmartijn | last post by:
H! When I use php code nusoap everything works but with python I get everytime "Your session key does not exist or has expired" I use this code below: test =...
2
by: furrypop | last post by:
Hi, I'm trying to get the Perl SOAP::Lite examples to work on a Windows PC, running Apache 2.2.4. Apache is definitely serving CGI scripts, as I've tested a dummy Hello World thing. I'm also...
0
by: Philluminati | last post by:
I have a Perl SOAP Server which returns this SOAP Message when invoked: <?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsi="http:// www.w3.org/2001/XMLSchema-instance"...
0
by: vigneshrao | last post by:
Hi, I have been working on a script that loops through multiple records and sends data (one record per call) to a WS. I am supposed to make a new call for each record before sending the data....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.