response-object not filled with data from web service response message

response-object not filled with data from web service response message

  
Hi,

I am trying to use an Axis web service that I created with another tool. After some minor changes in the wsdl. I am able to call the web service correctly from the outsystems platform (version 5). However I do not get any return-values in the response-object. I put a tcp-monitor between outsystems and my axis web service and the request and response messages (see below) look alright to me.

Also when I a test the web service with soapUI (java web service test tool ) everythings works correct.

Any idea what might be wrong? Is there a place in the outsystems platform where I can check the handling of the response object?

Regards,

Peter Braat

Request Message Data:

POST /genws/services/Calculator HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 2.0.50727.3603)
Content-Type: text/xml; charset=utf-8
SOAPAction: "Calculator"
Host: 192.168.178.26:8081
Content-Length: 571
Connection: Keep-Alive

<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><WebserviceCalculator xmlns="Calculator"><request command="" clientId="" clientPassword="" nextLocation="" exitState="0" dialect="" comCfg="" serverLocation="" servletPath="" fileEncoding="" tracing="false"><ImportCalc><Value1>10</Value1><Value2>20</Value2><Operator>+</Operator></ImportCalc></request></WebserviceCalculator></soap:Body></soap:Envelope>

Response Message Data:

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-Powered-By: Servlet 2.4; JBoss-4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)/Tomcat-5.5
Content-Type: text/xml;charset=utf-8
Transfer-Encoding: chunked
Date: Wed, 25 Nov 2009 18:47:14 GMT
1f6
<?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><WebserviceCalculator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<response command="" exitState="0" exitStateMsg="" exitStateType="OK">
<ResultCalc>
<Result>30</Result>
</ResultCalc>
</response>
</WebserviceCalculator></soapenv:Body></soapenv:Envelope>
0

Hi Peter,

 

Please submit this information to support@outsystems.com. They'll be happy to know about it.

 

Regards,

Pedro

After a few in depth analysis we come to the conclusion that the problem lies in the way AXIS2 is sending the response.
AXIS2 sends its response by default "chunked"

A simple change in AXIS2.xml should fix this:
view this http://wso2.org/library/209

However there is a way to read chuncked response in .NET,
view this: http://stackoverflow.com/questions/16998/reading-chunked-response-with-httpwebresponse (thanks Joost)

So it should be possible for OutSystems to read the chunked response.
Hi Joop,

Thank you very much for your feedback.

In case you are not able to change the Axis web service (or it is for some reason hard to change), you also have to option of creating an OutSystems extension that invokes the Axis web service in C# (using the technique you described). The web service actions could be made available as simple extensions actions to the OutSystems eSpaces.

Again, thanks you for your analysis.

Best Regards,

Daniel Lourenço
OutSystems
Is there any news on solving this issue ?
I've been visiting a (big) prospect in Portugal which faces the same problem ?

The webservice works in soapUI, so should be correct.
It should not be impossible to solve this IMHO.
Hi Peter,

Seems to me that this has nothing to do with the encoding...
If you notice the wsdl, at line 87, it states that the response should be a WebserviceCalculatorResponse
<message name="WebserviceCalculatorOut">
      <part element="typens:WebserviceCalculatorResponse" name="WebserviceCalculator"/>
   </message>

(the "name" attribute has no semantic, it is just to distinguish between several <part>s in the same <message>)
which is defined at line 56 as <xsd:element name="WebserviceCalculatorResponse">...

From your trace, the service response contains a WebserviceCalculator instead of a WebserviceCalculatorResponse
...<soapenv:Body>
  <WebserviceCalculator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 
    <response command="" exitState="0" exitStateMsg="" exitStateType="OK"> 
      ...

In this case, that represents a completely different type, that neither the platform (nor .Net - via Visual Studio - or Java - via Eclipse) are able to "deserialize" to objects.

I'd ask you to check with the service provider this inconsistency and ask them to change the response to match the wsdl (or vice-versa).
Otherwise the only way to do it would be issuing a POST request and parsing the resulting response using the Xml extension...

We've had this problem recently with a prospect, and they realized the service was wrong and changed it. They also had the chunked encoding, but that was no reason for any problem. By changing the service response (and keeping the chunked encoding) everything worked out fine.

Wanna give it a try?

Goncalo,

You were right. The WSDL is not correct !
We've changed it and now got it to work.

There was also a "typens" missing ...

Now it's over to CA to fix it :-)

Thanks all for helping out.