cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chun Zhang" <czh...@cambian.com>
Subject How to use xmlbeans databinding in CXF wsdl2java?
Date Thu, 19 May 2011 19:43:56 GMT
Hello,

I need to generate Java code using CXF wsdl2java with xmlbeans databinding. 

I tried it using the CustomerService.wsdl file from the wsdl_first sample.
See attached file. 

I got the following generated code for the CustomerService interface.  Here
is partial code. See attached CustomerService.java file for complete code
listing.

@WebService(targetNamespace = "http://customerservice.example.com/", name =
"CustomerService")
@DataBinding(org.apache.cxf.xmlbeans.XmlBeansDataBinding.class)
public interface CustomerService {

    @WebResult(name = "return", targetNamespace = "")
    @RequestWrapper(localName = "getCustomersByName", targetNamespace =
"http://customerservice.example.com/", className =
"com.example.customerservice.GetCustomersByNameDocument")
    @WebMethod
    @ResponseWrapper(localName = "getCustomersByNameResponse",
targetNamespace = "http://customerservice.example.com/", className =
"com.example.customerservice.GetCustomersByNameResponseDocument")
    public com.example.customerservice.Customer getCustomersByName(
        @WebParam(name = "name", targetNamespace = "")
        String name
    ) throws NoSuchCustomerException;
}

Note that in the generated code, the getCustomersByName () method returns
Customer object. Based on the CusotmerService.wsdl, it should return a list
of Customers or the wrapper GetCustomersByNameResponse object.  What can I
do to make wsdl2java generate the correct interface.

Thank you for your help!
Regards,
Chun Zhang




Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message