You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Na Wang (JIRA)" <ji...@apache.org> on 2006/12/06 02:50:21 UTC

[jira] Created: (AXIS2-1831) There is a bug in generated stub, it can not get AxisFault detail or reason when server side respond with an envelope that has fault string and fault detail

There is a bug in generated stub, it can not get AxisFault detail or reason when server side respond with an envelope that has fault string and fault detail
------------------------------------------------------------------------------------------------------------------------------------------------------------

                 Key: AXIS2-1831
                 URL: http://issues.apache.org/jira/browse/AXIS2-1831
             Project: Apache Axis 2.0 (Axis2)
          Issue Type: Bug
         Environment: window
            Reporter: Na Wang
            Priority: Critical


There is a bug in generated stub, when server send a fault SOAP envelope, the generated sub couldn't get the AxisFault detail and reason, it only get the faultString. So AXIS2 client has no way of knowing the server side fault detail or reason.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] Commented: (AXIS2-1831) There is a bug in generated stub, it can not get AxisFault detail or reason when server side respond with an envelope that has fault string and fault detail

Posted by "Glen Daniels (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-1831?page=comments#action_12456167 ] 
            
Glen Daniels commented on AXIS2-1831:
-------------------------------------

Hi Na:

Unfortunately, this bug report really doesn't help us much. :(  Is this a problem with *every* generated stub, or just a particular one?  Could you post a small WSDL/Stub test case that demonstrates the problem (a service with one operation which generates a fault, and a client with a test)?

Thanks,
--Glen


> There is a bug in generated stub, it can not get AxisFault detail or reason when server side respond with an envelope that has fault string and fault detail
> ------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-1831
>                 URL: http://issues.apache.org/jira/browse/AXIS2-1831
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>         Environment: window
>            Reporter: Na Wang
>            Priority: Critical
>
> There is a bug in generated stub, when server send a fault SOAP envelope, the generated sub couldn't get the AxisFault detail and reason, it only get the faultString. So AXIS2 client has no way of knowing the server side fault detail or reason.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] Commented: (AXIS2-1831) There is a bug in generated stub, it can not get AxisFault detail or reason when server side respond with an envelope that has fault string and fault detail

Posted by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-1831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12522974 ] 

Amila Chinthaka Suriarachchi commented on AXIS2-1831:
-----------------------------------------------------

is this bug still exitsts? if so please attach your wsdl.

> There is a bug in generated stub, it can not get AxisFault detail or reason when server side respond with an envelope that has fault string and fault detail
> ------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-1831
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1831
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>         Environment: window
>            Reporter: Na Wang
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Critical
>
> There is a bug in generated stub, when server send a fault SOAP envelope, the generated sub couldn't get the AxisFault detail and reason, it only get the faultString. So AXIS2 client has no way of knowing the server side fault detail or reason.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (AXIS2-1831) There is a bug in generated stub, it can not get AxisFault detail or reason when server side respond with an envelope that has fault string and fault detail

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-1831?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Davanum Srinivas updated AXIS2-1831:
------------------------------------

    Assignee: Deepal Jayasinghe

> There is a bug in generated stub, it can not get AxisFault detail or reason when server side respond with an envelope that has fault string and fault detail
> ------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-1831
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1831
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>         Environment: window
>            Reporter: Na Wang
>         Assigned To: Deepal Jayasinghe
>            Priority: Critical
>
> There is a bug in generated stub, when server send a fault SOAP envelope, the generated sub couldn't get the AxisFault detail and reason, it only get the faultString. So AXIS2 client has no way of knowing the server side fault detail or reason.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (AXIS2-1831) There is a bug in generated stub, it can not get AxisFault detail or reason when server side respond with an envelope that has fault string and fault detail

Posted by "Na Wang (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-1831?page=comments#action_12456266 ] 
            
Na Wang commented on AXIS2-1831:
--------------------------------

Every generated stub and every operation.
Here is the code:
-------------------------------------------
try{
               org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[11].getName());
              _operationClient.getOptions().setAction("");
              _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);             
              // create SOAP envelope with that payload
              org.apache.axiom.soap.SOAPEnvelope env = null;                             
                                                 env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),
                                                param52,
                                                optimizeContent(new javax.xml.namespace.QName("",
                                                "readPInstance")));                                            
        // create message context with that soap envelope
        org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext() ;
        _messageContext.setEnvelope(env);

        // add the message contxt to the operation client
        _operationClient.addMessageContext(_messageContext);

        //execute the operation client
        _operationClient.execute(true);
       
               org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(
                                           org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);
                org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();
                                     java.lang.Object object = fromOM(
                                        getElement(_returnEnv,"document"),
                                        com.ipics.spm.soap.config.SensorProxyInstance.class,
                                         getEnvelopeNamespaces(_returnEnv));
                           _messageContext.getTransportOut().getSender().cleanup(_messageContext);
                           return (com.vialogy.PInstance)object;
                    
         }catch(org.apache.axis2.AxisFault f){
            org.apache.axiom.om.OMElement faultElt = f.getDetail();
             System.out.println("detail:"+f.getDetail());
             System.out.println("detail:"+f.getReason());
      ....
     throw f;
}

----------------------------------------------------------------
You can see the catch statement, the AxisFault doesn't have f.getDetail(), getReason(), printed out is null, getMessage() print out to be the faultString. From the server side(see bellow), the SOAP envelope has both faultString and detail, however it didn't pass to AxisFault. 
I am using axis2 version 1.0, version 1.1 doesn't look like uch different from 1.0 in generating stubs.
--------------------------------------------------------------------------------------------------------------------------
<xml vers ion="1.0" encodi ng="UTF-8"?>.<SO AP-ENV:Envelope  xmlns:SOAP-ENV=" http://schemas.x mlsoap.org/soap/ envelope
/" xmlns :SOAP-ENC="http: //schemas.xmlsoa p.org/soap/encod ing/" xmlns:xsi= "http://www.w3.o rg/2001/XMLSchem a-instan
ce" xmln s:xsd="http://ww w.w3.org/2001/XM LSchema"xmlns:s pm="urn:spm">
<SOAP-ENV:Body>
<SOAP-ENV:Fault><faultcode>SOAP-ENV: Server</faultcode>
  <faultstring>Soap processing error</faultstring><detail>Null or invalid SOAP object received at server.</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>   
------------------------------------------------------------------------------------------------------------------------

> There is a bug in generated stub, it can not get AxisFault detail or reason when server side respond with an envelope that has fault string and fault detail
> ------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-1831
>                 URL: http://issues.apache.org/jira/browse/AXIS2-1831
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>         Environment: window
>            Reporter: Na Wang
>            Priority: Critical
>
> There is a bug in generated stub, when server send a fault SOAP envelope, the generated sub couldn't get the AxisFault detail and reason, it only get the faultString. So AXIS2 client has no way of knowing the server side fault detail or reason.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] Resolved: (AXIS2-1831) There is a bug in generated stub, it can not get AxisFault detail or reason when server side respond with an envelope that has fault string and fault detail

Posted by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-1831?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Amila Chinthaka Suriarachchi resolved AXIS2-1831.
-------------------------------------------------

    Resolution: Fixed

I tested this and works fine. 
here when throwing the exception you have to set the fault element. like this,
FaultMessage faultMessage = new FaultMessage("test fault message");
        FaultElement faultElement = new FaultElement();
        faultElement.setParam("test param");
        faultMessage.setFaultMessage(faultElement);
        throw faultMessage;

> There is a bug in generated stub, it can not get AxisFault detail or reason when server side respond with an envelope that has fault string and fault detail
> ------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-1831
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1831
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>         Environment: window
>            Reporter: Na Wang
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Critical
>
> There is a bug in generated stub, when server send a fault SOAP envelope, the generated sub couldn't get the AxisFault detail and reason, it only get the faultString. So AXIS2 client has no way of knowing the server side fault detail or reason.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Assigned: (AXIS2-1831) There is a bug in generated stub, it can not get AxisFault detail or reason when server side respond with an envelope that has fault string and fault detail

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-1831?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Deepal Jayasinghe reassigned AXIS2-1831:
----------------------------------------

    Assignee: Amila Chinthaka Suriarachchi  (was: Deepal Jayasinghe)

> There is a bug in generated stub, it can not get AxisFault detail or reason when server side respond with an envelope that has fault string and fault detail
> ------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-1831
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1831
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>         Environment: window
>            Reporter: Na Wang
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Critical
>
> There is a bug in generated stub, when server send a fault SOAP envelope, the generated sub couldn't get the AxisFault detail and reason, it only get the faultString. So AXIS2 client has no way of knowing the server side fault detail or reason.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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