I
itsprabhu
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().getALogin()); // 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().getFirstOMChild(); but how to
get thro getALogin(); Any typecast i need to do?
Can anyone help .
Thanks in advance.
prabhu
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().getALogin()); // 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().getFirstOMChild(); but how to
get thro getALogin(); Any typecast i need to do?
Can anyone help .
Thanks in advance.
prabhu