Dear Anne, El vie, 02-02-2007 a las 18:14 -0500, Anne Thomas Manes escribió: > You must define the contents of each <detail> element in your schema, > and reference the element from a message part in your fault message > description.
I'm sorry to sound like I want my homework done for me, but could you
please show me an actual WSDL fragment?
Originally I had:
<xs:element name="serviceDown">
<xs:complexType>
<xs:sequence>
<xs:element name="errorcode" type="xs:string"/>
<xs:element name="errorstring" type="xs:string"/>
</...
<wsdl:message name="serviceDownMessage">
<wsdl:part name="fault" element="ns:serviceDown"/>
</wsdl:message>
But that added an undesirable element serviceDown as a wrapper to the
rest when testing against the generated service.
Following your advice, I defined the message as:
<wsdl:message name="serviceDownMessage">
<wsdl:part name="fault" element="ns:errorcode"/>
<wsdl:part name="fault" element="ns:errorstring"/>
</wsdl:message>
But that resulted in a class ServiceDownMessageException whose
setFaultMessage method only accepts an ErrorstringDocument instance, and
I can see no way to provide an errorcode. Method getFaultMessage has the
same limitation.
Last, I still need to know how to have Axis2 handle a message with a
non-standard faultcode, as is the case in my second sample. Or is that
not an issue and Axis2 will parse it alright as long as I define the
fault message with a NewChallenge element? Somehow this didn't work for
me in the past, but I could be wrong.
Thanks,
> On 2/2/07, Javier Kohen <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I need help describing the following two fault messages with WSDL + SOAP
> > 1.1. The messages come from a third party webservice running on .Net and
> > there's no chance of modifying them in any way.
> >
> > I'm using Axis2 1.1.1 with XmlBeans binding, so it would be a plus if
> > the result could be handled with it, at least on the client side.
> >
> > First message:
> > <soap:Fault>
> > <faultcode>soap:Client</faultcode>
> > <faultstring>The user specified is invalid SignInName:
> > xxx</faultstring>
> > <faultactor>http://.../MyAction</faultactor>
> > <detail>
> > <errorcode xmlns="mynamespace">InvalidUser</errorcode>
> > <errorstring xmlns="mynamespace">The user specified is invalid
> > SignInName: xxx</errorstring>
> > <additionalDetails>
> > <originalExceptionErrorMessage>The user specified is invalid
> > SignInName: xxx</originalExceptionErrorMessage>
> > </additionalDetails>
> > </detail>
> > </soap:Fault>
> >
> > Second message:
> > <soap:Fault>
> > <faultcode>AuthenticationFailed</faultcode>
> > <faultstring>Authentication Failed</faultstring>
> > <detail>
> > <NewChallenge xmlns="mynamespace2">a_cookie</NewChallenge>
> > </detail>
> > </soap:Fault>
> >
> > If you can't or are not willing to answer this question here, I'd be
> > grateful if you could at least point me to another list or forum where I
> > can get more help with this.
> >
> > Thanks for your time,
> > --
> > Javier Kohen <[EMAIL PROTECTED]>
> > ICQ: blashyrkh #2361802
> > Jabber: [EMAIL PROTECTED]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
--
Javier Kohen <[EMAIL PROTECTED]>
ICQ: blashyrkh #2361802
Jabber: [EMAIL PROTECTED]
signature.asc
Description: Esta parte del mensaje está firmada digitalmente
