You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-dev@ws.apache.org by "Vinh Nguyen (JIRA)" <ji...@apache.org> on 2007/08/24 03:06:30 UTC

[jira] Created: (MUSE-268) SoapFault(Element) constructor retrieves code but loses namespace

SoapFault(Element) constructor retrieves code but loses namespace
-----------------------------------------------------------------

                 Key: MUSE-268
                 URL: https://issues.apache.org/jira/browse/MUSE-268
             Project: Muse
          Issue Type: Bug
         Environment: Muse 2.2.0
            Reporter: Vinh Nguyen
            Assignee: Dan Jemiolo
            Priority: Minor


I'm doing the following in SimpleResourceRouter:

public Element invoke(Element soapBody)
{
    // Check the error code.
    Element response = super.invoke(soapBody);
    QName name = XmlUtils.getElementQName(response);
    if (name.equals(SoapConstants.FAULT_QNAME))
    {
        SoapFault fault = new SoapFault(response);
        QName faultCode = fault.getCode();
        System.out.println("Fault code: " + faultCode.getPrefix() + ", " + faultCode.getLocalPart() + ", " + faultCode.getNamespaceURI());
        if (faultCode.equals(SoapConstants.SENDER_QNAME))
        {
            System.out.println("Fault is a user error!");
        }
    }
    return response;
}

But I noticed that the faultCode's namespace is lost.  So when I try to compare it to SoapConstants.SENDER_QNAME, it always returns false.  So it is difficult to check if the fault is a user error, or an actual system (Muse) error.


-- 
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: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org


[jira] Commented: (MUSE-268) SoapFault(Element) constructor retrieves code but loses namespace

Posted by "Andrea Gazzarini (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MUSE-268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12682348#action_12682348 ] 

Andrea Gazzarini commented on MUSE-268:
---------------------------------------

It this bug still valid? Attached test is not failing. Also if I run the reported piece of code all it's working...

Regards,
Andrea


> SoapFault(Element) constructor retrieves code but loses namespace
> -----------------------------------------------------------------
>
>                 Key: MUSE-268
>                 URL: https://issues.apache.org/jira/browse/MUSE-268
>             Project: Muse
>          Issue Type: Bug
>         Environment: Muse 2.2.0
>            Reporter: Vinh Nguyen
>            Assignee: Chris Twiner
>            Priority: Minor
>             Fix For: 2.2.1
>
>         Attachments: FaultCodeNSTest.java
>
>
> I'm doing the following in SimpleResourceRouter:
> public Element invoke(Element soapBody)
> {
>     // Check the error code.
>     Element response = super.invoke(soapBody);
>     QName name = XmlUtils.getElementQName(response);
>     if (name.equals(SoapConstants.FAULT_QNAME))
>     {
>         SoapFault fault = new SoapFault(response);
>         QName faultCode = fault.getCode();
>         System.out.println("Fault code: " + faultCode.getPrefix() + ", " + faultCode.getLocalPart() + ", " + faultCode.getNamespaceURI());
>         if (faultCode.equals(SoapConstants.SENDER_QNAME))
>         {
>             System.out.println("Fault is a user error!");
>         }
>     }
>     return response;
> }
> But I noticed that the faultCode's namespace is lost.  So when I try to compare it to SoapConstants.SENDER_QNAME, it always returns false.  So it is difficult to check if the fault is a user error, or an actual system (Muse) error.

-- 
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: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org


[jira] Assigned: (MUSE-268) SoapFault(Element) constructor retrieves code but loses namespace

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

Chris Twiner reassigned MUSE-268:
---------------------------------

    Assignee: Chris Twiner  (was: Dan Jemiolo)

> SoapFault(Element) constructor retrieves code but loses namespace
> -----------------------------------------------------------------
>
>                 Key: MUSE-268
>                 URL: https://issues.apache.org/jira/browse/MUSE-268
>             Project: Muse
>          Issue Type: Bug
>         Environment: Muse 2.2.0
>            Reporter: Vinh Nguyen
>            Assignee: Chris Twiner
>            Priority: Minor
>
> I'm doing the following in SimpleResourceRouter:
> public Element invoke(Element soapBody)
> {
>     // Check the error code.
>     Element response = super.invoke(soapBody);
>     QName name = XmlUtils.getElementQName(response);
>     if (name.equals(SoapConstants.FAULT_QNAME))
>     {
>         SoapFault fault = new SoapFault(response);
>         QName faultCode = fault.getCode();
>         System.out.println("Fault code: " + faultCode.getPrefix() + ", " + faultCode.getLocalPart() + ", " + faultCode.getNamespaceURI());
>         if (faultCode.equals(SoapConstants.SENDER_QNAME))
>         {
>             System.out.println("Fault is a user error!");
>         }
>     }
>     return response;
> }
> But I noticed that the faultCode's namespace is lost.  So when I try to compare it to SoapConstants.SENDER_QNAME, it always returns false.  So it is difficult to check if the fault is a user error, or an actual system (Muse) error.

-- 
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: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org


[jira] Updated: (MUSE-268) SoapFault(Element) constructor retrieves code but loses namespace

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

Chris Twiner updated MUSE-268:
------------------------------

    Attachment: FaultCodeNSTest.java

Attached test case shows this isn't the case (at least in head).

> SoapFault(Element) constructor retrieves code but loses namespace
> -----------------------------------------------------------------
>
>                 Key: MUSE-268
>                 URL: https://issues.apache.org/jira/browse/MUSE-268
>             Project: Muse
>          Issue Type: Bug
>         Environment: Muse 2.2.0
>            Reporter: Vinh Nguyen
>            Assignee: Chris Twiner
>            Priority: Minor
>             Fix For: 2.2.1
>
>         Attachments: FaultCodeNSTest.java
>
>
> I'm doing the following in SimpleResourceRouter:
> public Element invoke(Element soapBody)
> {
>     // Check the error code.
>     Element response = super.invoke(soapBody);
>     QName name = XmlUtils.getElementQName(response);
>     if (name.equals(SoapConstants.FAULT_QNAME))
>     {
>         SoapFault fault = new SoapFault(response);
>         QName faultCode = fault.getCode();
>         System.out.println("Fault code: " + faultCode.getPrefix() + ", " + faultCode.getLocalPart() + ", " + faultCode.getNamespaceURI());
>         if (faultCode.equals(SoapConstants.SENDER_QNAME))
>         {
>             System.out.println("Fault is a user error!");
>         }
>     }
>     return response;
> }
> But I noticed that the faultCode's namespace is lost.  So when I try to compare it to SoapConstants.SENDER_QNAME, it always returns false.  So it is difficult to check if the fault is a user error, or an actual system (Muse) error.

-- 
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: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org


[jira] Resolved: (MUSE-268) SoapFault(Element) constructor retrieves code but loses namespace

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

Chris Twiner resolved MUSE-268.
-------------------------------

    Resolution: Invalid

Andrea further confirms this isn't a bug, marking as Invalid, unless another test can show validity.

> SoapFault(Element) constructor retrieves code but loses namespace
> -----------------------------------------------------------------
>
>                 Key: MUSE-268
>                 URL: https://issues.apache.org/jira/browse/MUSE-268
>             Project: Muse
>          Issue Type: Bug
>         Environment: Muse 2.2.0
>            Reporter: Vinh Nguyen
>            Assignee: Chris Twiner
>            Priority: Minor
>             Fix For: 2.2.1
>
>         Attachments: FaultCodeNSTest.java
>
>
> I'm doing the following in SimpleResourceRouter:
> public Element invoke(Element soapBody)
> {
>     // Check the error code.
>     Element response = super.invoke(soapBody);
>     QName name = XmlUtils.getElementQName(response);
>     if (name.equals(SoapConstants.FAULT_QNAME))
>     {
>         SoapFault fault = new SoapFault(response);
>         QName faultCode = fault.getCode();
>         System.out.println("Fault code: " + faultCode.getPrefix() + ", " + faultCode.getLocalPart() + ", " + faultCode.getNamespaceURI());
>         if (faultCode.equals(SoapConstants.SENDER_QNAME))
>         {
>             System.out.println("Fault is a user error!");
>         }
>     }
>     return response;
> }
> But I noticed that the faultCode's namespace is lost.  So when I try to compare it to SoapConstants.SENDER_QNAME, it always returns false.  So it is difficult to check if the fault is a user error, or an actual system (Muse) error.

-- 
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: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org