axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "florian pitschi (JIRA)" <axis-...@ws.apache.org>
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
         URL: http://issues.apache.org/jira/browse/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="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>
  <ObjnachString xmlns="http://db.bioinfo.rzg.mpg.de">
   <SimpleInfo_1 xmlns="">
    <intProperty>777</intProperty>
    <stringArrayProperty soapenc:arrayType="xsd:string[3]" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
     <item>25</item>
     <item>42</item>
     <item>usw</item>
    </stringArrayProperty>
    <stringProperty>janein</stringProperty>
   </SimpleInfo_1>
  </ObjnachString>
 </soapenv:Body>
</soapenv:Envelope>


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

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

QName operation = new QName("ObjnachString");
        Call call = service.createCall(port, operation);
   
        call.setProperty(Call.SOAPACTION_USE_PROPERTY,
        new Boolean(true));
        call.setProperty(Call.SOAPACTION_URI_PROPERTY, "");
        call.setProperty(ENCODING_STYLE_PROPERTY, ""); // literal!
        call.setProperty(Call.OPERATION_STYLE_PROPERTY, "rpc");
        call.setTargetEndpointAddress("http://localhost:7000/seqref/seqref/SeqReferenceInfo");

        SimpleInfo request = new SimpleInfo();
        request.setStringArrayProperty(new String[] {"25","42","usw"});
        request.setIntProperty(777);
        request.setStringProperty("janein");
                
        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:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message