Hi Buddhike,

The handling of unexpected XML elements is determined by the data
binding technique used. JAXB is the sloppiest data binding supported by
Axis2 (on a par with WCF), and if you change to that you should be ok.

  - Dennis

Dennis M. Sosnoski
Java SOA and Web Services Consulting <http://www.sosnoski.com/consult.html>
Axis2/CXF/Metro SOA and Web Services Training
<http://www.sosnoski.com/training.html>
Web Services Jump-Start <http://www.sosnoski.com/jumpstart.html>


On 02/28/2011 10:17 PM, Buddhike de Silva wrote:
> Anyone? (please... :-))
>
> On Sun, Feb 27, 2011 at 4:28 PM, Buddhike de Silva
> <buddhike.desi...@geeksdiary.com
> <mailto:buddhike.desi...@geeksdiary.com>> wrote:
>
>     Hi All,
>
>     We are doing some interop tests between Axis and WCF. In our WCF
>     service we have a type like this.
>
>     [DataContract]
>
>     public class CompositeType
>
>     {
>
>       [DataMemeber]
>
>       public bool BoolValue {get; set;}
>
>     }
>
>     That results in a schema similar to the following.
>
>     <xs:complexType name="CompositeType">
>       <xs:sequence>
>         <xs:element name="BoolValue" type="xs:boolean" minOccurs="0"/>
>       </xs:sequence>
>     </xs:complexType>
>     <xs:element name="CompositeType" type="tns:CompositeType"
>     nillable="true"/>
>
>
>     We can generate Axis code with the WSDL/Schema generated by WCF
>     service and communicate with the service. However, if we add
>     another property to CompositeType class on the WCF server side, it
>     breaks the Axis client. It throws an exception saying it's reading
>     an element that was unexpected. Our understanding Axis is capable
>     of lax processing of XML (that is, if it encounters anything
>     that's not recognized, serializer simply discards them). Could
>     someone pleasae let us know which settings we should use to enable
>     lax processing of messages? Many thanks in advance.
>
>     Cheers,
>
>     -Buddhike
>
>

Reply via email to