I'm having an interesting problem whereby I get redundant elements in my soap body.  Let me try to explain ...
 
I have written a CastorSerializer to load my mapping.xml file and handle the (un)marshalling of my data types.  Suppose my data type is this:
 
<complexType name="A">
    <sequence>
        <element name="b" type="xsd:string"/>
        <element name="c" type="xsd:string"/>
    </sequence>
</complexType>
 
I import this schema into my WSDL and define a couple of request/response wrappers for my operation.  Suppose my operation expects to use my "A" object in its method call, I then would have a request data type like this:
 
<element name="myMethodRequest" type="MyMethodRequest"/>
<complexType name="MyMethodRequest">
    <sequence>
        <element name="a" type="A"/>
    </sequence>
</complexType>
 
I then have "myMethodRequest" type mapped by the BeanSerializer and "a" type mapped by my CastorSerializer in my WSDD.
 
What I end up with at runtime is this:
 
<myMethodRequest>
    <a>
        <a>
            <b>
            <c>
        </a>
    </a>
</myMethodRequest>
 
And my Castor(De)Serializer hacks when it cannot find an "a" within an "a".
 
If tried saying this in my WSDL:
 
<element name="myMethodRequest" type="A"/>
 
but then WSDL2Java does not generate a MyMethodRequest class for some reason.
 
Thoughts?
 
Cheers.
Steve Maring
 
 


Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

Reply via email to