If the Java app builder has a WSDL file for their service, you can use
WSDL.exe to set up the interface and simply code as if you were coding
against a local method. This is the ideal.
If not, you can still set it up, but you will have to look at the parameters
and set up the WSDL yourself. One way to accomplish this is to mimic the
service on your side, matching the params. Dump your WSDL and change the web
address to the location of their service. You can then create your web
reference with WSDL.EXE and roll.
What I am saying is if the doc is something like this:
<values>
<userName>gbworld</username>
....
<values>
wrapped up in a SOAP envelope, you can allow .NET to control the creation of
SOAP and simply send the values you need. The less you have to mess with the
envelope creation, the better. This will not work in all cases, but you can
start with this method and see if it works, as it is much easier than hand
coding. As long as they use the standards, and have WSDL (or can create
WSDL), you are golden.
If you particularly like pain, you can also create your own SOAP wrapper
class and open a socket to send the SOAP envelope to the Java server. I am
not fond of this methodology, although the learning experience might make it
worthwhile. ;-)
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
************************************************
Think Outside the Box!
************************************************
"None" <no****@spam.org> wrote in message
news:NN*******************@news-server.bigpond.net.au...
Dear All,
I am writing an application which needs to send some XML in a SOAP
envelope to a Java webservice. I have absolutely no idea where to begin. Can
anyone possibly point me to a good place to read about how to go about doing
this? I've not dealt with XML much in the past.
Also, instead of creating an XML document every time with nodes which are
the same, but some different values, is there a way of templating that
XML? ie. I store an XML document and replace some information in the XML before
sending. Is this a common practise?
Thanks in advance.
Steve