Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / October 2006

Tip: Looking for answers? Try searching our database.

Send XML without SOAPEnvelope wrapper?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
rhea - 27 Oct 2006 20:39 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.

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

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.