Bugzilla – Bug 5486
C-ws core related problem - Deserialization of Header failed
Last modified: 2008-04-17 14:43:40
You need to log in before you can comment on or make changes to this bug.
Hi, I have written a C client using globus C-ws core which is trying to contact a web service. When I use an api call which is going to contact the webservice and populate one of its output arguments with the result, it gives the following error. globus_soap_message_module: Failed receiving response tpsAPISEI_tpsAPI_getPath. globus_soap_message_module: Deserialization of {http://schemas.xmlsoap.org/soap/envelope/}Header failed. I set GLOBUS_SOAP_MESSAGE_DEBUG to MESSAGES, and I saw in the output the following request and response. default.class EF ----------------WRITING-------------- <ns00:Envelope xmlns:ns00="http://schemas.xmlsoap.org/soap/envelope/"><ns00:Header><ns02:MessageID xmlns:ns02="http://schemas.xmlsoap.org/ws/2004/03/addressing">uuid:8b148afc-4cf9-11dc-963c-00096b607276</ns02:MessageID><ns02:To xmlns:ns02="http://schemas.xmlsoap.org/ws/2004/03/addressing">http://192.84.86.25:8080/terapathsAPI/tpsAPI</ns02:To><ns02:Action xmlns:ns02="http://schemas.xmlsoap.org/ws/2004/03/addressing">urn:tpsAPI/wsdl/tpsAPISEI/tpsAPI_getPathResponse</ns02:Action><ns02:From xmlns:ns02="http://schemas.xmlsoap.org/ws/2004/03/addressing"><ns02:Address>http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous</ns02:Address></ns02:From></ns 00:Header><ns00:Body><ns01:tpsAPI_getPath xmlns:ns01="urn:tpsAPI/types"><String_1>terapaths</String_1><String_2>terapaths</String_2><String_3>198.124.220.135</String_3><String_4>192.84.86.19</String_4></ns01:tpsA PI_getPath></ns00:Body></ns00:Envelope> ===================================== ----------------READING-------------- <?xml version="1.0" encoding="UTF-8"?> <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns0="urn:tpsAPI/types"><env:Body><ns0:tpsAPI_getPathResponse><result>http://tera01.ultralight.org:8080/terapathsInternalWebServices/tpsIWS</result><result>OSCARS,ht tps://oscars.es.net/axis2/services/OSCARS</result><result>http://198.124.220.9:8080/terapathsRemoteTPsListeners/tpsRTPsL</result></ns0:tpsAPI_getPathResponse></env:Body>< /env:Envelope> ===================================== The output seems to be coming back to the client correctly but is not able to be correctly parsed and copied into the output arguments. Basically,the response doesn't contain any soap headers due to which the client side C-ws-core implementation cannot parse it. The standard SOAP declaration specification has the following line. <!-- Envelope, header and body --> <xs:element name="Envelope" type="tns:Envelope"/> − <xs:complexType name="Envelope"> − <xs:sequence> <xs:element ref="tns:Header" minOccurs="0"/> which means that the message should be fine even without a header. Could you help me with this error? Regards Gaurav Could you help me with this?
I did a quick look at the code, and it seems that it tries to handle this situation. Can you provide test programs that I can use to see what is happening in this situation? joe
(In reply to comment #0) > Hi, > > I have written a C client using globus C-ws core which is trying to > contact a web service. When I use an api call which is going to contact > the webservice and populate one of its output arguments with the result, > it gives the following error. > > globus_soap_message_module: Failed receiving response > tpsAPISEI_tpsAPI_getPath. > globus_soap_message_module: Deserialization of > {http://schemas.xmlsoap.org/soap/envelope/}Header failed. > > I set GLOBUS_SOAP_MESSAGE_DEBUG to MESSAGES, and I saw in the output the > following request and response. > > default.class EF > ----------------WRITING-------------- > <ns00:Envelope > xmlns:ns00="http://schemas.xmlsoap.org/soap/envelope/"><ns00:Header><ns02:MessageID > xmlns:ns02="http://schemas.xmlsoap.org/ws/2004/03/addressing">uuid:8b148afc-4cf9-11dc-963c-00096b607276</ns02:MessageID><ns02:To > xmlns:ns02="http://schemas.xmlsoap.org/ws/2004/03/addressing">http://192.84.86.25:8080/terapathsAPI/tpsAPI</ns02:To><ns02:Action > xmlns:ns02="http://schemas.xmlsoap.org/ws/2004/03/addressing">urn:tpsAPI/wsdl/tpsAPISEI/tpsAPI_getPathResponse</ns02:Action><ns02:From > xmlns:ns02="http://schemas.xmlsoap.org/ws/2004/03/addressing"><ns02:Address>http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous</ns02:Address></ns02:From></ns > 00:Header><ns00:Body><ns01:tpsAPI_getPath > xmlns:ns01="urn:tpsAPI/types"><String_1>terapaths</String_1><String_2>terapaths</String_2><String_3>198.124.220.135</String_3><String_4>192.84.86.19</String_4></ns01:tpsA > PI_getPath></ns00:Body></ns00:Envelope> > ===================================== > > ----------------READING-------------- > <?xml version="1.0" encoding="UTF-8"?> > <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/" > xmlns:ns0="urn:tpsAPI/types"><env:Body><ns0:tpsAPI_getPathResponse><result>http://tera01.ultralight.org:8080/terapathsInternalWebServices/tpsIWS</result><result>OSCARS,ht > tps://oscars.es.net/axis2/services/OSCARS</result><result>http://198.124.220.9:8080/terapathsRemoteTPsListeners/tpsRTPsL</result></ns0:tpsAPI_getPathResponse></env:Body>< > /env:Envelope> > ===================================== > > > The output seems to be coming back to the client correctly but is not able > to be correctly parsed and copied into the output arguments. Basically,the > response doesn't contain any soap headers due to which the client side > C-ws-core implementation cannot parse it. The standard SOAP declaration > specification has the following line. > > <!-- Envelope, header and body --> > <xs:element name="Envelope" type="tns:Envelope"/> > − > <xs:complexType name="Envelope"> > − > <xs:sequence> > <xs:element ref="tns:Header" minOccurs="0"/> > > which means that the message should be fine even without a header. Could you > help me with this error? > > Regards > Gaurav > > Could you help me with this? > (In reply to comment #1) > I did a quick look at the code, and it seems that it tries to handle this > situation. Can you provide test programs that I can use to see what is > happening in this situation? > > joe > I am running the test program from my MCS machine. The web service was not open to be accesible from outside machines. So, I had got myself access to the webservice from my machine. Can you let me know what MCS machines or IP addresses will you be running the client from so that I can tell the webservice folks to allow access from those IPs. The client bindings along with the sample client code is present at http://www.cse.ohio-state.edu/~khannag/TP.tar.gz The client code is in file Terapaths_client.c in the subdirectory client. The client needs to be invoked as follows. ./executable property_file_name A sample property file named terapathsClient.properties is present in the client subdirectory. When you run, it will ask for multiple options. Just specify gb ( getbandwidths option) and just let the code use the default values. I exported GLOBUS_SOAP_MESSAGE_DEBUG to MESSAGES to see what soap messages are being sent and recieved. cheers Gaurav
Subject: Re: C-ws core related problem - Deserialization of Header failed On Aug 21, 2007, at 2:26 PM, gaurav khanna wrote: > Hi Joe, > > I have ensured that the webservice can now be accessed from terra and > wiggum. So, you should be able to run the client from either of these. > > > Regards > Gaurav > > Gaurav Khanna > Phd Student > CSE Department,OSU > > Phone (office):614-292-7036 > > On Tue, 21 Aug 2007 bugzilla-daemon@mcs.anl.gov wrote: Attaching some quick-and-dirty patches to C WS Core to get you going. I'm not sure exactly what the previous developer was planning for some of these bits, so they'll be a rather unofficial until I get a chance to think more about the problem. The patches are 1: cope-with-no-headers.diff [patch to wsrf/c/parser/cgen] 2: omit-addressing.diff [patch to wsrf/c/handlers/addressing] 3: correct_no_header_error.diff [patch to wsrf/c/message/source] Apply all three of these, reinstall the affected packages, and then regenerate your bindings (the cgen patch will affect the TpsAPI_client.c file in a few spots). I ran the test program after applying these patches and didn't get an error (though I don't know what it was doing to tell if it was working).
*** Bug 5487 has been marked as a duplicate of this bug. ***
Committed a fix for this to the 4.0 branch and made an advisory http://www.globus.org/toolkit/advisories.html This also comes up when using 4.0.x with 4.2.x java services.