axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ajay Kumar Gour" <aja...@s7solutions.com>
Subject How to get return value..
Date Sat, 02 Jun 2007 14:30:47 GMT
Hi,

I want to fetch the return value from the response of the web service  
method. Iam using asynchronous web service calls.

This is the SoapEnvelope which i get in AsynResult argument of onComplete  
method.

<?xml version='1.0' encoding='utf-8'?>

<soapenv:Envelope  
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
	<soapenv:Header />
	<soapenv:Body>
		<ns:notifySuccessResponse  
xmlns:ns="http://superconnector.panoptica.com/xsd">
			<ns:return>4009</ns:return>
		</ns:notifySuccessResponse>
	</soapenv:Body>
</soapenv:Envelope>


This is the implementation of onComplete method.

	public void onComplete(AsyncResult result) {
		Iterator itr = result.getResponseEnvelope().getBody().getChildElements();
		while (itr.hasNext()) {
			Object temp = itr.next();
			System.out.println("Attribute : " + temp);
			OMElement element = (OMElement) temp;
			Iterator elementItr = element.getChildElements();
			while (elementItr.hasNext()) {
				OMElement returnElement = (OMElement) elementItr.next();
				System.out.println("Attributes of child : " + returnElement);
				System.out.println("Attribute Value : " + returnElement.
                                            getAttributeValue(returnElement.getQName()));
			}
		}

Its giving me null value. Iam pretty new to SOAP and Axis2. Please tell me  
what mistake iam making here.

-Thanks,
Ajay

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message