Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Handling Response in Axis2

Thread Tools

Handling Response in Axis2
Posts: n/a
Hi all . I used Axis2 to convert my wsdl to java . I used the
following sample pgm which actually uses the generated java files to
invoke a method frm a webservice.

sample pgm:

ALogin AL = ALogin.Factory.newInstance();
onnectionServiceStub stub = new
ServiceClient sc = stub._getServiceClient();

LoginDocument.Login LR =
LR.setALogin( AL);
LoginDocument requestDoc =
//call the method
ResponseDocument response
System.out.println(response.getResponse()); // Working

System.out.println(response.getResponse().getALogi n()); // Not

Response contains:
<m:Response xmlns:m=""><ALogin
id="10532" mask="-1"/></m:Response>

When i use response.getResponse() o/p is
<xml-fragment xmlns:m="" xmlns:SOAP-
<AesBusinessSession id="10532" mask="-1"/>

But when i use response.getResponse().getALogin(); o/p is null

i can able to access thro
response.getBody().getFirstElement().getFirstOMChi ld(); but how to
get thro getALogin(); Any typecast i need to do?

Can anyone help .

Thanks in advance.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache Axis2 - org.apache.axis2.AxisFault: Transaction not active Michael Post Java 5 08-22-2009 09:33 PM
SOAP - Axis2 response message (multiple part) element "XML withinXML" milesd Java 2 10-04-2008 10:23 AM
Retrieving Response from webservice in Axis2 Java 0 02-02-2007 12:26 PM
How serializable object with apache axis2 fxwolf via Java 0 04-29-2006 07:29 AM
axis2 why? Java 0 12-30-2005 02:23 PM