You have to ask for schema validation to get schema validation in CXF,
I think is the answer to your question.

On Thu, Feb 19, 2009 at 10:08 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?
>
>> -----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.
> _______________________________________________
>

Reply via email to