You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by jp4 <jo...@hnpsolutions.com> on 2009/04/02 20:21:31 UTC

Custom Schema Validator

I am able to configure my web services with schema validation enabled.  The
next step is to catch any schema validation errors and throw a fault that
adheres to the contract.  

Can anyone tell me how I can go about this?  Essentially, I'd like to wrap
the spring bean that performs schema validation, catch a schema validation
exception and throw a fault.

Any help would be greatly appreciated.

Thanks,

John
-- 
View this message in context: http://www.nabble.com/Custom-Schema-Validator-tp22854150p22854150.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Custom Schema Validator

Posted by Ian Roberts <i....@dcs.shef.ac.uk>.
jp4 wrote:
> I signed up for access to the CXF JIRA but I can't seem to create a new
> issue.  How do I go about creating a new issue?

If you're logged into the JIRA there should be a "Create new issue" link
in the bar at the top.

Ian

-- 
Ian Roberts               | Department of Computer Science
i.roberts@dcs.shef.ac.uk  | University of Sheffield, UK

Re: Custom Schema Validator

Posted by jp4 <jo...@hnpsolutions.com>.
I signed up for access to the CXF JIRA but I can't seem to create a new
issue.  How do I go about creating a new issue?


jp4 wrote:
> 
> Sorry... I'm using JAXB.
> 
> I'll open a JIRA item for this.  Thanks in advance for your help!
> 
> Thanks,
> 
> John
> 
> bimargulies wrote:
>> 
>> You still haven't told me if you are using Aegis or JAXB, but now I'm
>> pretty
>> confident it's JAXB.
>> 
>> Give me a JIRA and I'll just make it work like this all the  time, no
>> need
>> for you to customize a perfectly reasonable idea of this form. If there's
>> some reason not to, I'll post customization advice onto the JIRA.
>> 
>> 
>> On Thu, Apr 2, 2009 at 4:50 PM, jp4 <jo...@hnpsolutions.com>
>> wrote:
>> 
>>>
>>> A generic fault is returned...  Something like this...  But I would like
>>> to
>>> throw an application defined Fault like SchemaValidationFault.
>>>
>>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>>>   <soap:Body>
>>>      <soap:Fault>
>>>         <faultcode>soap:Client</faultcode>
>>>         <faultstring>Unmarshalling Error: cvc-complex-type.2.4.b: The
>>> content of element 'hear:GetHeartBeatRequest' is not complete. One of
>>> '{"
>>> http://www.foo.com/enterpriseservices/heartbeatservices/heartbeatservices_1_0_0
>>> ":Token}'
>>> is expected.</faultstring>
>>>      </soap:Fault>
>>>   </soap:Body>
>>> </soap:Envelope>
>>>
>>>
>>> bimargulies wrote:
>>> >
>>> > Don't we already make a fault? Which data binding are you using.
>>> >
>>> > On Thu, Apr 2, 2009 at 2:21 PM, jp4 <jo...@hnpsolutions.com>
>>> wrote:
>>> >
>>> >>
>>> >> I am able to configure my web services with schema validation
>>> enabled.
>>> >> The
>>> >> next step is to catch any schema validation errors and throw a fault
>>> that
>>> >> adheres to the contract.
>>> >>
>>> >> Can anyone tell me how I can go about this?  Essentially, I'd like to
>>> >> wrap
>>> >> the spring bean that performs schema validation, catch a schema
>>> >> validation
>>> >> exception and throw a fault.
>>> >>
>>> >> Any help would be greatly appreciated.
>>> >>
>>> >> Thanks,
>>> >>
>>> >> John
>>> >> --
>>> >> View this message in context:
>>> >>
>>> http://www.nabble.com/Custom-Schema-Validator-tp22854150p22854150.html
>>> >> Sent from the cxf-user mailing list archive at Nabble.com.
>>> >>
>>> >>
>>> >
>>> >
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Custom-Schema-Validator-tp22854150p22856723.html
>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>
>>>
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Custom-Schema-Validator-tp22854150p22910526.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Custom Schema Validator

Posted by jp4 <jo...@hnpsolutions.com>.
Sorry... I'm using JAXB.

I'll open a JIRA item for this.  Thanks in advance for your help!

Thanks,

John

bimargulies wrote:
> 
> You still haven't told me if you are using Aegis or JAXB, but now I'm
> pretty
> confident it's JAXB.
> 
> Give me a JIRA and I'll just make it work like this all the  time, no need
> for you to customize a perfectly reasonable idea of this form. If there's
> some reason not to, I'll post customization advice onto the JIRA.
> 
> 
> On Thu, Apr 2, 2009 at 4:50 PM, jp4 <jo...@hnpsolutions.com> wrote:
> 
>>
>> A generic fault is returned...  Something like this...  But I would like
>> to
>> throw an application defined Fault like SchemaValidationFault.
>>
>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>>   <soap:Body>
>>      <soap:Fault>
>>         <faultcode>soap:Client</faultcode>
>>         <faultstring>Unmarshalling Error: cvc-complex-type.2.4.b: The
>> content of element 'hear:GetHeartBeatRequest' is not complete. One of
>> '{"
>> http://www.foo.com/enterpriseservices/heartbeatservices/heartbeatservices_1_0_0
>> ":Token}'
>> is expected.</faultstring>
>>      </soap:Fault>
>>   </soap:Body>
>> </soap:Envelope>
>>
>>
>> bimargulies wrote:
>> >
>> > Don't we already make a fault? Which data binding are you using.
>> >
>> > On Thu, Apr 2, 2009 at 2:21 PM, jp4 <jo...@hnpsolutions.com>
>> wrote:
>> >
>> >>
>> >> I am able to configure my web services with schema validation enabled.
>> >> The
>> >> next step is to catch any schema validation errors and throw a fault
>> that
>> >> adheres to the contract.
>> >>
>> >> Can anyone tell me how I can go about this?  Essentially, I'd like to
>> >> wrap
>> >> the spring bean that performs schema validation, catch a schema
>> >> validation
>> >> exception and throw a fault.
>> >>
>> >> Any help would be greatly appreciated.
>> >>
>> >> Thanks,
>> >>
>> >> John
>> >> --
>> >> View this message in context:
>> >> http://www.nabble.com/Custom-Schema-Validator-tp22854150p22854150.html
>> >> Sent from the cxf-user mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Custom-Schema-Validator-tp22854150p22856723.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Custom-Schema-Validator-tp22854150p22857294.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Custom Schema Validator

Posted by smsarma <sm...@yahoo.com>.
Thanks a lot on the input .In which Phase i need to add is it SEND. DO i need
to add before any interceptor.


--
View this message in context: http://cxf.547215.n5.nabble.com/Custom-Schema-Validator-tp563729p5700762.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Custom Schema Validator

Posted by Daniel Kulp <dk...@apache.org>.
On Wednesday, May 09, 2012 11:46:29 AM smsarma wrote:
> Are there any solution to this issue.I am using JAXB . and using cxf 2.5 .
> Turned on the "schema-validation-enabled" .Want to have custom fault
> message.Any help

Likely would need to write an interceptor that would live at the very start 
of the ouf fault chain that would take the fault from the message and map it 
into a new fault with whatever message you want.

Dan

> 
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Custom-Schema-Validator-tp563729p5698211.
> 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


Re: Custom Schema Validator

Posted by smsarma <sm...@yahoo.com>.
Are there any solution to this issue.I am using JAXB . and using cxf 2.5 .
Turned on the "schema-validation-enabled" .Want to have custom fault
message.Any help

--
View this message in context: http://cxf.547215.n5.nabble.com/Custom-Schema-Validator-tp563729p5698211.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Custom Schema Validator

Posted by Benson Margulies <bi...@gmail.com>.
You still haven't told me if you are using Aegis or JAXB, but now I'm pretty
confident it's JAXB.

Give me a JIRA and I'll just make it work like this all the  time, no need
for you to customize a perfectly reasonable idea of this form. If there's
some reason not to, I'll post customization advice onto the JIRA.


On Thu, Apr 2, 2009 at 4:50 PM, jp4 <jo...@hnpsolutions.com> wrote:

>
> A generic fault is returned...  Something like this...  But I would like to
> throw an application defined Fault like SchemaValidationFault.
>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>   <soap:Body>
>      <soap:Fault>
>         <faultcode>soap:Client</faultcode>
>         <faultstring>Unmarshalling Error: cvc-complex-type.2.4.b: The
> content of element 'hear:GetHeartBeatRequest' is not complete. One of
> '{"
> http://www.foo.com/enterpriseservices/heartbeatservices/heartbeatservices_1_0_0
> ":Token}'
> is expected.</faultstring>
>      </soap:Fault>
>   </soap:Body>
> </soap:Envelope>
>
>
> bimargulies wrote:
> >
> > Don't we already make a fault? Which data binding are you using.
> >
> > On Thu, Apr 2, 2009 at 2:21 PM, jp4 <jo...@hnpsolutions.com>
> wrote:
> >
> >>
> >> I am able to configure my web services with schema validation enabled.
> >> The
> >> next step is to catch any schema validation errors and throw a fault
> that
> >> adheres to the contract.
> >>
> >> Can anyone tell me how I can go about this?  Essentially, I'd like to
> >> wrap
> >> the spring bean that performs schema validation, catch a schema
> >> validation
> >> exception and throw a fault.
> >>
> >> Any help would be greatly appreciated.
> >>
> >> Thanks,
> >>
> >> John
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Custom-Schema-Validator-tp22854150p22854150.html
> >> Sent from the cxf-user mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Custom-Schema-Validator-tp22854150p22856723.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>

Re: Custom Schema Validator

Posted by jp4 <jo...@hnpsolutions.com>.
A generic fault is returned...  Something like this...  But I would like to
throw an application defined Fault like SchemaValidationFault.  

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <soap:Fault>
         <faultcode>soap:Client</faultcode>
         <faultstring>Unmarshalling Error: cvc-complex-type.2.4.b: The
content of element 'hear:GetHeartBeatRequest' is not complete. One of
'{"http://www.foo.com/enterpriseservices/heartbeatservices/heartbeatservices_1_0_0":Token}'
is expected.</faultstring>
      </soap:Fault>
   </soap:Body>
</soap:Envelope>


bimargulies wrote:
> 
> Don't we already make a fault? Which data binding are you using.
> 
> On Thu, Apr 2, 2009 at 2:21 PM, jp4 <jo...@hnpsolutions.com> wrote:
> 
>>
>> I am able to configure my web services with schema validation enabled. 
>> The
>> next step is to catch any schema validation errors and throw a fault that
>> adheres to the contract.
>>
>> Can anyone tell me how I can go about this?  Essentially, I'd like to
>> wrap
>> the spring bean that performs schema validation, catch a schema
>> validation
>> exception and throw a fault.
>>
>> Any help would be greatly appreciated.
>>
>> Thanks,
>>
>> John
>> --
>> View this message in context:
>> http://www.nabble.com/Custom-Schema-Validator-tp22854150p22854150.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Custom-Schema-Validator-tp22854150p22856723.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Custom Schema Validator

Posted by Benson Margulies <bi...@gmail.com>.
Don't we already make a fault? Which data binding are you using.

On Thu, Apr 2, 2009 at 2:21 PM, jp4 <jo...@hnpsolutions.com> wrote:

>
> I am able to configure my web services with schema validation enabled.  The
> next step is to catch any schema validation errors and throw a fault that
> adheres to the contract.
>
> Can anyone tell me how I can go about this?  Essentially, I'd like to wrap
> the spring bean that performs schema validation, catch a schema validation
> exception and throw a fault.
>
> Any help would be greatly appreciated.
>
> Thanks,
>
> John
> --
> View this message in context:
> http://www.nabble.com/Custom-Schema-Validator-tp22854150p22854150.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>