axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Samisa Abeysinghe" <SAbeysin...@virtusa.com>
Subject RE: Newbie questions and some weird behavior
Date Fri, 06 May 2005 06:09:16 GMT
Still we get garbage within the XML tags. This means that there is a bug (a serious one) in
handling output parameters on the server side. 
Looking at the generated code, it looks to me that the bug is in generated code and not the
engine.
 
We need to create a Jira on this bug.
 
Thanks,
Samisa…
 
-----Original Message-----
From: Chinthana C. Dinapala [mailto:CDinapala@virtusa.com] 
Sent: Friday, May 06, 2005 11:58 AM
To: Apache AXIS C User List
Subject: RE: Newbie questions and some weird behavior
 
Hi,
 
I have tested this WSDL and after making some changes in the generated code able to correct
the XML tags in server respond.
The generated codes in HUB_TO_HUBWrapper.cpp I have change the followings.
      I have removed MSG_RECPT> part here.
 
 
      pIWSSZ->addOutputParam("UID", (void*)&out0, XSD_STRING);
      pIWSSZ->addOutputParam("TO_TP", (void*)&out1, XSD_STRING);
      pIWSSZ->addOutputParam("FROM_TP", (void*)&out2, XSD_STRING);
      pIWSSZ->addOutputParam("STATUS", (void*)&out3, XSD_STRING);
      pIWSSZ->addOutputParam("STATUS_MSG", (void*)&out4, XSD_STRING);
      pIWSSZ->addOutputParam("TIMESTAMP", (void*)&out5, XSD_STRING);
 
Here following are the SOAP messages after correction.
 
Client request………………………………………………………………………………………………..
 
POST /axis/HUB_TO_HUB HTTP/1.1
Host: 127.0.0.1:8888
Content-Type: text/xml; charset=UTF-8
SOAPAction: "HUB_TO_HUB#Hub_Request"
Content-Length: 608
 
<?xml version='1.0' encoding='utf-8' ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<ns1:Hub_Request xmlns:ns1="http://localhost/axis/HUB_TO_HUB">
<ns1:TO_TP>First</ns1:TO_TP>
<ns1:FROM_TP>Second</ns1:FROM_TP>
<ns1:TO_HUB>Third</ns1:TO_HUB>
<ns1:FROM_HUB>Fourth</ns1:FROM_HUB>
<ns1:UID>Fifth</ns1:UID>
<ns1:APIKEY>Sixth</ns1:APIKEY>
<ns1:ROUTING>Seventh</ns1:ROUTING>
<ns1:MESSAGE>Last</ns1:MESSAGE>
</ns1:Hub_Request>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
 
Server respond…………………………………………………………………………………………………….
 
HTTP/1.1 200 OK
Date: Fri, 06 May 2005 05:44:10 GMT
Server: Apache/2.0.52 (Win32)
Content-Length: 491
Content-Type: text/xml
 
<?xml version='1.0' encoding='utf-8' ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<ns1:Hub_Response xmlns:ns1="http://localhost/axis/HUB_TO_HUB">
<UID>xø�</UID>
<TO_TP>˜ô�</TO_TP>
<FROM_TP>`Ž</FROM_TP>
<STATUS>`Ž</STATUS>
<STATUS_MSG> ä�</STATUS_MSG>
<TIMESTAMP>˜à’</TIMESTAMP>
</ns1:Hub_Response>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
 
Thanks
 
Chinthana Dinapala
 
 
 
-----Original Message-----
From: Samisa Abeysinghe [mailto:sabeysinghe@virtusa.com] 
Sent: Friday, May 06, 2005 3:21 PM
To: Apache AXIS C User List
Subject: RE: Newbie questions and some weird behavior
 
Looks to me as if there are serialization problems on the server side.
I guess this is something to do with errors in the manipulation of the
pointer data members of the class being serialized by server for
response.
 
One thing to figure out is to know whether the error is in generated
code or in the user written code. Will have to generate the code and
see.
 
Thanks,
Samisa...
 
On Thu, 2005-05-05 at 19:09, Yampolsky, Robert wrote:
> > Will have a look at you wsdl and see if I could get it working. Please
> > try simple axis server in the mean time.
> > 
> > Thanks,
> > Samisa...
> >
> 
> Thanks.  I tried simple axis server with gdb, and was able to debug my
> server.  It now is able to log its inputs and outputs, and they look
> basically right.  But the client still gets null pointers for all of the
> results.
> 
> Then I used tcpdump to look at the SOAP that was passed back and forth.
> I've included it below.
> It looks like the input is correct, but the response is screwed up.
> Instead of what I expect to get:
>     <MSG_RECPT>
>           <UID>....</UID>
>           <TO_TP>....</TO_TP>
>           etc.
>     </MSG_RECPT>
> 
> I'm getting:
>     <MSG_RECPT>UID>....</MSG_RECPT>UID>
>     <MSG_RECPT>TO_TP>....</MSG_RECPT>TO_TP>
>     etc.
> 
> Also, the data between the bad XML tags is garbage.  Interestingly, I
> get binary garbage that grows by 4 bytes for each subsequent result
> 'string'.
> 
> Anyway, progress.
> 
> Here's the TCP dump of the SOAP:
> 
> POST /axis/HUB_TO_HUB HTTP/11  Host: 172 1648 246:80
> Content-Type: text/xml; charset=UTF-8
> SOAPAction: "HUB_TO_HUB#Hub_Request"  Content-Length: 571
> 
> <?xml version='1 0' encoding='utf-8' ?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas xmlsoap
> org/soap/envelope/"
> xmlns:xsd="http://wwww3 org/2001/XMLSchema"
> xmlns:xsi="http://www w3 org/2001/XMLSchema-instance">
> <SOAP-ENV:Body>
> <ns1:Hub_Request xmlns:ns1="http://localhost/axis/HUB_TO_HUB">
> <ns1:TO_TP>A</ns1:TO_TP>
> <ns1:FROM_TP>B</ns1:FROM_TP>
> <ns1:TO_HUB>C</ns1:TO_HUB>
> <ns1:FROM_HUB>E</ns1:FROM_HUB>
> <ns1:UID>F</ns1:UID>
> <ns1:APIKEY>G</ns1:APIKEY>
> <ns1:ROUTING></ns1:ROUTING>
> <ns1:MESSAGE></ns1:MESSAGE>
> </ns1:Hub_Request>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> 
> HTTP/1 1 200 OK  Date: Thu, 05 May 2005 18:26:37 GMT
> Server: Apache/2 0 46 (Red Hat)  Content-Length: 689
> Connection: close  Content-Type: text/xml
> <?xml version='1 0' encoding='utf-8' ?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas xmlsoap
> org/soap/envelope/"
> xmlns:xsd="http://www w3 org/2001/XMLSchema"
> xmlns:xsi="http://www w3 org/2001/XMLSchema-instance">
> <SOAP-ENV:Body> <ns1:Hub_Response
> xmlns:ns1="http://localhost/axis/HUB_TO_HUB">
> <MSG_RECPT>UID>....</MSG_RECPT>UID>
> <MSG_RECPT>TO_TP>........</MSG_RECPT>TO_TP>
> <MSG_RECPT>FROM_TP>............</MSG_RECPT>FROM_TP>
> <MSG_RECPT>STATUS>&amp................</MSG_RECPT>STATUS>
> <MSG_RECPT>STATUS_MSG>....&amp................</MSG_RECPT>STATUS_MSG>
> <MSG_RECPT>TIMESTAMP>.....&amp...................</MSG_RECPT>TIMESTAMP>
> </ns1:Hub_Response>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> 
> 
>  
> > > ========================
> > > 
> > > Here's my server.wsdd entry:
> > > 
> > >         <service name="HUB_TO_HUB" provider="CPP:DOCUMENT"
> > > description="TVB Hub-to-Hub Service">
> > >                 <parameter name="allowedMethods" value="Hub_Request
> > > "/>
> > >                 <parameter name="className"
> > > value="/usr/local/axiscpp_deploy/lib/libhub2hub.so" />
> > >         </service>
> > > 
> > > Here's the wsdl:
> > > 
> > > <?xml version="1.0" encoding="utf-8"?>
> > > <wsdl:definitions
> > >    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> > >    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> > >    xmlns:s="http://www.w3.org/2001/XMLSchema"
> > >    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> > >    xmlns:tns="http://localhost/axis/HUB_TO_HUB"
> > >    xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
> > >    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
> > >    targetNamespace="http://localhost/axis/HUB_TO_HUB"
> > >    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
> > > 
> > >   <wsdl:types>
> > >     <s:schema elementFormDefault="qualified"
> > > targetNamespace="http://localhost/axis/HUB_TO_HUB">
> > >       <s:element name="Hub_Request" type="tns:HUB_IN" />
> > >       <s:complexType name="HUB_IN">
> > >         <s:sequence>
> > >           <s:element minOccurs="0" maxOccurs="1" name="TO_TP"
> > > type="s:string" />
> > >           <s:element minOccurs="0" maxOccurs="1" name="FROM_TP"
> > > type="s:string" />
> > >           <s:element minOccurs="0" maxOccurs="1" name="TO_HUB"
> > > type="s:string" />
> > >           <s:element minOccurs="0" maxOccurs="1" name="FROM_HUB"
> > > type="s:string" />
> > >           <s:element minOccurs="0" maxOccurs="1" name="UID"
> > > type="s:string" />
> > >           <s:element minOccurs="0" maxOccurs="1" name="APIKEY"
> > > type="s:string" />
> > >           <s:element minOccurs="0" maxOccurs="1" name="ROUTING"
> > > type="s:string" />
> > >           <s:element minOccurs="0" maxOccurs="1" name="MESSAGE"
> > > type="s:string" />
> > >         </s:sequence>
> > >       </s:complexType>
> > >     </s:schema>
> > >     <s:schema elementFormDefault="qualified">
> > >       <s:element name="Hub_Response" nillable="true"
> > > type="tns:MSG_RECPT" />
> > >       <s:complexType name="MSG_RECPT">
> > >         <s:sequence>
> > >           <s:element minOccurs="0" maxOccurs="1" name="UID"
> > > type="s:string" />
> > >           <s:element minOccurs="0" maxOccurs="1" name="TO_TP"
> > > type="s:string" />
> > >           <s:element minOccurs="0" maxOccurs="1" name="FROM_TP"
> > > type="s:string" />
> > >           <s:element minOccurs="0" maxOccurs="1" name="STATUS"
> > > type="s:string" />
> > >           <s:element minOccurs="0" maxOccurs="1" name="STATUS_MSG"
> > > type="s:string" />
> > >           <s:element minOccurs="0" maxOccurs="1" name="TIMESTAMP"
> > > type="s:string" />
> > >         </s:sequence>
> > >       </s:complexType>
> > >     </s:schema>
> > >   </wsdl:types>
> > > 
> > >   <wsdl:message name="Hub_RequestIn">
> > > 
> > >   <wsdl:message name="Hub_RequestIn">
> > >     <wsdl:part name="Hub_Request" element="tns:Hub_Request" />
> > >   </wsdl:message>
> > >   <wsdl:message name="Hub_RequestOut">
> > >     <wsdl:part name="Hub_Response" element="tns:Hub_Response" />
> > >   </wsdl:message>
> > > 
> > >   <wsdl:portType name="HUB_TO_HUB">
> > >     <wsdl:operation name="Hub_Request">
> > >       <wsdl:input message="tns:Hub_RequestIn" />
> > >       <wsdl:output message="tns:Hub_RequestOut" />
> > >     </wsdl:operation>
> > >   </wsdl:portType>
> > > 
> > >   <wsdl:binding name="HUB_TO_HUBSoap" type="tns:HUB_TO_HUB">
> > >     <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
> > > style="document" />
> > >     <wsdl:operation name="Hub_Request">
> > >       <soap:operation soapAction="HUB_TO_HUB#Hub_Request"
> > > style="document" />
> > >       <wsdl:input>
> > >         <soap:body use="literal" />
> > >       </wsdl:input>
> > >       <wsdl:output>
> > >         <soap:body use="literal" />
> > >       </wsdl:output>
> > >     </wsdl:operation>
> > >   </wsdl:binding>
> > > 
> > >   <wsdl:service name="HUB_TO_HUB">
> > >     <wsdl:port name="HUB_TO_HUB" binding="tns:HUB_TO_HUBSoap">
> > >       <soap:address location="http://localhost/axis/HUB_TO_HUB" />
> > >     </wsdl:port>
> > >   </wsdl:service>
> > > </wsdl:definitions>
> > > 
-- 
Samisa Abeysinghe <sabeysinghe@virtusa.com>
Virtusa Corporation
Mime
View raw message