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 Dimuthu Leelarathne <mu...@vijayaba.cse.mrt.ac.lk> on 2002/09/22 05:46:19 UTC

Re: XML Schama message validation.

Hi Marcin,

I guess you manually want to validate. I point out two ways of doing it.

1) You can write a handler. Get the SOAPBody from the MessageContext. Then
you can parse it with xerces.

2) You can write a message style service with below signature.

 public Element [] method(Element [] bodies);
 public SOAPBodyElement [] method (SOAPBodyElement [] bodies);
 public Document method(Document body);
 public void method(SOAPEnvelope req, SOAPEnvelope resp);

And then you can validate it using xerces within the body.

Regards,
Dimuthu.


----- Original Message -----
From: "Marcin Okraszewski" <ok...@o2.pl>
To: <ax...@ws.apache.org>
Sent: Monday, September 22, 2003 12:13 AM
Subject: XML Schama message validation.


> Hi,
> I would like to validate incoming messages against XML Schema
> definition, but unfortunately I don't know to do it.
>
> Could you tell me how to do it?
>
> Thanks in advance.
> Marcin Okraszewski
>
>
>



Re: XML Schama message validation.

Posted by Marcin Okraszewski <ok...@o2.pl>.
>2) You can write a message style service with below signature.
>
> public Element [] method(Element [] bodies);
> public SOAPBodyElement [] method (SOAPBodyElement [] bodies);
> public Document method(Document body);
> public void method(SOAPEnvelope req, SOAPEnvelope resp);
>
>And then you can validate it using xerces within the body.

Yes, this is exactly what I need. But how to run xerces validation on a 
DOM document? I see methods for validating document while parsing it, 
but not for validating a previously built DOM document.

Thank you for help.
Marcin

-- 
-------------------------------------------------------------
                       Marcin Okraszewski
okrasz@o2.pl                                       GG: 341942
okrasz@vlo.ids.gda.pl          PGP: www.okrasz.prv.pl/pgp.asc
-------------------------------------------------------------



Re: XML Schama message validation.

Posted by Dimuthu Leelarathne <mu...@vijayaba.cse.mrt.ac.lk>.
----- Original Message -----
From: "Dimuthu Leelarathne" <mu...@vijayaba.cse.mrt.ac.lk>
To: <ax...@ws.apache.org>
Sent: Sunday, September 22, 2002 9:46 AM
Subject: Re: XML Schama message validation.


> Hi Marcin,
>
> I guess you manually want to validate. I point out two ways of doing it.
>
> 1) You can write a handler. Get the SOAPBody from the MessageContext. Then
> you can parse it with xerces.
>
> 2) You can write a message style service with below signature.
>
>  public Element [] method(Element [] bodies);
>  public SOAPBodyElement [] method (SOAPBodyElement [] bodies);
>  public Document method(Document body);
>  public void method(SOAPEnvelope req, SOAPEnvelope resp);
>
> And then you can validate it using xerces within the body.
>
> Regards,
> Dimuthu.
>
>
> ----- Original Message -----
> From: "Marcin Okraszewski" <ok...@o2.pl>
> To: <ax...@ws.apache.org>
> Sent: Monday, September 22, 2003 12:13 AM
> Subject: XML Schama message validation.
>
>
> > Hi,
> > I would like to validate incoming messages against XML Schema
> > definition, but unfortunately I don't know to do it.
> >
> > Could you tell me how to do it?
> >
> > Thanks in advance.
> > Marcin Okraszewski
> >
> >
> >
>
>
>