axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rahul Kulkarni" <Rahul.Kulkar...@symphonysv.com>
Subject How to propagate error codes or exceptions in Axis?
Date Tue, 17 Feb 2009 15:28:37 GMT
Hi All,

 

I am a new user of java client side Axis (not Axis2) and would like to
know - is there a way by which we can propagate error codes or
exceptions from server side to Axis client.

 

The call I am making from client looks something like this:

 

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> 

oper = new org.apache.axis.description.OperationDesc();

        oper.setName("MyMethod");

        oper.setReturnType(new
javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema",
"boolean"));

        oper.setReturnClass(boolean.class);

        oper.setReturnQName(new javax.xml.namespace.QName("",
"param-1"));

        oper.setStyle(org.apache.axis.constants.Style.RPC);

        oper.setUse(org.apache.axis.constants.Use.ENCODED);

            

org.apache.axis.client.Call _call = createCall();

            _call.setOperation(oper);

            _call.setUseSOAPAction(true);

            _call.setSOAPActionURI("");

 
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS
);

            _call.setOperationName(new
javax.xml.namespace.QName("http://localhost/MyWsdl.wsdl", "MyMethod"));

 

 

            setRequestHeaders(_call);

            setAttachments(_call);

            try {        

                        java.lang.Object _resp = _call.invoke(new
java.lang.Object[] {});

 

                        if (_resp instanceof java.rmi.RemoteException) {

                                    throw
(java.rmi.RemoteException)_resp;

                        }

                        else {

                                    extractAttachments(_call);

                                    try {

                                                return
((java.lang.Boolean) _resp).booleanValue();

                                    } catch (java.lang.Exception
_exception) {

                                                //

                                    }

                        }

            } catch (org.apache.axis.AxisFault axisFaultException) {

                        throw axisFaultException;

            }

 

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>> 

 

Any help/pointers would be highly appreciated.

 

Thanks and Regards,

// Rahul

"This email and any files transmitted with it contain confidential, proprietary, 
privileged information of Symphony Services Corp (India) Pvt. Ltd. and are intended 
solely for the use of the recipient/s to whom it is addressed. Any unauthorized 
notifying, copying or distributing of this e-mail, directly or indirectly, and the 
contents therein in full or part is prohibited by any entity who is not a recipient. 
Any email received inadvertently or by mistake should be deleted by the entity who 
is not a recipient thereof. You may be pleased to notify the sender immediately by 
email and the email should be deleted from your system".

Mime
View raw message