axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Volkmann" <>
Subject difference in user guide request and actual
Date Sun, 27 Jan 2002 16:32:50 GMT
I'm trying to run the basic sample in the "Consuming Web Services" section
of the user's guide. Here is my code. I had to modify it slightly since
apparently you are no longer supposed to set the web service namespace by
calling call.setProperty(). If this is true then the user's guide needs to
be updated.

import javax.xml.rpc.namespace.QName;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;

public class Sample {
    private static final String ENDPOINT =

    public static void main(String [] args) throws Exception {
        Service service = new Service();
        Call call = (Call) service.createCall();
        call.setOperationName(new QName("",
        String ret = (String) call.invoke(new Object[] {"Hello!"});
        System.out.println("Sent 'Hello!', got '" + ret + "'");

When I run this I get

org.xml.sax.SAXException: Deserializing parameter 'arg0':  could not
find deserializer for type

The user's guide says the that the request sent should look like this.

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:xsd=""

    <ns1:echoString xmlns:ns1="">
      <arg0 xsi:type="xsd:string">Hello!</arg0>

When I use tcpmon I see that the request actually sent is

<?xml version="1.0" encoding="UTF-8"?>
  <ns1:echoString xmlns:ns1="">
   <arg0 xsi:type="SOAP-ENC:string"

The difference is the SOAP-ENV:encodingStyle and the attributes on arg0.
Again, apparently the user's guide needs to be updated.

I'd appreciate any suggestions for how to get this basic example to work.

View raw message