axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yadav, Yogendra \(IT\)" <>
Subject RE: [Axis2] Converting an OMElement into an Array of Objects
Date Tue, 09 Jan 2007 17:16:01 GMT
what is the exception ?


From: Sven Schroebler [] 
Sent: Tuesday, January 09, 2007 12:04 PM
Subject: [Axis2] Converting an OMElement into an Array of Objects

Hi All,


I am quite new to Axis2 and I am trying to develop a webservice for an
existing webapplication.

So far I managed to set up a basic webservice that transfers JavaBeans
(e.g. "UserDesktopBean") and it possible to access all of the simple
data types from the client application. Unfortunately, even after
reading multiple AXIOM tutorials, I don't know how to correctly work
with the JavaBeans nested inside the "UserDesktopBeans" that need to be
transferred as via AXIOM OMElement-wrapping.



At this time I use the following code to return an array of Objects as
an OMElement:



//Converting an ArrayList to Array

Object[] budlist = buddies.toArray();


QName budQName = new

OMElement omElementBUD = BeanUtil.getOMElement(budQName, budlist, null,
false, null);


//Setting the OMElement in the UserDesktopBean






//here I am trying to transform the array back 

OMElement _buddies = benutzer.getBuddies();

ObjectSupplier os = new AxisService().getObjectSupplier();

Object[] budlist=new

Object[] buddies = BeanUtil.deserialize(_buddies,budlist,os);


//here I am trying to access the first array element

HerbieWSStub.HerbieObjectDesktopBean buddies1 =
(HerbieWSStub.HerbieObjectDesktopBean) buddies[0];



Trying to access the array leads to an Exception at this time.



I would really appreciate, if you could help me with this problem.


For a better understanding of the underlying webservice, I've attached
the UserDesktopBean, the WSDL-File and the services.xml


Best Regards,

NOTICE: If received in error, please destroy and notify sender. Sender does not intend to
waive confidentiality or privilege. Use of this email is prohibited when received in error.

View raw message