On Wednesday 16 April 2008, Fazle Khan wrote:
> I'm using spring-ws contract-first wsdl generation so I'll see if the
> users on that form have a suggestion.
>
> btw,  I did find 2 work arounds till I find a better solution
>
> 1.  pass in an empty string for the Object parameter of the service.
> 2.  Add an empty complexType to the Request that way a typed parameter
> is used in the service method and the class is generated.
>
>   <xs:element name="AllInstrumentsRequest">
>          <xs:complexType />
>  </xs:element>

This is actually the proper way to do it.   According to the schema spec, 
if you do:

<xs:element name="AllInstrumentsRequest"/>

The "type" of the element is actually a "xsd:anyType", not a "nothing".   
Thus, anything can be set into that element which is why it's mapped to 
a java.lang.Object from the code generator.   

By putting an empty complexType in there, you are giving it an explicit 
type instead of anyType.  (it's an anonymous type, but it IS a type)


-- 
J. Daniel Kulp
Principal Engineer, IONA
[EMAIL PROTECTED]
http://www.dankulp.com/blog

Reply via email to