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 "wayne lou (JIRA)" <ji...@apache.org> on 2008/02/21 02:35:45 UTC

[jira] Issue Comment Edited: (AXIS2-3520) AxisFault didnot give me correct QName

    [ https://issues.apache.org/jira/browse/AXIS2-3520?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12570154#action_12570154 ] 

wwlou edited comment on AXIS2-3520 at 2/20/08 5:35 PM:
-----------------------------------------------------------

I have read the source code, in Utils.java line 486:
                if (messageContext.isDoingREST() && soapBody.getFirstElement() != null) {
                    return new AxisFault(soapBody.getFirstElement().toString());
                }
the AxisFault did not get a QName, why not change to:
AxisFault af = new AxisFault(soapBody.getFirstElement().toString());
af.setDetail(soapBody.getFirstElement());
return af;

I think I should got error response by catching exception, not from AxisFault.

      was (Author: wwlou):
    I have read the source code, in Utils.java line 486:
                if (messageContext.isDoingREST() && soapBody.getFirstElement() != null) {
                    return new AxisFault(soapBody.getFirstElement().toString());
                }
the AxisFault did not get a QName, why not change to:
AxisFault af = new AxisFault(soapBody.getFirstElement().toString());
af.setDetail(soapBody.getFirstElement());
return af;
  
> AxisFault didnot give me correct QName
> --------------------------------------
>
>                 Key: AXIS2-3520
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3520
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>            Reporter: wayne lou
>
> Below is the code I generated by  WSDL2Java:
> wsdl: <wsdl:fault name="SnapfishRemoteException" message="tns:ErrorResponse" />
> Java Code: 
>         } catch (org.apache.axis2.AxisFault f) {
>             org.apache.axiom.om.OMElement faultElt = f.getDetail();
>             if (faultElt != null) {
>                 if (faultExceptionNameMap.containsKey(faultElt.getQName())) {
>                 ....
> I found faultElt.getQName() do not have a namespace uri, so I didnot get correct error response.

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