axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "florian pitschi (JIRA)" <>
Subject [jira] Commented: (AXIS-2117) RPC-Literal encoding not supported?
Date Fri, 15 Jul 2005 10:22:10 GMT
    [ ] 

florian pitschi commented on AXIS-2117:

I used wsdl2java, and think a static stub class is created.
public class SeqReferenceInfoEndpointBindingStub extends org.apache.axis.client.Stub

Unfortunately, I am trying to use a DII-Client.
Nevertheless, I read the code and found out that a lot of properties are set using a Call
object (_call).

In the method createCall(), the _call object is created with

org.apache.axis.client.Call _call = super._createCall();

So this code can't be used for a DII client - can it? (because super.(x) will call the constructor
from org.apache.axis.client.Stub... :-( ) ?

The invocations of the operations are all made using this object, like

     org.apache.axis.client.Call _call = createCall();
        _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
        _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
        _call.setOperationName(new javax.xml.namespace.QName("",

 try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] ...

Can you tell me how to get the DII client running - perhaps there is a tutorial somewhere
(how to create the servicefactory, service and call object and how to set the properties correctly)?
I am more familiar with the javax.xml.rpc.* ... perhaps there is a easier solution with these

> RPC-Literal encoding not supported?
> -----------------------------------
>          Key: AXIS-2117
>          URL:
>      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=""
>  <soapenv:Body>
>   <ObjnachString xmlns="">
>    <SimpleInfo_1 xmlns="">
>     <intProperty>777</intProperty>
>     <stringArrayProperty soapenc:arrayType="xsd:string[3]" xmlns:soapenc="">
>      <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:
For more information on JIRA, see:

View raw message