axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ali, Haneef" <haneef....@hp.com>
Subject RE: SOAP fault - custom detail namespace
Date Tue, 12 Jun 2007 03:44:21 GMT
Thanks for the response. I do have the element and wsdl declaration. I
believe in this case Axis2 works as expected, and looks like Axis1.4 has
a bug.

1) Axis 2 desterilizes the elements only if the qName of the xmlFragment
matches.
1) Axis 1.4 tries to look for Qname. If it can't find Qname then it
looks for localName. If it finds localName then it desterilizes the
request, which I think is wrong

Can you please confirm whether this is a feature or bug in Axis 1.4? I
debugged the code and found that the following file is accepting the
fields even if they are not in the proper namespace.

Method : BeanDeSerializer.onStartChild
Line : 216
	The code is trying to get "BeanPropertyDescriptor" based on
Qname. If it can't find then it tries to find the
"BeanPropertyDescriptor" using localname, which is causing the problem.
(i.e) if you have xmlFragment where only "localName" matches, then it
desterilizes the bean which I think is wrong

Thanks,
Haneef

-----Original Message-----
From: Anne Thomas Manes [mailto:atmanes@gmail.com] 
Sent: Monday, June 11, 2007 3:19 PM
To: axis-user@ws.apache.org
Subject: Re: SOAP fault - custom detail namespace

Based on your schema, the fault message should look like this:

  <env:Fault>
       <faultcode>env:Server</faultcode>
       <faultstring>Some message</faultstring>
       <detail>
               <n1:MyException xmlns:n1="http://MyNamespace">
                       <ns1:mesg1 xsi:nil="true"></ns1:mesg1>
                       <ns1:mesg2 xsi:nil="true"></ns1:mesg2>
                </n1:MyExceptio>
       </detail>
  </env:Fault>

Also, please verify that you have in fact defined an *element*. (The
schema fragment you showed us only defines a complex type.)

Make sure that this declaration is included in your schema:

   <xsd:element name="MyException" type="tns:MyException"/>

And make sure your WSDL fault message part references this element.

Anne

On 6/11/07, Ali, Haneef <haneef.ali@hp.com> wrote:
> Hi,
>
> I have the following complex Element
>
> <xsd:schema elementFormDefault="qualified"
> attributeFormDefault="qualified"
> targetNamespace="http://MyNamespace">
>
>  <xsd:complexType name="MyException">
>    <xsd:sequence>
>         <element name="mesg1" type="xsd:string" />
>         <element name="mesg2" type="xsd:string" />
>    </xsd:sequence>
> <xsd:complexType>
>
> <xsd:schema>
>
> I have omitted unnecessary implementation details. Bascially my 
> weblogic webservice throws this excecption and the xml in the wire 
> look like
>
>
> <env:Fault>
>         <faultcode>env:Server</faultcode>
>         <faultstring>Some message</faultstring>
>         <detail>
>                 <n1:MyException xmlns:n1="http://MyNamespace">
>                         <mesg1 xsi:nil="true"></mesg1>
>                         <mesg2 xsi:nil="true"></mesg2>
>                  </n1:MyExceptio>
>         </detail>
> </env:Fault>
>
>
> This xml fragment is accepted by both Axis 1.4 client and weblogic 
> client. Axis 2.0 rejects this.  Axis 2.0 is not able to findout the 
> namespace for  the element "mesg1' and "mesg2".
>
> Can you please let me know who is correct? I believe Axis2.0 is 
> correct
>
>
> Thanks,
> Haneef
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message