This has to be a problem because although the WSDL snippet is this:

<wsdl:message name="PersonWebServiceException">
<wsdl:part name="fault" type="ns1:WebServiceException">
    </wsdl:part>
</wsdl:message>

during a fault the SOAP returned is this:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
   <soap:Body>
      <soap:Fault>
         <faultcode>soap:Server</faultcode>
         <faultstring>...</faultstring>
         <detail>
            <WebServiceException xmlns="http://arsenalist.com";>
               <code>5001</code>
            </WebServiceException>
         </detail>
      </soap:Fault>
   </soap:Body></soap:Envelope>

Now IMHO this is wrong because using any client the exception's QName is
{http://arsenalist.com}fault but the actual QName that's needed to serialize
it is {http://arsenalist.com}WebServiceException.  If I change the generated
client code (try any client: XFire, CXF, Axis2 etc.) to have
WebServiceException as the local part instead of fault, it works.

Any ideas?




Zarar Siddiqi wrote:
> 
> I'm seeing the following behavior.  I have an exception which is annotated
> with:
> 
> @WebFault(name="WebServiceException")
> @XmlType(name="WebServiceException", namespace="http://arsenalist.com";)
> public class MyWebServiceException extends Exception {...}
> 
> but the WSDL that is generated is:
> 
> <wsdl:message name="MyWebServiceException">
> <wsdl:part name="fault" type="ns1:WebServiceException"></wsdl:part>
> </wsdl:message>
> 
> IMHO, the name of the part should be "WebServiceException" and not
> "fault".  Is my thinking correct? If not, how do you change the WSDL part
> name?  Are there any Aegis annotations that can be used at the class level
> to change this?
> 
> Thanks,
> Zarar
> 

-- 
View this message in context: 
http://www.nabble.com/WSDL-part-name-incorrect.-How-do-you-change-it--tf4432101.html#a12655879
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to