473,783 Members | 2,350 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Send XML without SOAPEnvelope wrapper?

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!!
Oct 27 '06 #1
2 3034
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...e-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.
--
rgds.
/Claus Konrad
"rhea" wrote:
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!!
Oct 27 '06 #2
"rhea" <rh**@discussio ns.microsoft.co mwrote in message
news:82******** *************** ***********@mic rosoft.com...
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
Oct 28 '06 #3

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

Similar topics

6
4632
by: Ray Paseur | last post by:
We broadcast email messages with PHP scripts, but sometimes email is not timely and we would like to send something that could get there faster. Can anyone tell me about how to send Instant Messages (Y, AOL, MSN, Trillian, etc.) or SMS from within a script? Please copy your reply off group to "access (a) NatPresCh .org" - hopefully I will see your message there sooner. And thanks for any ideas. ~Ray
2
1286
by: TOM | last post by:
I am using C++.NET 2003. The appplication requires calling a device (a USB driver) that was compiled under C++ 6.0, and distributed as a binary (a .sys file) by the manufacturer. Some of the data structures are fairly complex, and a couple header files from the Windows DDK are needed to establish the variable types and structures needed to call the USB functions. The problem is that an #include of the necessary DDK headers within C++...
1
1628
by: Raichu | last post by:
Hi All, I'm new to VC++.net and I searched through the forums and couldn't find anything related to this. I'm trying to send a flat file from a VC++.net program to a PHP file residing on a webserver. I know you can call a website from VC++.net, but I'm not sure how to send a physical file over the internet. I mean is there a way to mimic a normal html form to upload a file, using VC++.net?
2
2441
by: Raj | last post by:
I am using a SOAP WebMethod -ASP.net (wse2.0) public SoapEnvelope Request() { return SoapEnvelope } The results come back in an indented format as below even if I dont have any newline or whitespaces as part of the SoapEnvelope even though I didnt have
11
7730
by: hazz | last post by:
smtpClient.Send(message) is causing me problems as per specifics in the trace below. Email is sent but not without this error typically upon sending the second email, but sometimes when running the app, even the first time. The application will be required to be sending out repeated emails, about one every second or two. Must this be done asynchronously? Thank you. -Greg I get the generic error messages;
1
944
by: Anbu | last post by:
Hi All, Is it possible to view the contents of a request received by a .NET Web Service - as SOAP Envelope? TIA,
0
1350
by: Anbu | last post by:
Hi All, I need to redirect the SoapEnvelope received from another web service. This service sends the message in Soap12 format. But when i load the content into another soapenvelope using se.LoadXML, the new object becomes Soap11 and unusable. I tried another option to respond to the call using the XMLdocument object, by setting loading the data into a xmldoc and loading the details into soapenvelope's body. But this option will not...
4
2132
by: a_agaga | last post by:
Hi! Do you know different alternatives to convert exceptions in many methods of some wrapper classes. User -Wrapper classes -LibraryClasses -... Wrapper classes catch an exception of only one type, let's call it e.g. "InternalException_c". There are no other types of exceptions, which should be catched /
8
1973
by: Belebele | last post by:
Suppose that I want to write a (concrete) interface class (without virtual functions) to classes that contain a method template // -------------------------------------- class Interface { public: template <typename Wrapped> Interface(Wrapped& ); // wraps a reference to another object // that implements the method template
0
10147
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10081
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9946
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7494
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6735
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5378
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4044
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2875
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.