Hi,

I think a nice end to this thread would be a couple lines of code
telling me how to turn on schema validation?  Thanks.


John 

> -----Original Message-----
> From: Daniel Kulp [mailto:[email protected]] 
> Sent: 19 February 2009 15:19
> To: [email protected]
> Cc: Baker, John: IT (LDN)
> Subject: Re: CXF vs Apache 1.4
> 
> On Thu February 19 2009 10:08:23 am 
> [email protected] wrote:
> > And if I set the missing object in CXF, HPSC doesn't reject 
> the message.
> >
> > It's obviously interpreting the WSDL incorrectly (it uses 
> an ancient 
> > version of gSoap).  So I guess my question comes down to, given the 
> > WSDL extract, is it acceptable for the <keys /> element not 
> to be sent 
> > in the message?
> 
> No.   But by default, CXF doesn't do schema validation on the 
> XML that JAXB 
> produces for performance reasons.    We pretty much assume 
> you are filling in 
> the required data.  
> 
> You can turn on schema validation which would have caught 
> this, but performance will obviously be a bit lower.
> 
> Dan
> 
> 
> 
> >
> > > -----Original Message-----
> > > From: Baker, John: IT (LDN)
> > > Sent: 19 February 2009 14:52
> > > To: [email protected]
> > > Subject: CXF vs Apache 1.4
> > >
> > > Hi,
> > >
> > > I recently attempted to write a client for HP Service 
> Center using 
> > > CXF 2.1.4, and HPSC would not accept the message (it 
> wouldn't tell 
> > > us why either, it just decided the message was invalid).  I then 
> > > generated stubs using Axis and went through the same 
> procedure, but 
> > > Axis wouldn't send the message because I was not setting an 
> > > attribute.  It threw an exception and forced me to set it, even 
> > > though the resulting XML (in the
> > > message) just had the following placed into the message:
> > >
> > > <keys />
> > >
> > > I've included the relevant part of the WSDL below:
> > >
> > > <xs:complexType name="ChangeModelType">
> > >   <xs:sequence>
> > >     <xs:element name="keys" type="ChangeKeysType"/>
> > >     ..
> > >
> > > Without setting the keys attribute on ChangeModelType, 
> Apache says:
> > >
> > > java.io.IOException: Non nillable element 'keys' is null.
> > >   at
> > > org.apache.axis.encoding.ser.BeanSerializer.serialize(BeanSeri
> > > alizer.jav
> > > a:215)
> > >
> > > Why doesn't CXF exhibit the same behaviour?
> > >
> > > Thanks,
> > >
> > >
> > > John
> > > _______________________________________________
> > >
> > > This e-mail may contain information that is confidential, 
> privileged 
> > > or otherwise protected from disclosure. If you are not an 
> intended 
> > > recipient of this e-mail, do not duplicate or 
> redistribute it by any 
> > > means. Please delete it and any attachments and notify the sender 
> > > that you have received it in error. Unless specifically 
> indicated, 
> > > this e-mail is not an offer to buy or sell or a 
> solicitation to buy 
> > > or sell any securities, investment products or other financial 
> > > product or service, an official confirmation of any 
> transaction, or 
> > > an official statement of Barclays. Any views or opinions 
> presented 
> > > are solely those of the author and do not necessarily represent 
> > > those of Barclays. This e-mail is subject to terms 
> available at the 
> > > following link:
> > > www.barcap.com/emaildisclaimer. By messaging with Barclays you 
> > > consent to the foregoing.  Barclays Capital is the investment 
> > > banking division of Barclays Bank PLC, a company registered in 
> > > England (number 1026167) with its registered office at 1 
> Churchill 
> > > Place, London, E14 5HP.  This email may relate to or be sent from 
> > > other members of the Barclays Group.
> > > _______________________________________________
> >
> > _______________________________________________
> >
> > This e-mail may contain information that is confidential, 
> privileged 
> > or otherwise protected from disclosure. If you are not an intended 
> > recipient of this e-mail, do not duplicate or redistribute 
> it by any 
> > means. Please delete it and any attachments and notify the 
> sender that 
> > you have received it in error. Unless specifically indicated, this 
> > e-mail is not an offer to buy or sell or a solicitation to 
> buy or sell 
> > any securities, investment products or other financial product or 
> > service, an official confirmation of any transaction, or an 
> official 
> > statement of Barclays. Any views or opinions presented are solely 
> > those of the author and do not necessarily represent those of 
> > Barclays. This e-mail is subject to terms available at the 
> following 
> > link: www.barcap.com/emaildisclaimer. By messaging with 
> Barclays you 
> > consent to the foregoing.  Barclays Capital is the 
> investment banking 
> > division of Barclays Bank PLC, a company registered in 
> England (number 
> > 1026167) with its registered office at 1 Churchill Place, London,
> > E14 5HP.  This email may relate to or be sent from other members of 
> > the Barclays Group. _______________________________________________
> 
> --
> Daniel Kulp
> [email protected]
> http://www.dankulp.com/blog
> 
_______________________________________________

This e-mail may contain information that is confidential, privileged or 
otherwise protected from disclosure. If you are not an intended recipient of 
this e-mail, do not duplicate or redistribute it by any means. Please delete it 
and any attachments and notify the sender that you have received it in error. 
Unless specifically indicated, this e-mail is not an offer to buy or sell or a 
solicitation to buy or sell any securities, investment products or other 
financial product or service, an official confirmation of any transaction, or 
an official statement of Barclays. Any views or opinions presented are solely 
those of the author and do not necessarily represent those of Barclays. This 
e-mail is subject to terms available at the following link: 
www.barcap.com/emaildisclaimer. By messaging with Barclays you consent to the 
foregoing.  Barclays Capital is the investment banking division of Barclays 
Bank PLC, a company registered in England (number 1026167) with its registered 
office at 1 Churchill Place, London, E14 5HP.  This email may relate to or be 
sent from other members of the Barclays Group.
_______________________________________________

Reply via email to