axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <linesh.maha...@wipro.com>
Subject RE: Problem deserializing SOAP response in Axis C++ client
Date Fri, 05 Aug 2005 09:49:39 GMT

Hi Dushshantha,

Please find the attached wsdl.

When debugged AxisXmlParserXerces code with a xerces-c_2_6D.dll, it
stopped throwing exception like xerces-c_2_2_0.dll (the dll which I was
using earlier). However, getElementAsString() is now returning 0 value
after deserializing <result xsi:type="xsd:string">TEST</result>.

Some pointers -

In getElementAsString() function,  getXSDType() (SoapDeSerializer.cpp:
line # 3110) returns XSD_UNKNOWN. This ultimately results in returning 0
from getElementString (instead of "TEST").

At line # 3106 in SoapDeSerializer.cpp (m_pNode = m_pParser->next ())
the m_type of node pointer shows END_ELEMENT instead of expected
START_ELEMENT. This results in returning type as XSD_UNKNOWN.

Also, for some reason pElement->m_pchAttributes array also shows up
empty in getXSDType() function.


This seems to be a bug. If so, is there any work already done on it?


Thanks & regards,

Linesh


________________________________

From: Dushshantha Chandradasa [mailto:dchandradasa@virtusa.com]
Sent: Friday, August 05, 2005 1:08 PM
To: Apache AXIS C User List
Subject: RE: Problem deserializing SOAP response in Axis C++ client



Hi Linesh,



It would be better if you can attach the wsdl file you are using for
that then I can generate the client and test with MockServer.

And you can use MockServer for Client side testing. Please refer to
..\ws-axis\c\tests\auto_build\UnitTest_Readme.txt for more information.



Thanks,

Dushshantha

________________________________

From: linesh.mahadik@wipro.com [mailto:linesh.mahadik@wipro.com]
Sent: Friday, August 05, 2005 10:23 AM
To: axis-c-user@ws.apache.org
Subject: Problem deserializing SOAP response in Axis C++ client



Hi,



I am trying to communicate with a J2EE webservice running on Bea
Weblogic webserver 8.1 SP3. The client side has Axis C++. I am getting
error while reading the SOAP response sent by the webservice. The
exception occurs on calling getElementAsString function (after
checkMessage return successful, line 3105: at m_pNode = m_pParser->next
()).



The code is exactly similar to the one provided with C++ samples.

	 if (AXIS_SUCCESS != m_pCall->initialize(CPP_RPC_PROVIDER))
	   return *Ret;

	 if (NULL==m_pCall->getTransportProperty("SOAPAction",false))
	 {
	  m_pCall->setTransportProperty(SOAPACTION_HEADER ,
"ProductLookupService#lookupProduct");
	 }
	  m_pCall->setSOAPVersion(SOAP_VER_1_1);

	

	 setUsername("user");
	 setPassword("password");

	

	 m_pCall->setOperation("lookupProduct", "
http://localhost/distribution/webservices
<BLOCKED::http://localhost/distribution/webservices> ");
	 
	 applyUserPreferences();
	 m_pCall->addParameter((void*)lpParam, "xmlRequest",
XSD_STRING);
	 
	 if (AXIS_SUCCESS == m_pCall->invoke())

	 {

	  

	if(AXIS_SUCCESS==m_pCall->checkMessage("lookupProductResponse",
"http://www.cardinal.com/distribution/webservices
<BLOCKED::http://www.cardinal.com/distribution/webservices> "))
	{
	     char sTemp[1024]="";
	     sprintf(sTemp, m_pCall->getElementAsString("result", 0));
//**** EXCEPTION THROWN HERE***
	}
	

The response received is as below (Trapped using Mindreef SOAPScope).



Request sent (It sends an XML string in parameter "xmlRequest") -

	<?xml version='1.0' encoding='utf-8' ?>
	<SOAP-ENV:Envelope xmlns:SOAP-ENV="
http://schemas.xmlsoap.org/soap/envelope/
<BLOCKED::http://schemas.xmlsoap.org/soap/envelope/> "  xmlns:xsd="
http://www.w3.org/2001/XMLSchema
<BLOCKED::http://www.w3.org/2001/XMLSchema> " xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance
<BLOCKED::http://www.w3.org/2001/XMLSchema-instance> ">
	<SOAP-ENV:Body>
	<ns1:lookupProduct xmlns:ns1="
http://www.cardinal.com/distribution/webservices
<BLOCKED::http://www.cardinal.com/distribution/webservices> ">
	<xmlRequest xsi:type="xsd:string">

	<ciar:ProductLookupRequest xmlns:ciar="
http://ws.cardinal.com/2004/ProductLookupRequest_1_0.xsd"><ProductLookup
RequestHeader><TransactionId>AB1234CDEF1A3</TransactionId><ClientId>IVR<
/ClientId></ProductLookupRequestHeader><ProductLookupCriteriaList><Produ
ctLookupCriteria><ItemNumber>1</ItemNumber><ItemNumberType>NDC_UPC</Item
NumberType><ShipToCustomerNumber>475744</ShipToCustomerNumber><DivisionN
umber>11</DivisionNumber><Quantity>1</Quantity><UnitOfMeasure>EA</UnitOf
Measure></ProductLookupCriteria></ProductLookupCriteriaList></ciar:Produ
ctLookupRequest>
<BLOCKED::http://ws.cardinal.com/2004/ProductLookupRequest_1_0.xsd>

	</xmlRequest>
	</ns1:lookupProduct>
	</SOAP-ENV:Body>
	</SOAP-ENV:Envelope>

Rsposne received (Output parameter name is "result")-

<env:Envelope
    <BLOCKED::outbind://45/1.1@xmlns:env>
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    <BLOCKED::outbind://45/1.1@xmlns:xsi>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    <BLOCKED::outbind://45/1.1@xmlns:soapenc>
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    <BLOCKED::outbind://45/1.1@xmlns:xsd>
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<env:Body>
    <n1:lookupProductResponse <BLOCKED::outbind://45/1.1.1.1@xmlns:n1>
xmlns:n1="http://www.cardinal.com/distribution/webservices">
        <result xsi:type="xsd:string">TEST</result>
    </n1:lookupProductResponse>
</env:Body>
</env:Envelope>

Thanks in advance,

Linesh Mahadik



Confidentiality Notice

The information contained in this electronic message and any attachments
to this message are intended
for the exclusive use of the addressee(s) and may contain confidential
or privileged information. If
you are not the intended recipient, please notify the sender at Wipro or
Mailadmin@wipro.com immediately
and destroy all copies of this message and any attachments.





Confidentiality Notice

The information contained in this electronic message and any attachments to this message are
intended
for the exclusive use of the addressee(s) and may contain confidential or privileged information.
If
you are not the intended recipient, please notify the sender at Wipro or Mailadmin@wipro.com
immediately
and destroy all copies of this message and any attachments.
Mime
View raw message