Return-Path: Delivered-To: apmail-axis-java-user-archive@www.apache.org Received: (qmail 18665 invoked from network); 1 Mar 2011 07:33:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 Mar 2011 07:33:40 -0000 Received: (qmail 69101 invoked by uid 500); 1 Mar 2011 07:33:38 -0000 Delivered-To: apmail-axis-java-user-archive@axis.apache.org Received: (qmail 68866 invoked by uid 500); 1 Mar 2011 07:33:35 -0000 Mailing-List: contact java-user-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@axis.apache.org Delivered-To: mailing list java-user@axis.apache.org Received: (qmail 68858 invoked by uid 99); 1 Mar 2011 07:33:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Mar 2011 07:33:35 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of buddhike.desilva@geeksdiary.com designates 209.85.220.173 as permitted sender) Received: from [209.85.220.173] (HELO mail-vx0-f173.google.com) (209.85.220.173) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Mar 2011 07:33:29 +0000 Received: by vxb41 with SMTP id 41so4454368vxb.32 for ; Mon, 28 Feb 2011 23:33:08 -0800 (PST) MIME-Version: 1.0 Received: by 10.52.157.100 with SMTP id wl4mr10738003vdb.190.1298964788343; Mon, 28 Feb 2011 23:33:08 -0800 (PST) Received: by 10.220.192.71 with HTTP; Mon, 28 Feb 2011 23:33:08 -0800 (PST) X-Originating-IP: [202.173.173.171] In-Reply-To: <4D6CA0A9.2070102@sosnoski.com> References: <4D6C9657.2000201@sosnoski.com> <4D6CA0A9.2070102@sosnoski.com> Date: Tue, 1 Mar 2011 17:33:08 +1000 Message-ID: Subject: Re: Axis Serialization Behavior From: Buddhike de Silva To: Dennis Sosnoski Cc: java-user@axis.apache.org Content-Type: multipart/alternative; boundary=bcaec53f8d75c8f621049d66ce86 --bcaec53f8d75c8f621049d66ce86 Content-Type: text/plain; charset=ISO-8859-1 Thanks a lot Dennis. Cheers, -Buddhike On Tue, Mar 1, 2011 at 5:30 PM, Dennis Sosnoski wrote: > Ah, I hadn't realized you were using Axis(1). With Axis2 you can select > the data binding using a parameter to Wsdl2Java. You should be able to see > examples included in the Axis2 download, or you can try my code from this > article: http://www.ibm.com/developerworks/java/library/j-jws8.html I > haven't tried the code from the article with the latest Axis2 releases, but > hopefully it'll still work correctly. > > - Dennis > > > > On 03/01/2011 07:58 PM, Buddhike de Silva wrote: > > Thanks Dennis. Do you know of a link with some sample code on how to do > this? Sorry, I'm not really familier with Axis2. Thanks again. > > Cheers, > > -Buddhike > > On Tue, Mar 1, 2011 at 4:46 PM, Dennis Sosnoski wrote: > >> 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 >> Axis2/CXF/Metro SOA and Web Services Training >> Web Services Jump-Start >> >> 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.desilva@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. >>> >>> >>> >>> >>> >>> >>> >> 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 >>> >> >> > --bcaec53f8d75c8f621049d66ce86 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

Thanks a lot Dennis.

Cheers= ,

-Bu= ddhike

On Tue, Mar 1, 2011 at 5:3= 0 PM, Dennis Sosnoski <dms@sosnoski.com> wrote:
=20
Ah, I hadn't realized you were using Axis(1). With Axis2 you can select the data binding using a parameter to Wsdl2Java. You should be able to see examples included in the Axis2 download, or you can try my code from this article: http://www.ibm.com/developerworks/java/library/j-jws8.html I haven't tried the code from the article with the latest Axis2 releases, but hopefully it'll still work correctly.

=A0 - Dennis



On 03/01/2011 07:58 PM, Buddhike de Silva wrote:

Thanks Dennis. Do you know of a link with some sample code on how to do this? Sorry, I'm not really familier with Axis2. Thanks again.

Cheers,

-Buddhike

On Tue, Mar 1, 2011 at 4:46 PM, Dennis Sosnoski <dms@sosnoski.com> wrote:
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.

=A0 - Dennis

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.desilva@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

{

=A0 [DataMemeber]

=A0 public bool BoolValue {get; set;}

}

That results in a schema similar to the following.

<xs:complex= Type name=3D"CompositeType">
=A0 <xs:sequence>
=A0=A0=A0 <xs:element name=3D"BoolValue" type=3D"xs:boole= an" minOccurs=3D"0"/>
=A0 </xs:sequence>
</xs:complexType>
<xs:element name=3D"CompositeType" type=3D"tns:CompositeT= ype" nillable=3D"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




--bcaec53f8d75c8f621049d66ce86--