Does axis2 suport following return type?
public Object[] returnObjectArray(String authToken) {
Object[] retVal = new Object[3];
Object[] args = new Object[3];
args[0] = new Object[] {"Arg1", "Arg2", "Arg3"};
args[1] = new Object[] {"Arg1", "Arg2", "Arg3"};
args[2] = new Object[] {"Arg1", "Arg2", "Arg3"};
retVal[0] = new Object[] {"RetVal1", "Retval2", authToken, args};
retVal[1] = new Object[] {"RetVal3", "Retval4", authToken, args};
retVal[2] = new Object[] {"RetVal5", "Retval6", authToken, args};
return retVal;
}
Chinmoy
On Thu, Mar 20, 2008 at 1:17 PM, Chinmoy Chakraborty <[EMAIL PROTECTED]>
wrote:
> Thanks a lot Deepal for your reply. I have a made a test service that
> returns an object array. I can see the correct SOAP through the SOAPMonitor
> (that Axis2 is returning) but in axis 1.4 client I am getting following
> exception:
>
> 23938 ERROR [http8080-Processor23] org.apache.axis.client.Call
> - Exception:
> org.xml.sax.SAXException: Found character data inside an array element
> while deserializing
> at org.apache.axis.encoding.ser.ArrayDeserializer.characters(
> ArrayDeserializer.java:502)
> at org.apache.axis.encoding.DeserializationContext.characters(
> DeserializationContext.java:966)
> at org.apache.axis.message.SAX2EventRecorder.replay(
> SAX2EventRecorder.java:177)
> at org.apache.axis.message.MessageElement.publishToHandler(
> MessageElement.java:1141)
> at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:345)
> at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
> at org.apache.axis.client.Call.invoke(Call.java:2467)
> at org.apache.axis.client.Call.invoke(Call.java:2366)
> .........................
>
> How can resolve above issue?
>
> Chinmoy
>
> On Wed, Mar 19, 2008 at 7:43 PM, Deepal jayasinghe <[EMAIL PROTECTED]>
> wrote:
>
> > Yes Axis2 support Object arrays. The error may be due to some issue in
> > your code , however we can help you to fix that if you can send us the
> > code or create a JIRA attaching test code.
> >
> > Thank you!
> > Deepal
> > > Hi All,
> > >
> > > I am using hitting Axis2 with axis 1.4 client. I have a service which
> > > returns Object[].
> > >
> > > With axis 1.4 in both ends it worked well. But in axis2 it gives
> > > Nullpointer exception when the service tried to return Object[]
> > > (object array).
> > >
> > > Does axis2 support object array as return type? If yes then how can I
> > > make it work with old axis1.4 client? its necessary to support old
> > > axis1.4 because lots of our customers are using axis1.4 client and we
> > > need to make it backward compatible.
> > >
> > > Chinmoy
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>