You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Jens Viebig <jv...@como.com> on 2003/01/27 18:02:09 UTC

Trying to get response

I'm trying to call a SOAP method on a python server, which is developed by
an other person-
Why can't Axis get the return value of the method ?

This is my code:
      Service  service = new Service();
      Call call = (Call)service.createCall();
      call.setTargetEndpointAddress("http://"+server+":"+port+"/");
      call.setOperationName("mymethod");
      String ret = (String)call.invoke(new Object[] { "myvalue" });
      log.debug("Return Value is : "+ret);
      org.apache.axis.Message m = call.getResponseMessage();
      java.io.ByteArrayOutputStream out = new
java.io.ByteArrayOutputStream();
      m.writeTo(out);
      log.debug("Message:\n "+ out.toString());

This is the output of my code:

Return Value is : null
Message:
<?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:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<addclipResponse xsi:type="xsd:dict" SOAP-ENC:root="1">{'Result':
200}</addclipResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Regards
Jens Viebig