I just looked at your WSDL and noticed a couple of things. Most of
your elements are defined as restricted strings of lengths 20, 50, or
100. If you want to be able to support validation of these element,
you could defining three simple types with these restrictions, then
define the elements as the appropriate type.

More more note: when using document style, your <soap:body> and
<soap12:body> definitions in the binding MUST NOT include the
namespace attribute. That attribute is used only with RPC style. They
should look like this:

        <soap:body use="literal"/>
        <soap12:body use="literal"/>

Anne

On 1/30/07, Anne Thomas Manes <[EMAIL PROTECTED]> wrote:
XML Schema validation is a very expensive process; therefore it is
never performed automatically. If you want to validate your messages,
you must route your message through an intermediary or module to do
so.

If you don't intend to validate your messages, then I suggest you
remove the restrictions and just use native types. If you define
custom types for each element, wsdl2java must create a different Java
type for each one.

As a general good practice, I encourage you to always name your types
(i.e., define a type as a direct child of the <schema> component, not
as a child of an <element> component.)

Anne

On 1/30/07, mvkirankumar <[EMAIL PROTECTED]> wrote:
>
> Thanks Anne.
>
> As Dims and you suggested, i was successful to write a wsdl, write a schema
> into the wsdl, then perform wsdl2java, then edit the skeleton to put
> businesslogic and finally i was able to call the service from a MS Excel
> Client.
>
> Thanks for your help towards this.
>
> But, now i have a issue as follows:
>
> 1.
>
> I have included the schema definition for my elements in wsdl as follows:
>
> <xs:element name="CUSIP">
>            <xs:simpleType>
>         <xs:restriction base="xs:string">
>                         <xs:maxLength value="100"/>
>         </xs:restriction>
>            </xs:simpleType>
> </xs:element>
>
>
> Since im using the simpleType, wsdl2java ABD framework generates individual
> java classes for each such element.
> I have 190 + elements, so it creates 190+ java classes.
>
> I removed the simpletype for the above cusip and avoided restriction as
> follows:
>
> <xs:element name="CUSIP" type="xs:string"/>
>
>  Then i cannot see any class created by the wsdl2java for CUSIP. I could see
> the get/set methods in the parent element class itself.
>
> So, my question is: How to avoid creating multiple classes for each element,
> provided if i want to use restriction based validation?
>
> 2.
>
> Even though i had put restriction earlier and sent a CUSIP value > 100
> characters there was no validation fired at the wsdl level. Why is this?
>
> Why is that the Schema validation present inside the wsdl not firing?
> Am i doing something wrong anywhere in the implementation.
>
> I have attached the wsdl for reference (located at the end of this thread).
>
> Your help towards this would be much appreciable.
>
> Thanks,
> Kiran Kumar. http://www.nabble.com/file/6119/SecurityRequestV2.wsdl
> SecurityRequestV2.wsdl
> --
> View this message in context: 
http://www.nabble.com/-AXIS2--Which-binding-framework-should-i-use-for-complex-xml-handling-tf3137320.html#a8716986
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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