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 "Nadeem Hoda (JIRA)" <ji...@apache.org> on 2008/01/14 11:20:33 UTC

[jira] Created: (AXIS2-3443) Axis2 should populate
for custom exceptions for POJO services

Axis2 should populate <details> for custom exceptions for POJO services
-----------------------------------------------------------------------

                 Key: AXIS2-3443
                 URL: https://issues.apache.org/jira/browse/AXIS2-3443
             Project: Axis 2.0 (Axis2)
          Issue Type: Improvement
    Affects Versions: 1.3, 1.4, nightly
            Reporter: Nadeem Hoda


Currently, if a user uses a custom exception in his POJO service, this is not reflected in the SOAP Exception. 

As with WSDL-first services in Axis2, the full fault/exception information should be automatically put into the <details> of the SOAP Exception.

The user should not be forced to use AxisFault as the purpose of POJO services is to not introduce extra or SOAP stack-specific code.

Note the following example. 

At the server-side, of the following exception is thrown: 

			throw new CustomException("My Error.");

The following SOAP Exception (SOAP 1.1) is thrown:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <soapenv:Fault>
         <faultcode>soapenv:Server</faultcode>
         <faultstring>My Error.</faultstring>
         <detail/>
      </soapenv:Fault>
   </soapenv:Body>
</soapenv:Envelope>

Instead, it should automatically be as follows (at least):

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <soapenv:Fault>
         <faultcode>soapenv:Server</faultcode>
         <faultstring>My Error.</faultstring>
         <detail>
            <ns1:CustomException xmlns:ns1="http://package"/>
          </detail>
      </soapenv:Fault>
   </soapenv:Body>
</soapenv:Envelope>

This will allow the client to identify the thrown fault, otherwise, there is no way of knowing the original wsdl:fault.








-- 
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-3443) Axis2 should populate
for custom exceptions for POJO services

Posted by "Guillermo Lopez (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12833992#action_12833992 ] 

Guillermo Lopez commented on AXIS2-3443:
----------------------------------------

Any update regarding this issue? It states that affects versions 1.3 and 1.4 however I can confirm that this issue is affecting version 1.5.1 too as one would have expected after seeing that has not been assigned after 2 years... Is it possible to get at least an estimate fix date for an issue marked as major priority?

Is there any known workaround? Any help will be highly appreciated.

Thanks

> Axis2 should populate <details> for custom exceptions for POJO services
> -----------------------------------------------------------------------
>
>                 Key: AXIS2-3443
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3443
>             Project: Axis2
>          Issue Type: Improvement
>    Affects Versions: 1.4, 1.3, nightly
>            Reporter: Nadeem Hoda
>
> Currently, if a user uses a custom exception in his POJO service, this is not reflected in the SOAP Exception. 
> As with WSDL-first services in Axis2, the full fault/exception information should be automatically put into the <details> of the SOAP Exception.
> The user should not be forced to use AxisFault as the purpose of POJO services is to not introduce extra or SOAP stack-specific code.
> Note the following example. 
> At the server-side, of the following exception is thrown: 
> 			throw new CustomException("My Error.");
> The following SOAP Exception (SOAP 1.1) is thrown:
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
>    <soapenv:Body>
>       <soapenv:Fault>
>          <faultcode>soapenv:Server</faultcode>
>          <faultstring>My Error.</faultstring>
>          <detail/>
>       </soapenv:Fault>
>    </soapenv:Body>
> </soapenv:Envelope>
> Instead, it should automatically be as follows (at least):
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
>    <soapenv:Body>
>       <soapenv:Fault>
>          <faultcode>soapenv:Server</faultcode>
>          <faultstring>My Error.</faultstring>
>          <detail>
>             <ns1:CustomException xmlns:ns1="http://package"/>
>           </detail>
>       </soapenv:Fault>
>    </soapenv:Body>
> </soapenv:Envelope>
> This will allow the client to identify the thrown fault, otherwise, there is no way of knowing the original wsdl:fault.

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


[jira] Commented: (AXIS2-3443) Axis2 should populate
for custom exceptions for POJO services

Posted by "Farzad Panahi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12610633#action_12610633 ] 

Farzad Panahi commented on AXIS2-3443:
--------------------------------------

Any updates on this issue? 

I have the same problem of empty soap fault detail section when exceptions are thrown.

Here is a sample of soap on the wire:

HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
Content-Type: application/soap+xml; action="urn:loginRadiantAuthenticationFailedException";charset=UTF-8
Transfer-Encoding: chunked
Date: Fri, 04 Jul 2008 00:40:27 GMT
Connection: close

181
<?xml version='1.0' encoding='UTF-8'?>
   <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
      <soapenv:Body>
         <soapenv:Fault>
            <soapenv:Code>
               <soapenv:Value>soapenv:Receiver</soapenv:Value>
            </soapenv:Code>
            <soapenv:Reason>
               <soapenv:Text xml:lang="en-US">Invalid userName = ''</soapenv:Text>
            </soapenv:Reason>
            <soapenv:Detail />
         </soapenv:Fault>
      </soapenv:Body>
   </soapenv:Envelope>
0

As you can see the <soapenv:Detail /> is all empty where I am expecting to have the RadiantAuthenticationFailedException in it.

Any help?

Tnx

> Axis2 should populate <details> for custom exceptions for POJO services
> -----------------------------------------------------------------------
>
>                 Key: AXIS2-3443
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3443
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>    Affects Versions: 1.4, 1.3, nightly
>            Reporter: Nadeem Hoda
>
> Currently, if a user uses a custom exception in his POJO service, this is not reflected in the SOAP Exception. 
> As with WSDL-first services in Axis2, the full fault/exception information should be automatically put into the <details> of the SOAP Exception.
> The user should not be forced to use AxisFault as the purpose of POJO services is to not introduce extra or SOAP stack-specific code.
> Note the following example. 
> At the server-side, of the following exception is thrown: 
> 			throw new CustomException("My Error.");
> The following SOAP Exception (SOAP 1.1) is thrown:
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
>    <soapenv:Body>
>       <soapenv:Fault>
>          <faultcode>soapenv:Server</faultcode>
>          <faultstring>My Error.</faultstring>
>          <detail/>
>       </soapenv:Fault>
>    </soapenv:Body>
> </soapenv:Envelope>
> Instead, it should automatically be as follows (at least):
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
>    <soapenv:Body>
>       <soapenv:Fault>
>          <faultcode>soapenv:Server</faultcode>
>          <faultstring>My Error.</faultstring>
>          <detail>
>             <ns1:CustomException xmlns:ns1="http://package"/>
>           </detail>
>       </soapenv:Fault>
>    </soapenv:Body>
> </soapenv:Envelope>
> This will allow the client to identify the thrown fault, otherwise, there is no way of knowing the original wsdl:fault.

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