I'm a Web Services newbie and I'm hoping some more experienced developers can
help me out.
I've written a .NET 2.0 web service that takes an XML file as input. The
SOAP envelope is pre-defined within the XML document.
I then send this XML to another web service (written in java) and that's
where I encounter problems. After using a port sniffer, it looks as though
the XML file I'm sending is being wrapped inside another SOAP envelope and
that could be causing the problem (since I already have the envelope defined
within the XML document).
Is there a way to send the XML doc to the next web service without wrapping
another SOAP envelope around it?
Thanks for your help!!
Claus Konrad [MCSD] - 27 Oct 2006 22:47 GMT
Sending an XML document as parameter to a method is not a good practice. It
is far from "typesafe" as an XML document can take more or less any form.
See this thread for a far better alternative:
http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.dotnet.fra
mework.webservices&mid=6d0ef089-2f91-400d-af4e-7ada36462aa2
Design:
A: Create a proxy towards your own webservice from your client.
B: Create a proxy (different) towards the java service.
Use the B to access Java with the parameters it expects, but do not just
forward the message coming into service A (your own). Consider and treat the
two services differently as they are indeed two different entities.

Signature
rgds.
/Claus Konrad
> I'm a Web Services newbie and I'm hoping some more experienced developers can
> help me out.
[quoted text clipped - 12 lines]
>
> Thanks for your help!!
John Saunders - 28 Oct 2006 11:47 GMT
> I'm a Web Services newbie and I'm hoping some more experienced developers
> can
> help me out.
>
> I've written a .NET 2.0 web service that takes an XML file as input. The
> SOAP envelope is pre-defined within the XML document.
That's a very bad idea. As the name suggests, the envelope is wrapped around
the "message". It contains things like addressing information, routing
information, etc. The envelope is part of the protocol, not part of the data
transferred by the protocol.
If there are particular elements which your application requires to be in
the header, then you need to put them there by defining them in your web
service class as [SoapHeader] fields. But you can't just send out pre-canned
headers and cause no others to be placed in the output. \
John