Hey Arvind

I'll suggest you, if my understanding is correct, to insert a handler/module that validates the input against the XML Schema, and if it fails you can throw back a soapexception. This works as a very simple 'syntax wall', giving some insurance that I'll not have to check every (mal)variant of the request (or reply) in code. This is mostly if you develop 'contract-first' with strong xsd types/elements, but will work any way. Once you've created the module it's simple to reuse it whenever you like.

Regards Brian



[EMAIL PROTECTED] wrote:
How do we do that?

Arvind Bir

-----Original Message-----
From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: Thursday, September 07, 2006 6:10 PM
To: [email protected]
Subject: Re: Invalid Date conversion

The JAX-RPC spec specifies that xs:date maps to Calendar, and Axis
follws the spec.

You can create your own type and map it to Date, or you can pass the
data as a string.

Anne

On 9/7/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

Hi all,

We are using Axis 1.4, we are facing problem while validating date element passed in message. Details are as follows:

Message schema snippet:



<xs:element name="transferDate" type="xs:date">

    <xs:annotation>

<xs:documentation>Date the first transfer in a series is scheduled</xs:documentation>

    </xs:annotation>

</xs:element>



Invalid date passed:

<transferDate>2006-14-33</transferDate>

After axis is done with the message handling, we get the date as instance of Date. But the actual date we get is 2007-03-05 as internally Calendar must be lenient and calculated date accordingly.

But this is undesired option in our application, we need to throw error if invalid date is passed, in other words, we don't want axis to

be lenient while creating the instance from the passed date.

Any suggestions, other than following?

- Convert the datatype from xs:date to string in schema

Arvind Bir


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to