You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Rakesh Sanghvi <ra...@gmail.com> on 2006/02/24 21:19:16 UTC

rpc/literal and Schema Validation

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

Re: rpc/literal and Schema Validation

Posted by Anne Thomas Manes <at...@gmail.com>.
WS-I allows document/literal and rpc/literal. But as I said, many systems
don't support rpc/literal, so I strongly recommend that you change your
specification to use doc/literal instead. If you use the "wrapped"
convention with doc/literal, the messages on the wire and the programming
model are virtually identical to rpc/literal, and you can do validation.

In other words, use wrapped doc/literal.

Anne

On 2/25/06, Rakesh Sanghvi <ra...@gmail.com> wrote:
>
> Hi Anne
>
>  i think i was doing mistake in my dev. i got it that we can't validate
> input. I got it from your reply that we should avoid to use rpc/literal. but
> we are implementing WS-I profile and according to specification we must have
> to implement rpc/literal. it would be great if you explain which is the best
> solution for validating xml input.
>
> Thanks for your help..
> Rakesh
>
>
> On 2/24/06, Rakesh Sanghvi <ra...@gmail.com> wrote:
> >
> > 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
> > > >
> > > >
> > > >
> > >
> > >
> >
>

Re: rpc/literal and Schema Validation

Posted by Rakesh Sanghvi <ra...@gmail.com>.
Hi Anne

 i think i was doing mistake in my dev. i got it that we can't validate
input. I got it from your reply that we should avoid to use rpc/literal. but
we are implementing WS-I profile and according to specification we must have
to implement rpc/literal. it would be great if you explain which is the best
solution for validating xml input.

Thanks for your help..
Rakesh


On 2/24/06, Rakesh Sanghvi <ra...@gmail.com> wrote:
>
> 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 <at...@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
> > >
> > >
> > >
> >
> >
>

Re: rpc/literal and Schema Validation

Posted by Rakesh Sanghvi <ra...@gmail.com>.
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 <at...@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 <ra...@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
> >
> >
> >
>
>

Re: Axis 1.4 and security

Posted by Anne Thomas Manes <at...@gmail.com>.
For .NET you need to use WSE 3.0. See
http://www.microsoft.com/downloads/details.aspx?familyid=018a09fd-3a74-43c5-8ec1-8d789091255d&displaylang=en


Anne

On 5/17/06, Santunu Podder <SP...@closepf.com> wrote:
>
> Thanks Anne.
>
> Can I use this for my senario ? I have implemented the web service in java
> but the client is in .Net.
> How will the client pass the authentication information in the request?
>
>
>
>
>
>
> "Anne Thomas Manes" <at...@gmail.com>
> 17/05/2006 15:47
> Please respond to
> axis-user@ws.apache.org
>
>
> To
> axis-user@ws.apache.org
> cc
>
> Subject
> Re: Axis 1.4 and security
>
>
>
>
>
>
> WSS4J is a plug-in module that adds support for WS-Security to Axis1.
>
> Anne
>
> On 5/17/06, Santunu Podder <SPodder@closepf.com > wrote:
> Hi All,
>
> Does Axis 1.4 have any support for security ?
>
> Have anybody in the group implemented public / private key kind of
> security in web services ?
> I am new to security so any help will be appreciated.
>
> Thanks,
> Santunu
>
>
> This message (including any attachments) is confidential and may be
> privileged. If you have received it by mistake please notify the sender by
> return e-mail and delete this message from your system. Any unauthorised
> use or dissemination of this message in whole or in part is strictly
> prohibited. Please note that e-mails are susceptible to change. Close
> Premium Finance shall not be liable for the improper or incomplete
> transmission of the information contained in this communication nor for
> any delay in its receipt or damage to your system. Close Premium Finance
> does not guarantee that the integrity of this communication has been
> maintained nor that this communication is free of viruses, interceptions
> or interference.
>
>
> ________________________________________________________________________
> This email has been scanned for all viruses by the MessageLabs SkyScan
> service.
>
>
> This message (including any attachments) is confidential and may be
> privileged. If you have received it by mistake please notify the sender by
> return e-mail and delete this message from your system. Any unauthorised use
> or dissemination of this message in whole or in part is strictly prohibited.
> Please note that e-mails are susceptible to change. Close Premium Finance
> shall not be liable for the improper or incomplete transmission of the
> information contained in this communication nor for any delay in its receipt
> or damage to your system. Close Premium Finance does not guarantee that the
> integrity of this communication has been maintained nor that this
> communication is free of viruses, interceptions or interference.
>

Re: Axis 1.4 and security

Posted by Rodrigo Ruiz <rr...@gridsystems.com>.
In addition to this, Axis directly supports the HTTPS protocol for 
sending and receiving messages.

Anne Thomas Manes wrote:
> WSS4J is a plug-in module that adds support for WS-Security to Axis1.
> 
> Anne
> 
> On 5/17/06, *Santunu Podder* <SPodder@closepf.com 
> <ma...@closepf.com>> wrote:
> 
>     Hi All,
> 
>     Does Axis 1.4 have any support for security ?
> 
>     Have anybody in the group implemented public / private key kind of
>     security in web services ?
>     I am new to security so any help will be appreciated.
> 
>     Thanks,
>     Santunu
> 
> 
>     This message (including any attachments) is confidential and may be
>     privileged. If you have received it by mistake please notify the
>     sender by return e-mail and delete this message from your system.
>     Any unauthorised use or dissemination of this message in whole or in
>     part is strictly prohibited. Please note that e-mails are
>     susceptible to change. Close Premium Finance shall not be liable for
>     the improper or incomplete transmission of the information contained
>     in this communication nor for any delay in its receipt or damage to
>     your system. Close Premium Finance does not guarantee that the
>     integrity of this communication has been maintained nor that this
>     communication is free of viruses, interceptions or interference.
> 
> 
> 
> ------------------------------------------------------------------------
> 
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.392 / Virus Database: 268.6.0/341 - Release Date: 16/05/2006

-- 
-------------------------------------------------------------------
GRIDSYSTEMS                    Rodrigo Ruiz Aguayo
Parc Bit - Son Espanyol
07120 Palma de Mallorca        mailto:rruiz@gridsystems.com
Baleares - EspaƱa              Tel:+34-971435085 Fax:+34-971435082
http://www.gridsystems.com
-------------------------------------------------------------------


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.392 / Virus Database: 268.6.0/341 - Release Date: 16/05/2006


Setting nillable = false in WSDL

Posted by Santunu Podder <SP...@closepf.com>.
Hi All,

I am using Axis 1.2 as my soap engine.

The WSDL file generated by Axis sets all 'nillable' attribute for all 
elements to true. 

Is there any way I can get the 'nillable' property to true or false in a 
declarative fashion...i.e for some 
elements, I want it to be set to true and false for others.

Thanks,
Santunu



This message (including any attachments) is confidential and may be privileged. If you have received it by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorised use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change. Close Premium Finance shall not be liable for the improper or incomplete transmission of the information contained in this communication nor for any delay in its receipt or damage to your system. Close Premium Finance does not guarantee that the integrity of this communication has been maintained nor that this communication is free of viruses, interceptions or interference.

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


Re: Axis 1.4 and security

Posted by Santunu Podder <SP...@closepf.com>.
Thanks Anne.

Can I use this for my senario ? I have implemented the web service in java 
but the client is in .Net.
How will the client pass the authentication information in the request?






"Anne Thomas Manes" <at...@gmail.com> 
17/05/2006 15:47
Please respond to
axis-user@ws.apache.org


To
axis-user@ws.apache.org
cc

Subject
Re: Axis 1.4 and security






WSS4J is a plug-in module that adds support for WS-Security to Axis1.

Anne 

On 5/17/06, Santunu Podder <SPodder@closepf.com > wrote:
Hi All,

Does Axis 1.4 have any support for security ?

Have anybody in the group implemented public / private key kind of 
security in web services ?
I am new to security so any help will be appreciated.

Thanks,
Santunu


This message (including any attachments) is confidential and may be 
privileged. If you have received it by mistake please notify the sender by 
return e-mail and delete this message from your system. Any unauthorised 
use or dissemination of this message in whole or in part is strictly 
prohibited. Please note that e-mails are susceptible to change. Close 
Premium Finance shall not be liable for the improper or incomplete 
transmission of the information contained in this communication nor for 
any delay in its receipt or damage to your system. Close Premium Finance 
does not guarantee that the integrity of this communication has been 
maintained nor that this communication is free of viruses, interceptions 
or interference. 


________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs SkyScan
service.


This message (including any attachments) is confidential and may be privileged. If you have received it by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorised use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change. Close Premium Finance shall not be liable for the improper or incomplete transmission of the information contained in this communication nor for any delay in its receipt or damage to your system. Close Premium Finance does not guarantee that the integrity of this communication has been maintained nor that this communication is free of viruses, interceptions or interference.

Re: Axis 1.4 and security

Posted by Anne Thomas Manes <at...@gmail.com>.
WSS4J is a plug-in module that adds support for WS-Security to Axis1.

Anne

On 5/17/06, Santunu Podder <SP...@closepf.com> wrote:
>
> Hi All,
>
> Does Axis 1.4 have any support for security ?
>
> Have anybody in the group implemented public / private key kind of
> security in web services ?
> I am new to security so any help will be appreciated.
>
> Thanks,
> Santunu
>
>
> This message (including any attachments) is confidential and may be
> privileged. If you have received it by mistake please notify the sender by
> return e-mail and delete this message from your system. Any unauthorised use
> or dissemination of this message in whole or in part is strictly prohibited.
> Please note that e-mails are susceptible to change. Close Premium Finance
> shall not be liable for the improper or incomplete transmission of the
> information contained in this communication nor for any delay in its receipt
> or damage to your system. Close Premium Finance does not guarantee that the
> integrity of this communication has been maintained nor that this
> communication is free of viruses, interceptions or interference.
>

Axis 1.4 and security

Posted by Santunu Podder <SP...@closepf.com>.
Hi All,

Does Axis 1.4 have any support for security ?

Have anybody in the group implemented public / private key kind of 
security in web services ? 
I am new to security so any help will be appreciated.

Thanks,
Santunu


This message (including any attachments) is confidential and may be privileged. If you have received it by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorised use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change. Close Premium Finance shall not be liable for the improper or incomplete transmission of the information contained in this communication nor for any delay in its receipt or damage to your system. Close Premium Finance does not guarantee that the integrity of this communication has been maintained nor that this communication is free of viruses, interceptions or interference.

Re: rpc/literal and Schema Validation

Posted by Anne Thomas Manes <at...@gmail.com>.
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 <ra...@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
>
>
>