axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rakesh Sanghvi" <rakesh.sang...@gmail.com>
Subject Re: rpc/literal and Schema Validation
Date Fri, 24 Feb 2006 21:37:47 GMT
Hi Anne

Thanks for your valuable reply.
Let me explain  in detail...

Example:-
<xsd:element name="radius">

     <xsd:simpleType>

               <xsd:restriction base="xsd:float">

                  <xsd:minInclusive value="0.05"/>

                 <xsd:maxInclusive value="1.0"/>

             </xsd:restriction>

   </xsd:simpleType>

</xsd:element>
if radius element value is not between 0.05 to 1.0 i believe Axis should
throw an error. let me know if my understanding is wrong..

Thanks
Rakesh

On 2/24/06, Anne Thomas Manes <atmanes@gmail.com> wrote:
>
> Rakesh,
>
> Axis never automatically performs schema validation, although it will
> throw an error if it encounters an element or type that it doesn't expect
> when parsing the message. This is true whether you are using doc/lit,
> rpc/lit, or rpc/encoded.
>
> If you would like to add a validation process, then your best bet is to
> use doc/lit because you have the schema of the full payload. When using
> rpc/lit, you don't have the schema for the full payload, so instead you must
> validate each accessor element (the parameters) based on its type
> definition. It's very difficult to validate rpc/encoded because even the
> types might be changed during the encoding and yet it's still valid based on
> the SOAP Encoding datamodel.
>
> In any case, quite a few SOAP implementations don't support rpc/literal,
> so I suggest you not use it. Use wrapped doc/literal instead. Wrapped
> doc/literal provides the same programming experience as rpc/literal, it
> supports easier validation, and it gives you much better interoperability.
>
> I'm not sure why you're thinking that JAXB will help you here. (Are you
> perhaps under the common misconception that Axis won't map doc/literal to
> Java objects for you? It does.)
>
> I think it's much easier to use the built-in Axis serialization system
> than to use JAXB. (Axis 2 supports a much more pluggable serialization
> framework, but not so with Axis 1.) If you want to use an external
> serialization framework, then I suggest xmlbeans rather than JAXB. Google
> "Axis" and "xmlbeans", and I'm sure you'll find plenty of resources to help
> you.
>
> Anne
>
> On 2/24/06, Rakesh Sanghvi <rakesh.sanghvi@gmail.com> wrote:
> >
> > Hi
> >
> > Just want to confirm if i implemented my WSDL SOAP binding as
> > rpc/litteral then I believe Schema validation will not happened
> > automatically.
> >
> > if it is true then will it JAXB will be fine for validating SOAP request
> > against schema.  Let me know if any good suggestion.
> >
> > Thanks
> > Rakesh
> >
> >
> >
>
>

Mime
View raw message