473,748 Members | 2,320 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SOAP Interoperabilit y - Urgent

Hi,

I have written a Web Service for a customer which expects a SOAP message
with Document/Literal encoding, and uses
RoutingStyle=So apServiceRoutin gStyle.RequestE lement to route the SOAP body
message to my Web Method. The Web Method expects a string as its parameter
and then feeds that string to an XML deserializer which maps the XML
elements contained within the string to my custom objects, then performs an
insert/update on an SQL Server database depending on whether the elements
exist in the database or not.

The example SOAP request generated by the .asmx page of my Webservice is:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelop e xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
xmlns:soap="htt p://schemas.xmlsoap .org/soap/envelope/">
<soap:Body>
<SendDealerDa ta xmlns="urn:Send DealerData">
<dstDealerData> string</dstDealerData>
</SendDealerData>
</soap:Body>
</soap:Envelope>

Where the dstDealerData node contains the string which is passed to my Web
Method.

My issue is that when I send a request from a c# web services client, all
works perfectly, however when my customer sends a request from their client
(which is generated out of an Oracle database, not sure about the platform)
the request fails, returning the following SOAP fault:

<soap:Fault>
<faultcode>soap :Client</faultcode>
<faultstring>Sy stem.Web.Servic es.Protocols.So apException: Server was
unable to read request. ---&gt; System.InvalidO perationExcepti on: There is
an error in XML document (1, 591). ---&gt; System.Xml.XmlE xception:
'Element' is an invalid node type. Line 1, position 591.
at System.Xml.XmlR eader.ReadEleme ntString()
at
Microsoft.Xml.S erialization.Ge neratedAssembly .XmlSerializati onReader1.Read2 _SendDealerData ()
--- End of inner exception stack trace ---
at System.Xml.Seri alization.XmlSe rializer.Deseri alize(XmlReader
xmlReader, String encodingStyle)
at System.Xml.Seri alization.XmlSe rializer.Deseri alize(XmlReader
xmlReader)
at System.Web.Serv ices.Protocols. SoapServerProto col.ReadParamet ers()
--- End of inner exception stack trace ---
at System.Web.Serv ices.Protocols. SoapServerProto col.ReadParamet ers()
at System.Web.Serv ices.Protocols. WebServiceHandl er.Invoke()
at
System.Web.Serv ices.Protocols. WebServiceHandl er.CoreProcessR equest()</faultstring>
<detail />
</soap:Fault>

I have used a trace program to analyse the differences in SOAP requests (the
customer and myself have both sent the same data within the
<dstDealerData> </dstDealerData> nodes of the SOAP envelope) - the
difference I have found is that when the data is sent via my c# client, all
'<' and '>' characters within the dstDealerData node are substituted for
'&lt;' and '&gt;' respectively, whilst when my customer sends the request
from their environment, the '<' and '>' characters are retained within the
dstDealerData node. If I use the data from my customer's soap request and
send that from my c# client, all works fine as the c# client performs the
necessary character substitution.

I have tried writing a SOAP Extension which intercepts the incoming SOAP
message before it is passed to my Web Method (in the BeforeDeseriali ze SOAP
message stage) and performs the necessary character substitution on the '<'
and '>' characters within the <dstDealerData> </dstDealerData> nodes of the
message, then rewrites the message to the
HttpContext.Cur rent.Items["SoapMessag e"] object, however I now receive the
following SOAP fault:

<soap:Fault>
<faultcode>soap :Server</faultcode>
<faultstring>Sy stem.Web.Servic es.Protocols.So apException: The root
element for the request could not be determined. When RoutingStyle is set to
RequestElement, SoapExtensions configured via an attribute on the method
cannot modify the request stream before it is read. The extension must be
configured via the SoapExtensionTy pes element in web.config, or the request
must arrive at the server as clear text. ---&gt; System.Xml.XmlE xception:
The root element is missing.
at System.Xml.XmlT extReader.Read( )
at System.Xml.XmlR eader.MoveToCon tent()
at
System.Web.Serv ices.Protocols. SoapServerProto colHelper.GetRe questElement()
at
System.Web.Serv ices.Protocols. Soap11ServerPro tocolHelper.Rou teRequest()
--- End of inner exception stack trace ---
at
System.Web.Serv ices.Protocols. Soap11ServerPro tocolHelper.Rou teRequest()
at System.Web.Serv ices.Protocols. SoapServerProto col.Initialize( )
at System.Web.Serv ices.Protocols. ServerProtocolF actory.Create(T ype type,
HttpContext context, HttpRequest request, HttpResponse response,
Boolean&amp; abortProcessing )</faultstring>
<detail />
</soap:Fault>

Which is obviously indicating that I can not use a SOAP extension when the
routing style is set to Request Element. What other options do I have for
making my Web Method accept the data in the format they are sending it? Do I
need to change the type of object my Web Method accepts as a parameter from
string to something else?

Cheers,

Matt
Nov 23 '05 #1
0 4366

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

Similar topics

1
1557
by: Dante | last post by:
I have developed a PHP web service that runs on a linux machine. I have also developed a windows forms client to the web service in C#. The only problem that I'm having is that the data that I send to the web service is too large. For one, the server denies any post greater than 8 MB. It also takes forever to send that amount of data. I would like to figure out how to compress the soap content and then have the server decompress it...
3
9795
by: parrot toes | last post by:
Summary: I have been trying to make requests of a web service provided by Axis using a dotnet client with code generated by wsdl.exe and have been getting exceptions when trying to process the response. As a result of seraching news groups I guessed that the SOAP response defines an array element in a way that causes the dotnet deserialization routines to put the content in a generic object array (object) BUT the content is supposed to...
16
3188
by: MR | last post by:
my soap messages to a remote site are failing. as far as i can tell the only differences between what my SOAP message looks liek and what they want are in the SOAP envelope SInce they don't have a wsdl doc i created a localhost site based on their DTD documetns. How do I configure my site (and client proxy) to match thier envelope? Any help would be greatly appreciated thanks
52
5804
by: frankgerlach | last post by:
>From my simple performance tests of SOAP it seems that it is about ten times slower than binary object request protocols such as RMI, IIOP or SimpleORB. Is this also YOUR experience ?
1
932
by: JackieB | last post by:
I have done couple of Web Sevices with VS.NET 2003. Still I'm wondering that is my Web Service using SOAP or XML-RPC. This is basic question but how can I be sure that my Web Service is using SOAP and when it's using XML-RPC? Secondly, when should I use SOAP and when XML-RPC, are there any recommendations which protocol should be used in certain cases? Cheers!
2
6885
by: Reshma Prabhu | last post by:
Hi All. In Remoting, There are 4 combinations possible. HTTP -SOAP HTTP - Binary TCP - SOAP TCP - Binary. The above combinations are in increasing order of interoperability and in decreasing order of efficiency. Can any one please
0
4750
by: Florian Laws | last post by:
Hello, to work around an interoperability problem with the PHP5 SOAP extension, I'd like to modify the generate XML SOAP request. (as described in http://www.schlossnagle.org/~george/blog/index.php?/archives/235-Salesforce.com-and-PHP.html ) To acheive this, I subclass SoapClient and overwrite the __doRequest() method. According to the PHP documentation and the article above, the
15
4113
by: =?Utf-8?B?ZG91Zw==?= | last post by:
I hadn't had a class yet and I had some MS help on this to set up, but I wrote a .Net WS that creates a proxy class response using SOAP. Works fine. And in kind of a good way, the IDE has hidden the SOAP implementation so from my end I'm just creating, passing back my XML proxy class. The client side consumer of WS has for 1) text file containing entire SOAP response and recently 2) average size of response in bytes to iclude SOAP...
5
4133
by: =?Utf-8?B?SmltbWVy?= | last post by:
Hello, I've been trying to create a WCF SOAP Router Service that can forward not just the message body but also any security headers set by the originator of the message. The destination service I'm routing messages to uses WSHttpBinding, SSL with UserName/Password client credentials. Using guidance from the Technology samples I can create a router that forwards messages without security credentils but not with them. Can anybody point me...
0
8822
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9528
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9359
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
9310
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
9236
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...
0
6072
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
4592
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
4863
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2774
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.