You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by Dan Labrecque <la...@us.ibm.com> on 2004/02/02 13:51:18 UTC
RE: WebSphere Interop problems (Array types)
Hi Ismael,
thanks for your response. However it seems as if the problem you
encountered and fixed is different from the problem I am having with Axis
C++.
I was able to get the calculator method to work. In fact all web service
method calls with base types (e.g. int, string, float) are working
successfully for me. The problem I am having is with web service method
calls involving array types.
For example, here is the flow for the Interop echoStringArray call. Axis
C++ responds with a non-fault SOAP message but with no results in the
response. The same is true for echoIntArray and echoFloatArray. The method
calls for the base types are successful (e.g. echoString, echoInt,
echoFloat), but all the echo***Array calls fail the same way.
****** (1) Interop base test - echoStringArray Request WSAD->Axis******
POST /axis/InteropBase HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: IBM WebServices/1.0
Host: localhost
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: "InteropBase"
Content-Length: 726
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body
soapenc:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<echoStringArray xmlns="http://soapinterop.org/">
<inputStringArray xsi:type="soapenc:Array"
soapenc:arrayType="xsd:string[2]"
xmlns:ns-73742416="http://soapinterop.org/xsd" xmlns="">
<item>This is the 0(st/nd/rd/th) string</item>
<item>This is the 1(st/nd/rd/th) string</item>
</inputStringArray>
</echoStringArray>
</soapenv:Body>
</soapenv:Envelope>
****** echoStringArray Response Axis->WSAD******
HTTP/1.1 200 OK
Date: Tue, 27 Jan 2004 19:16:08 GMT
Server: Apache/1.3.28 (Win32)
Content-Length: 362
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:echoStringArrayResponse
xmlns:ns1="http://soapinterop.org/">
</ns1:echoStringArrayResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
"Mirabile, Ismael" <Is...@turner.com>
01/30/2004 04:49 PM
Please respond to
"Apache AXIS C User List"
To
Apache AXIS C User List <ax...@ws.apache.org>
cc
Subject
RE: WebSphere Interop problems (Array types)
Hi Dan,
I've gone through the code and found out a couple of things that break
the result.
This is what I have done:
I've used the same InteropBase sample application and modified it a
little bit to target a Calculator service that I deployed on Axis java
running on Apache. The Axis c++ deployed always gave me the resonse
"Service not registered at this server".
This is what the packets flowing forth a back according to TCPMonitor
look like:
*** Request ***
POST /tgn-services/services/Calculator HTTP/1.1
Host: shadow.turner.com
Content-Type: text/xml; charset="utf-8"
SOAPAction: "Calculator#add"
Content-Length: 541
<?xml version="1.0" encoding="utf-8" ?>
<SOAP-ENV:Envelope
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
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:add xmlns:ns1="
http://shadow.turner.com:8080/tgn-services/services/Calculator">
<a xsi:type="xsd:int">7</a>
<b xsi:type="xsd:int">7</b>
</ns1:add>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
*** Response ***
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Transfer-Encoding: chunked
Date: Thu, 29 Jan 2004 23:14:06 GMT
Server: Apache Coyote/1.0
1f9
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns1:addResponse soapenv:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="
http://shadow.turner.com:8080/tgn-services/services/Calculator">
<ns1:addReturn xsi:type="xsd:int">14</ns1:addReturn>
</ns1:addResponse>
</soapenv:Body>
</soapenv:Envelope>
0
This is what I had to do to make it work:
* There was a problem here at SoapSerializer.cpp(597). The code
"pParam->m_Value.pStrValue = *((char**)(pValue));" that prevented the
parameters from getting serialized. I've replace it with:
"pParam->m_Value.pStrValue = reinterpret_cast<char*>(pValue);"
* The odd sequence of characters "1f9 " (apparently code generated from
Apache or perhaps the Axis java?) in the begining of the response envelope
breaks the parser. I patched it in the Receiver.cpp(98) with the code
"m_pMsg+=5;" to shift the pointer address;
* The most problematic thing I'm still looking at is that the linefeed
coming within the response get added as elements in the XMLParser and
break the parsing in the soapdeserealization during the
SoapParserExpat::Next(). The solution seems to be stripping those
linefeed chars from the response before parsing;
I've tried to keep track of everything I did but might have missed a
thing or two. However, as far as I can remember this code seems solid and
I had to make only minor environment changes to compile using VC7.
Ismael
-----Original Message-----
From: Dan Labrecque [mailto:labrec@us.ibm.com]
Sent: Friday, January 30, 2004 10:28 AM
To: axis-c-user@ws.apache.org
Subject: WebSphere Interop problems (Array types)
I am testing basic interoperability between WebSphere Studio Application
Developer (WSAD) V5.1.1 and Axis C++ 1.0.
I successfully installed Axis C++ with Apache 1.3.28 on Win2000, and
successfully tested InteropBase tests between generated Axis C++ Client
and generated InteropBase.dll web service.
I then imported the InteropBase.wsdl into WSAD V5.1.1 and generated
corresponding web service client and web service and successfully tested
this within WSAD.
My primary intention is to test interoperability between WebSphere client
to Axis C++ web service. When I point the WSAD client to the Axis C++ web
service, the echo methods specifying basic types (e.g. integer, string,
float) are successful, but *all* echo methods specifying array types fail
with the Axis C++ container returning back a vaild SOAP response (i.e.
not a SOAP Fault) but with no return elements in the respose.
I have captured the message flows (using the WSAD TCP/IP monitor server)
for three cases - echoStringArray, echoIntegerArray, and echoFloatArray.
All of the results are the same, a SOAP response with no elements
returned. Could anyone tell why this is not working - my intention is to
fully get the Interop tests successful between WebSphere clients and Axis
C++ web services.
Thanks and Best Regards,
Dan