[ http://jira.codehaus.org/browse/XFIRE-624?page=all ]

Dan Diephouse closed XFIRE-624.
-------------------------------

    Resolution: Fixed

I've finally applied a fix for this in SVN. Thanks.

> The namespace prefix of the soapfault code cannot be change from ns1 when 
> creating the fault code
> -------------------------------------------------------------------------------------------------
>
>                 Key: XFIRE-624
>                 URL: http://jira.codehaus.org/browse/XFIRE-624
>             Project: XFire
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.2
>         Environment: not applicable but its windows xp, running on a 2 gb of 
> ram, 2gh processor
>            Reporter: David James
>         Assigned To: Dan Diephouse
>            Priority: Minor
>             Fix For: 1.2.3
>
>
> When using the XFireSoapFault, attempting to create my own prefix:
> using the line:  XFireFault xff = new XFireFault("faultString", new 
> QName("http://one.two.com","textContentOfFaultCodeNode","thisIsThePrefix";))
> I would expect:( and have been able to in other toolkits):
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"; 
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
>    <soap:Body>
>       <soap:Fault>
>          <faultcode 
> xmlns:thisIsThePrefix="http://one.two.com";>thisIsThePrefix:textContentOfFaultCodeNode</faultcode>
>          <faultstring>Attribute name is null or empty</faultstring>
>          <faultactor>IAM</faultactor>
>       </soap:Fault>
>    </soap:Body></soap:Envelope>
> but instead i get:
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"; 
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
>    <soap:Body>
>       <soap:Fault>
>          <faultcode 
> xmlns:ns1="http://one.two.com";>ns1:textContentOfFaultCodeNode</faultcode>
>          <faultstring>Attribute name is null or empty</faultstring>
>          <faultactor>IAM</faultactor>
>       </soap:Fault>
>    </soap:Body></soap:Envelope>
> note the difference in prefixes : ns1 and thisIsThePrefix.
> I have attempted to play around with the Qname but regardless of settings i 
> cannot get the xml as i wish.
> The only solution is to do the following:
> XFireFault xff = new XFireFault("faultString", new 
> QName("thisIsThePrefix:ExampleCode"));
> xff.addNamespace("sdk", "http://sdk.bt.com/Faults/";);
> this then creates:
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"; 
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
>    <soap:Body xmlns:sdk="http://sdk.bt.com/Faults/";>
>       <soap:Fault>
>          <faultcode>sdk:ParametersNotValid</faultcode>
>          <faultstring>Attribute name is null or empty</faultstring>
>          <faultactor>IAM</faultactor>
>       </soap:Fault>
>    </soap:Body></soap:Envelope>
> As you can see the namespace prefix declaration has moved outside of the 
> faultcode node, this is not ideal.

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

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to