Velocity Reviews - Computer Hardware Reviews

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

Reply
Thread Tools

Handling Response in Axis2

 
 
itsprabhu@gmail.com
Guest
Posts: n/a
 
      02-12-2007
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
ConnectionServiceStub();
ServiceClient sc = stub._getServiceClient();

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

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

Response contains:
<m:Response xmlns:m="http://www.csaxo.com/location/xsd"><ALogin
id="10532" mask="-1"/></m:Response>

When i use response.getResponse() o/p is
<xml-fragment xmlns:m="http://www.csaxo.com/location/xsd" xmlns:SOAP-
ENV="http://schemas.xmlsoap.org/soap/envelope/">
<AesBusinessSession id="10532" mask="-1"/>
</xml-fragment>

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.
prabhu

 
Reply With Quote
 
 
 
Reply

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 itsprabhu@gmail.com Java 0 02-02-2007 12:26 PM
How serializable object with apache axis2 fxwolf via JavaKB.com Java 0 04-29-2006 07:29 AM
axis2 why? marcodepe@tiscali.it Java 0 12-30-2005 02:23 PM



Advertisments