axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Pfeifer" <>
Subject Schema Validation using Axis2
Date Thu, 05 Oct 2006 13:07:57 GMT

I have created a test web service (see below).  This service uses the RawXMLINOutMessageReceiver
and by default does not have a wsdl.  I created a WSDL  (where I defined the schema of the
xml document) and placed it in the META-INF directory.  When I test the web service with xml
that doesn't adhere to the schema, the request is still processed.  Does axis2 ignore the
WSDL?  If so, how can I validate the schema before it is passed to my web service?  I would
prefer to have all of the field level validations performed before I pass the XML off to JiBX.
 I understand that schema validation can be expensive, but I am dealing with small XML documents
and am willing to take the hit for the benefit of the field level validations.  I would think
that this is a common issue that someone else has solved, so any help you can provide would
be greatly appreciated.

public class TestWebService {
    private MessageContext inMessageContext = null;

    public void setOperationContext(OperationContext opContext) throws AxisFault {
        this.inMessageContext = opContext.getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE);

    public OMElement SendEmail(OMElement element) throws AxisFault, XMLStreamException {
        System.out.println("test start");


View raw message