You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Meet <mi...@netreachasia.com> on 2010/09/29 10:09:50 UTC
AXIS2- ArrayList Conversion Issue from OMTextImpl
Hi Friends,
I need little help here.
I have created webservice using AXIS2-Eclipse Plugin. Here is sample code.
public ArrayList getWorkIntNo(String title){
ArrayList arrayList = new ArrayList();
arrayList.add( 1 );
arrayList.add( 2 );
return arrayList;
}
This service is deployed on weblogic 10. I am calling this service from java
client with the following code.
RPCServiceClient serviceClient = new RPCServiceClient();
Options options = serviceClient.getOptions();
EndpointReference targetEPR = new
EndpointReference("http://localhost:7001/axis2/services/WorkRetrievalService");
options.setTo(targetEPR);
QName qname = new QName("http://webservices.nr.cm",
"getWorkIntNo");
Object[] args = new Object[] { };
Class[] types = new Class[] { ArrayList.class };
Object[] response = serviceClient.invokeBlocking(qname,args,types);
ArrayList al = (ArrayList) response[0];
for (int i=0; i<al.size(); i++){
System.out.println(al.get(i));
}
All the time i am getting output as
org.apache.axiom.om.impl.llom.OMTextImpl@*****
instead of real values of arraylist.
Is there anything wrong with this code?
I tried to generate WSDL from JAVA WEB SERVICE using AXIS2-Eclipse plugin.
Here it is.
<xs:element name="getWorkIntNoResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return"
nillable="true" type="xs:anyType"/>
</xs:sequence>
</xs:complexType>
</xs:element>
Regards,
Meet
--
View this message in context: http://old.nabble.com/AXIS2--ArrayList-Conversion-Issue-from-OMTextImpl-tp29836126p29836126.html
Sent from the Axis - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org