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 p....@almerys.com on 2007/09/06 15:13:01 UTC

[AXIS2] Request validation

Hi,
I am using Axis2 1.3 and JAXB databinding.
My WS is using doc/lit style and I have a problem with the incoming 
request:
Axis2 rejects the requests if the xml is malformed (missing tags for 
example) but it forwards the request to the WS even if the value in the 
tag are incorrect.
For example, in my xsd, I define a tag as a positive Integer 
(xs:positiveInteger) and if I send a request with a negative integer, the 
request is forwarded to the WS.
Is this normal?
Is it up to the WS to check the value inside the body tags?

Thanks in advance,

Pierre

Re: [AXIS2] Request validation

Posted by Sanka Samaranayke <ss...@gmail.com>.
p.casenove@almerys.com wrote:
>
> Thanks for the answer.
> What I don't understand is that when I was with Axis1 (and rpc/lit 
> style for this WS) this kind of validation was impossible.
> Anyway, I'm going to deploy a module validating the request body. Some 
> newbie questions about this module:
> - My WS is defined in a wsdl including several xsd: what file to I 
> load to have my scheme loaded?
> - Does the AXIS2 classloader have access to the files inside the AAR? 
> (my wsdl and xsd are in META-INF folder of the aar)

Hi Pierre,

You can do the following ..

String file = "META-INF" + fileName;
AxisService service = messageContext.getAxisService();
ClassLoader classLoader = service.getClassLoader();
InputStream is = classLoader.getResourceAsStream(fileName);

>From this InputStream you should be able to read the files inside 
the META-INF in service aar fie.

Cheers,
Sanka


>
> Thanks in advance,
>
> Pierre
>
>
>
> *"Anne Thomas Manes" <at...@gmail.com>*
>
> 07/09/2007 00:00
> Veuillez répondre à
> axis-user@ws.apache.org
>
>
> 	
> A
> 	axis-user@ws.apache.org
> cc
> 	
> Objet
> 	Re: [AXIS2] Request validation
>
>
>
> 	
>
>
>
>
>
> That's normal. You could also set up a module to validate incoming 
> messages.
>
> Anne
>
> On 9/6/07, p.casenove@almerys.com <p....@almerys.com> wrote:
> >
> > Hi,
> > I am using Axis2 1.3 and JAXB databinding.
> > My WS is using doc/lit style and I have a problem with the incoming 
> request:
> > Axis2 rejects the requests if the xml is malformed (missing tags for
> > example) but it forwards the request to the WS even if the value in 
> the tag
> > are incorrect.
> > For example, in my xsd, I define a tag as a positive Integer
> > (xs:positiveInteger) and if I send a request with a negative 
> integer, the
> > request is forwarded to the WS.
> > Is this normal?
> > Is it up to the WS to check the value inside the body tags?
> >
> > Thanks in advance,
> >
> > Pierre
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

-- 
Sanka Samaranayake
WSO2 Inc.

http://www.bloglines.com/blog/sanka
http://www.wso2.org/


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


Re: [AXIS2] Request validation

Posted by p....@almerys.com.
Thanks for the answer.
What I don't understand is that when I was with Axis1 (and rpc/lit style 
for this WS) this kind of validation was impossible.
Anyway, I'm going to deploy a module validating the request body. Some 
newbie questions about this module:
- My WS is defined in a wsdl including several xsd: what file to I load to 
have my scheme loaded?
- Does the AXIS2 classloader have access to the files inside the AAR? (my 
wsdl and xsd are in META-INF folder of the aar)

Thanks in advance,

Pierre




"Anne Thomas Manes" <at...@gmail.com> 
07/09/2007 00:00
Veuillez répondre à
axis-user@ws.apache.org


A
axis-user@ws.apache.org
cc

Objet
Re: [AXIS2] Request validation






That's normal. You could also set up a module to validate incoming 
messages.

Anne

On 9/6/07, p.casenove@almerys.com <p....@almerys.com> wrote:
>
> Hi,
> I am using Axis2 1.3 and JAXB databinding.
> My WS is using doc/lit style and I have a problem with the incoming 
request:
> Axis2 rejects the requests if the xml is malformed (missing tags for
> example) but it forwards the request to the WS even if the value in the 
tag
> are incorrect.
> For example, in my xsd, I define a tag as a positive Integer
> (xs:positiveInteger) and if I send a request with a negative integer, 
the
> request is forwarded to the WS.
> Is this normal?
> Is it up to the WS to check the value inside the body tags?
>
> Thanks in advance,
>
> Pierre

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



Re: [AXIS2] Request validation

Posted by Anne Thomas Manes <at...@gmail.com>.
That's normal. You could also set up a module to validate incoming messages.

Anne

On 9/6/07, p.casenove@almerys.com <p....@almerys.com> wrote:
>
> Hi,
> I am using Axis2 1.3 and JAXB databinding.
> My WS is using doc/lit style and I have a problem with the incoming request:
> Axis2 rejects the requests if the xml is malformed (missing tags for
> example) but it forwards the request to the WS even if the value in the tag
> are incorrect.
> For example, in my xsd, I define a tag as a positive Integer
> (xs:positiveInteger) and if I send a request with a negative integer, the
> request is forwarded to the WS.
> Is this normal?
> Is it up to the WS to check the value inside the body tags?
>
> Thanks in advance,
>
> Pierre

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