axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gaurav Lall <learnframewo...@gmail.com>
Subject Re: Urgent Help - disable xsd validation in axis 1.4
Date Fri, 18 Jan 2008 23:36:05 GMT
I am not sure there is much  axis framework can help you with this , 
probably you will have to write custom servlet filter(assuming http) and 
modify the request to set the  mandatory fields in xml (just an idea )
Ramkumar Menon wrote:
> Resending - Please let me know how to disable schema validation for axis 1.4.
>
> ram
>
> On 1/14/08, Ramkumar Menon <ramkumar.menon@gmail.com> wrote:
>   
>> Hi Gurus,
>>
>> I am struggling with a specific issue described below in brief.
>>
>> I have a doc/literal Web Service that accepts a Customer element in
>> its request and response.
>> The customer element is defined in an XML Schema imported into the
>> service WSDL.The customer element has a set of child elements,none of
>> which are defined as optional within the schema. [i.e. all mandatory].
>> I have the client generated using wsdl2java, and am populating the
>> Customer object and then invoking the web service at its mentioned
>> port.
>> For e.g.
>>
>> customer.setName("asdsas");
>> customer.setCity("asdasd").
>> customer.setCountry("US").
>>
>> ......
>>
>> invokeService(customer);
>>
>>
>> The axis layer naturally throws an exception while it tries to
>> serialize the java objects into XML, complaining that "customerId",
>> which is a mandatory field is null.
>> In fact, customerId is populated as a part of the response of the
>> invocation, and is never available prior to the invocation.
>>
>> Is there a way to avoid this error altogether - assuming the following
>> constraints.
>> a) Calling program cannot do call a set API on all mandatory fields
>> with a dummy value to work around this error.
>> b) The Schema cannot be changed to ensure that these elements are optional.
>>
>> So, the axis layer just needs to ignore the fact that though
>> customerId is mandatory, it just needs to continue processing even
>> through the caller did not set the customerId on the customer object.
>>
>> --
>> Shift to the left, shift to the right!
>> Pop up, push down, byte, byte, byte!
>>
>> -Ramkumar Menon
>>  A typical Macroprocessor
>>
>>     
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message