Groups | Blog | Home
all groups > dotnet xml > january 2005 >

dotnet xml : send soap message



mark kurten
1/26/2005 7:03:02 PM
i have a requirement to send a soap message to a web service.

i'm familiar with the soap toolkit using vb.

i need to generate a xml document which i think i can do, but i don't know
how to send it to this service.

i've accessed other web services in .net and usually there are functions i
can reference which do the processing and then return some result.

however, i've been told that no functions are available and wsdl is not used
(i'm not very familiar with this)
I'm suppose to just send this xml document (which has soap envelope, header
and body info) to this service.

can someone please point me in the right direction? i'm sort of in the
dark...thanks

unfortunately, i don't have to many details about this service, i just know
Christoph Schittko [MVP]
1/27/2005 12:30:05 AM


[quoted text, click to view]
Christoph Schittko [MVP]
1/27/2005 12:36:28 AM
Mark,

You didn't mention what framework you need to send the message with. Are
you using .Net or the Soap toolkit.

Be careful with the soap toolkit as Microsoft is officially retiring
that toolkit in March.

If you are developing your web service client in .Net then you can build
the XmlDocument and post the content to the target web service with the
HttpWebRequest class.

Check out the Quickstart examples that are installed with the .Net
framework for an example on how to POST data over Http.

HTH,
Christoph Schittko
MVP XML
http://weblogs.asp.net/cschittko


[quoted text, click to view]
Mark
1/27/2005 8:14:45 AM
it is with .net framework...thank you..

i was reading that in framework 1.1 (i think) the http get and http put
functions are disabled by default.

what if the service i'm sending this to has this disabled? or would this
not be possible?

if i run a web service and click on one of the functions available, it lists
a sample soap request, http get request and http post request. what is this
page called and i guess the webservice generates this automatically?

reason i ask this is because below you mention HttpWebRequest. what if i
need to use the soap request and response? is that different?

thanks.




[quoted text, click to view]

Mark
1/28/2005 10:10:39 PM
i found an example of what i'm trying to do


<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<x:sample xmlns:x="urn:stuff">
<firstname>name</firstname>
<secondname>name2</secondname>
</x:sample>
</soap:Body>
</soap:Envelope>

I'm trying to find out how to create an xml document with the above
contents.

Thanks.



[quoted text, click to view]

Mark
1/29/2005 10:47:34 AM
one more question:

i found a vb example that uses the soap toolkit for VB.
This approach I'm familiar with and it's obviously easier. It's my
understanding this is referred to as high level API. The task i'm assigned
with is to use the
low level api to build the soap file "by hand"

If i make this soap xml file by hand (i posted an earlier example of what i
need), is there a reason why i couldn't use the high level api to do the
same?
I'm being told i can't use this high level API (tool kit) because i have to
do it "by hand" or manually create this file. Can someone please explain to
me why this would be? Does this have to do with a WSDL file possibly not
being used?

Thanks.


Private Sub cmdTime_Click()
Dim c As New MSSOAPLib.SoapClient
c.mssoapinit "http://www.a.com/sample.xml"

Dim sTime As String

sTime = c.GetTime()

txtTime = sTime
End Sub
[quoted text, click to view]

AddThis Social Bookmark Button