You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Luca Barozzi <lu...@eng.it> on 2009/04/08 16:36:27 UTC

servicemix-http component does not check received xml is valid against xml schema in wsdl

Hi all,
servicemix-http component (I'm using servicemix 3.3) doesn't check for 
received xml to be valid against xml schema included in wsdl.
Looking at ConsumerProcessor and SoapHelper source code you can see it 
performs some check to determine operation but this implies a check for 
port type and the external envelope of the received xml. No chek is 
performed for the inner part of xml.
So the question is: "Is there any way to have it validate received xml 
against schema in wsdl?"
Maybe it should perform this check on meaningfull xml schema provision.

Cheers,
Luca

Re: servicemix-http component does not check received xml is valid against xml schema in wsdl

Posted by Gert Vanthienen <ge...@gmail.com>.
Luca,

We have a separate component available for doing schema validations.
Have a look http://servicemix.apache.org/servicemix-validation.html.
The benefit of this approach is that you can nicely separate things
out and have a convenient way of intercepting invalid requests and
e.g. also send a mail for it or send it to a DLQ.  The main drawback
is probably that the schema for your webservice also needs to be part
of the validation SU.

Another option would be to create a validating HTTP marshaler that
extends from the original one and that can notify the caller (by a
HTTP error code) that the XML message content is invalid.  Let us know
if you choose this solution and need help implementing it.  Btw, if
you could send us the improvement as a patch afterwards, that would be
even better -- we love patches ;)

Regards,

Gert Vanthienen
------------------------
Open Source SOA: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/



2009/4/8 Luca Barozzi <lu...@eng.it>:
> Hi all,
> servicemix-http component (I'm using servicemix 3.3) doesn't check for
> received xml to be valid against xml schema included in wsdl.
> Looking at ConsumerProcessor and SoapHelper source code you can see it
> performs some check to determine operation but this implies a check for port
> type and the external envelope of the received xml. No chek is performed for
> the inner part of xml.
> So the question is: "Is there any way to have it validate received xml
> against schema in wsdl?"
> Maybe it should perform this check on meaningfull xml schema provision.
>
> Cheers,
> Luca
>