axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "florian pitschi (JIRA)" <>
Subject [jira] Created: (AXIS-2117) RPC-Literal encoding not supported?
Date Thu, 14 Jul 2005 07:41:14 GMT
RPC-Literal encoding not supported?

         Key: AXIS-2117
     Project: Apache Axis
        Type: Bug
  Components: Serialization/Deserialization  
    Versions: 1.2    
    Reporter: florian pitschi

When I try to send rpc/literal messages, Arrays of simple type (in Beans) and Arrays of complex
types are sent rpc/encoded. Simple attributes in beans are encoded correctly. Is this a bug
or am I not using the call-obj correctly (see client code below)?

For example: I have a Bean called SimpleInfo, containing a String stringProperty, an int intProperty
and and String[] stringArrayProperty. The ws-method ObjnachString takes a SimpleInfo and converts
it into a string. The SOAP-Request created by the client (using axis 1.2) is:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="" xmlns:xsd=""
  <ObjnachString xmlns="">
   <SimpleInfo_1 xmlns="">
    <stringArrayProperty soapenc:arrayType="xsd:string[3]" xmlns:soapenc="">

So the stringArrayProperty is encoded instead of literal! My client code is:

// ... (create serviceobj) ...
TypeMappingRegistry registry = service.getTypeMappingRegistry();
TypeMapping typemappingLIT = registry.getTypeMapping("");
	        		       new BeanSerializerFactory(SimpleInfo.class, simpleinfoQNAME),
				       new BeanDeserializerFactory(SimpleInfo.class, simpleinfoQNAME));

QName operation = new QName("ObjnachString");
        Call call = service.createCall(port, operation);
        new Boolean(true));
        call.setProperty(Call.SOAPACTION_URI_PROPERTY, "");
        call.setProperty(ENCODING_STYLE_PROPERTY, ""); // literal!
        call.setProperty(Call.OPERATION_STYLE_PROPERTY, "rpc");

        SimpleInfo request = new SimpleInfo();
        request.setStringArrayProperty(new String[] {"25","42","usw"});
        Object[] params = {request};

        String response = (String) call.invoke(params);

Thanks for your help.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message