First try and read the section in this wiki titled
"How can I switch my generated web service method calls
from wrapper style to non wrapper-style (or vice-versa)?"
http://cwiki.apache.org/confluence/display/CXF20DOC/WSDL+to+Java 

and the related section referenced in the JAX-WS 2.1 specification.

That being said I didn't have too much luck with the
enableWrapperStyle flag.  Instead I am controlling it with
the naming convention - which is case sensitive.  So if I
name the operation "GetObjects" vesus "getObjects" it
changes style from wrapped to unwrapped (either way the
generated java method is called "getObjects").

- Dan


> -----Original Message-----
> From: Michael Nelson [mailto:[EMAIL PROTECTED] 
> Sent: Saturday, March 01, 2008 6:21 AM
> To: cxf-user@incubator.apache.org
> Subject: request/response wrapper with wsdl2java
> 
> For non-trivial methods, WSDL2Java forces me to deal with 
> request/response
> wrapper classes in the client code it generates (see the 1st method as
> compared to the 2nd method). Is there a way to prevent this?
> 
> Thanks,
> -mike
> 
> Examples:
> 
>     @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
>     @WebResult(name = "getCustomerResponse", targetNamespace = "
> http://customer.acme.com";, partName = "parameters")
>     @WebMethod
>     public com.acme.customer.GetCustomerResponse getCustomer(
>         @WebParam(partName = "parameters", name = "getCustomer",
> targetNamespace = "http://customer.acme.com";)
>         GetCustomer parameters
>     ) throws CustomerNotFoundFault;
> 
>     @RequestWrapper(localName = "deleteCustomer2", targetNamespace = "
> http://customer.acme.com";, className = 
> "com.acme.customer.DeleteCustomer2")
>     @ResponseWrapper(localName = "deleteCustomer2Response", 
> targetNamespace
> = "http://customer.acme.com";, className = "
> com.acme.customer.DeleteCustomer2Response")
>     @WebMethod
>     public void deleteCustomer2(
>         @WebParam(name = "id", targetNamespace = 
> "http://customer.acme.com";)
>         long id
>     );
> 

Reply via email to