parameterStyle.BARE or Wrapped
Hi,
working with wsimport, I have noticed that some times it generates an Interface with different parameterStyle
so for example, for this type of declaration
<xsd:complexType name="poll">
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="jobid" type="xsd:string">
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="filetype" type="xsd:string">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="poll" type="tns:poll"/>
it generates the following interface
@WebMethod
@WebResult(name ="result", targetNamespace ="http://www.ebi.ac.uk/ws/wublast", partName ="result")
@SOAPBinding(parameterStyle = ParameterStyle.BARE)
public String poll(
@WebParam(name ="poll", targetNamespace ="http://www.ebi.ac.uk/ws/wublast", partName ="parameters")
Poll parameters);
but for this
<xs:element type="ns1:add" name="add"/>
<xs:complexType name="add">
<xs:sequence>
<xs:element type="xs:int" name="arg0"/>
<xs:element type="xs:int" name="arg1"/>
</xs:sequence>
</xs:complexType>
generates
@WebMethod(action ="urn:Add")
@WebResult(targetNamespace ="")
@RequestWrapper(localName ="add", targetNamespace ="http://techtip.com/jaxws/sample", className ="com.techtip.jaxws.sample.Add")
@ResponseWrapper(localName ="addResponse", targetNamespace ="http://techtip.com/jaxws/sample", className ="com.techtip.jaxws.sample.AddResponse")
publicint add(
@WebParam(name ="arg0", targetNamespace ="")
int arg0,
@WebParam(name ="arg1", targetNamespace ="")
int arg1);
}
so the two parameters are separated,
how does it decide on which style to choose? how can I configure it in the WSDL? can I override this modifying the Interface?
thanks
Alberto

