OK, I think I see my mistake. The SOAP response sent by the
webservice has character entities (< and >) instead of "<"
& ">" in its xml tags.
Thus the line
<result
xsi:type="xsd:string">TEST</result>
is actually -
<result
xsi:type="xsd:string">TEST</result>
SOAP
Response from webservice
<env:Envelope
xmlns:env = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc = "http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd = "http://www.w3.org/2001/XMLSchema"> <env:Body> <n1:lookupProductResponse xmlns:n1 = "http://www.cardinal.com/distribution/webservices"><result xsi:type="xsd:string">TEST</result></n1:lookupProductResponse> </env:Body> </env:Envelope> Any
idea how to enable parsing of character entity tags as xml
nodes in Axis C++ (actually xerces 2.6) client?
There
is a function setCreateEntityReferenceNodes(bool) mentioned axis docs (%AXIS_EXTRACT%/xerces-c_2_6_0-windows_nt-msvc_60/doc/html/apiDocs/classAbstractDOMParser.html#z452_5),
can this be used in this case?
Thanks,
Linesh
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, August 05, 2005 3:20 PM To: axis-c-user@ws.apache.org Subject: RE: Problem deserializing SOAP response in Axis C++ client 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:[EMAIL PROTECTED] 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:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 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.
The response received is as below
(Trapped using Mindreef SOAPScope). Request sent (It sends an XML string
in parameter "xmlRequest") -
Rsposne received (Output parameter
name is "result")- <env:Envelope Thanks in
advance, Linesh Mahadik
|
- Problem deserializing SOAP response in Axis C++ cl... linesh.mahadik
- RE: Problem deserializing SOAP response in Ax... Dushshantha Chandradasa
- RE: Problem deserializing SOAP response in Ax... linesh.mahadik
- RE: Problem deserializing SOAP response in Ax... linesh.mahadik
- Re: Problem deserializing SOAP response i... Samisa Abeysinghe