You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Jens <sm...@dzbank.de> on 2015/06/17 11:28:28 UTC

Schema Validation with non-WSDL endpoint?

Hi,

I have a (Camel) CXF endpoint that has no WSDL attached because it can
receive messages for various services. I'd still like the endpoint to
validate requests, though, ideally by looking up the schema to use from an
XML catalog or the like.

I have enabled schema validation on the endpoint, and it works fine if I
supply a WSDL, but it doesn't work without the WSDL. Is there a way to have
CXF validate the request with a setup like that?

Thanks,
Jens



--
View this message in context: http://cxf.547215.n5.nabble.com/Schema-Validation-with-non-WSDL-endpoint-tp5758353.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Schema Validation with non-WSDL endpoint?

Posted by Jens <sm...@dzbank.de>.
Ideally, CXF would just peek at the namespace on the message, pick the schema
corresponding to that namespace from the XML catalog and validate against
that.

Cheers,
Jens


Aki Yoshida-3 wrote
> Hi,
> I am not sure how you want to set it up. Where do you expect the
> corresponding schema to be specified?
> Specified in the message arbitrarily to just validate it own validity
> claim or some out of bands schemas are specified for the endpoint to
> accept or reject messages?
> 
> regards, aki
> 
> 2015-06-17 11:28 GMT+02:00 Jens &lt;

> smixdev@

> &gt;:
>> Hi,
>>
>> I have a (Camel) CXF endpoint that has no WSDL attached because it can
>> receive messages for various services. I'd still like the endpoint to
>> validate requests, though, ideally by looking up the schema to use from
>> an
>> XML catalog or the like.
>>
>> I have enabled schema validation on the endpoint, and it works fine if I
>> supply a WSDL, but it doesn't work without the WSDL. Is there a way to
>> have
>> CXF validate the request with a setup like that?
>>
>> Thanks,
>> Jens
>>
>>
>>
>> --
>> View this message in context:
>> http://cxf.547215.n5.nabble.com/Schema-Validation-with-non-WSDL-endpoint-tp5758353.html
>> Sent from the cxf-user mailing list archive at Nabble.com.





--
View this message in context: http://cxf.547215.n5.nabble.com/Schema-Validation-with-non-WSDL-endpoint-tp5758353p5758419.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Schema Validation with non-WSDL endpoint?

Posted by Aki Yoshida <el...@gmail.com>.
Hi,
I am not sure how you want to set it up. Where do you expect the
corresponding schema to be specified?
Specified in the message arbitrarily to just validate it own validity
claim or some out of bands schemas are specified for the endpoint to
accept or reject messages?

regards, aki

2015-06-17 11:28 GMT+02:00 Jens <sm...@dzbank.de>:
> Hi,
>
> I have a (Camel) CXF endpoint that has no WSDL attached because it can
> receive messages for various services. I'd still like the endpoint to
> validate requests, though, ideally by looking up the schema to use from an
> XML catalog or the like.
>
> I have enabled schema validation on the endpoint, and it works fine if I
> supply a WSDL, but it doesn't work without the WSDL. Is there a way to have
> CXF validate the request with a setup like that?
>
> Thanks,
> Jens
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Schema-Validation-with-non-WSDL-endpoint-tp5758353.html
> Sent from the cxf-user mailing list archive at Nabble.com.

Re: Schema Validation with non-WSDL endpoint?

Posted by Jens <sm...@dzbank.de>.
Thanks, Dan. Building the Schema object wouldn't be a problem at all. I'll
see if I can get hold of the ServiceInfo from the endpoint somehow.
Hopefully, Camel CXF still has that accessible. I'd rather not do it with an
interceptor on each invocation.


Daniel  Kulp wrote
> If the ServiceInfo object has a Schema.class property on it that would
> represent all the possible schemas, it should work.  Thus, if you can
> build up a javax.xml.validation.Schema object somehow, you would just need
> to get that set on the ServiceInfo.     This could be done during startup
> if you can get the ServiceInfo object or via an interceptor  that runs
> early in the chain.   
> 
> Dan
> -- 
> Daniel Kulp

> dkulp@

>  - http://dankulp.com/blog
> Talend Community Coder - http://coders.talend.com





--
View this message in context: http://cxf.547215.n5.nabble.com/Schema-Validation-with-non-WSDL-endpoint-tp5758353p5758489.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Schema Validation with non-WSDL endpoint?

Posted by Daniel Kulp <dk...@apache.org>.
If the ServiceInfo object has a Schema.class property on it that would represent all the possible schemas, it should work.  Thus, if you can build up a javax.xml.validation.Schema object somehow, you would just need to get that set on the ServiceInfo.     This could be done during startup if you can get the ServiceInfo object or via an interceptor  that runs early in the chain.   

Dan





> On Jun 17, 2015, at 5:28 AM, Jens <sm...@dzbank.de> wrote:
> 
> Hi,
> 
> I have a (Camel) CXF endpoint that has no WSDL attached because it can
> receive messages for various services. I'd still like the endpoint to
> validate requests, though, ideally by looking up the schema to use from an
> XML catalog or the like.
> 
> I have enabled schema validation on the endpoint, and it works fine if I
> supply a WSDL, but it doesn't work without the WSDL. Is there a way to have
> CXF validate the request with a setup like that?
> 
> Thanks,
> Jens
> 
> 
> 
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Schema-Validation-with-non-WSDL-endpoint-tp5758353.html
> Sent from the cxf-user mailing list archive at Nabble.com.

-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com