cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chun Zhang (JIRA)" <>
Subject [jira] [Created] (CXF-3541) wsdl2java - XmlBeans Binding does not handle collections/array properly
Date Fri, 20 May 2011 16:30:47 GMT
wsdl2java - XmlBeans Binding does not handle collections/array properly

                 Key: CXF-3541
             Project: CXF
          Issue Type: Bug
          Components: Tooling
    Affects Versions: 2.3.4, 2.4
            Reporter: Chun Zhang

Generated Java code using CXF wsdl2java with xmlbeans databinding contains wrong return type
for collections/arrays.

To reproduce the problem.

   1. Use CustomerService.wsdl file from the wsdl_first sample.
   2. Run wsdl2java without a binding file.
   3. Look at the generated interface

The generated code for getCustomersByName operation on CustomerService service is shown below
  @WebService(targetNamespace = "", name = "CustomerService")
  public interface CustomerService {
      @WebResult(name = "return", targetNamespace = "")
      @RequestWrapper(localName = "getCustomersByName", targetNamespace = "",

                      className = "com.example.customerservice.GetCustomersByNameDocument")
      @ResponseWrapper(localName = "getCustomersByNameResponse", targetNamespace = "",

                       className = "com.example.customerservice.GetCustomersByNameResponseDocument")
      public com.example.customerservice.Customer getCustomersByName(
           @WebParam(name = "name", targetNamespace = "")
           String name
      ) throws NoSuchCustomerException;
Note that the getCustomersByName () method returns Customer object. 
Based on the CusotmerService.wsdl, it should return a list of Customers or the wrapper GetCustomersByNameResponse

Workaround (Credit Daniel Kulp):

You can flip it to BARE mode by creating a small binding file containing:


and passing that to wsdl2java via the -b flag.   That would force the BARE 
mode and wouldn't attempt the unwrapping.

This message is automatically generated by JIRA.
For more information on JIRA, see:

View raw message