WSDL2Java « cxf « Java Enterprise Q&A

1. WSDL2Java for overloaded methods?

I am trying to run WSDL2Java (Apache CXF) on a WSDL that contains overloaded methods (same method name, different parameters). It seems to me like I need to write either ...

2. Importing a WebService:

I'm trying to import the following web service: Using curl for the service getResistry() : everything is OK:

curl --header 'Content-Type: text/xml' --data '<?xml version="1.0"?><soapenv:Envelope xmlns:soapenv="" xmlns:mar="">

3. CXF: Cloneable classes from wsdl2java?

Is it possible to have CXF's wsdl2java emit cloneable classes? Maybe via some option or a plug-in? What I need to do is copy by value a rather complex schema structure ...

4. Apache CXF 2.3.0 WSDLToJava problem

I'm trying out apachecxf 2.3.0 and i'm having problems using the wsdlToJava tool. No matter what, i get an WSDLToJava Error: java.lang.reflect.UndeclaredThrowableException. Tried an older version 2.1 and it works fine ...

5. Two classes have the same xml type name

When I try to publish my Workspace in RAD, I get this error "Two classes have the same xml type name", probably because the same class name exists in the same ...

6. Bundling wsdl in jar with CXF wsdl2java

I'm working on an implementation that will use a wsdl that I have gotten from a vendor. Our project is running on Spring and CXF, and I'd like to create a ...

7. Why this Ant/Ivy integration of CXF WSDLToJava does not work?

I would like to use WSDLToJava of Apache CXF in my Ant buildfile to create Java code from a WSDL. The dependencies are resolved using

8. JaxWsDynamicClientFactory.newInstance().createClient() and wsdl2Java inconsistencies

So I'm trying to use JaxWsDynamicClientFactory to dynamically create the SEI classes. Running the below code

JaxWsDynamicClientFactory def = JaxWsDynamicClientFactory.newInstance();
generates classes: com.mycompany.project.service.GetProducts com.mycompany.project.service.GetStatus running:
wsdl2Java -d "C/:outputdir" "http://localhost:8080/TheTestService/TestService?wsdl" 
generates classes com.mycompany.project.service.ServiceInterface com.mycompany.project.service.GetProducts com.mycompany.project.service.GetStatus com.mycompany.project.service.impl.ServiceInterface Furthermore, when I try to call
client.invoke("getProducts", ...

9. Set Java Compliance Level in CXF wsdl2java

I’m brand new to CXF and am trying to create a client from WSDL. I have used Metro and Axis in the past. I downloaded apache-cxf-2.3.3 and used wsdl2java ...

10. Using wsdl2java to generate stub with PROPER async support

Lets say I have a service with ONLY one method: int generateRandomNumbers(). Is is possible to use wsdl2java to generate a stub with proper async support? For example, the generated class should has ...

11. CXF Wsdl2Java Best Practice

I'm currently using cxf 2.4.0 and my code is a caller to a webservice. I was able to generate the client side java files using the cxf plugin in Maven. ...

12. Does Apache CXF support "output only" services? If so, how do you get wsdl2java to handle it?

While using Apache CXF, I'd like to define a port type like this:

<wsdl:portType name="CustomerNotificationPort">
    <wsdl:operation name="changeNotification">
        <wsdl:output message="tns:NotificationMessage"/>

13. WSDL conversion to Java

I have to convert a WSDL to java classes for creating WS server and that WSDL uses RPC/encoded. This encoding is not supported in cxf or in JWS 2.0. So I have commmented ...

14. JAX-WS and apache CXF wsdl2js

I've a WS with JAX-WS and this WSDL

<wsdl:definitions name="PreventiviBO"
    <xs:schema attributeFormDefault="unqualified"

15. PortType operation input name missing in WSDL

I have a WSDL where portType-operation-input-name is missing.Everything else is fine.I am using WSDL2JAVA from Ant task using CXF.

    <operation name="Sym">

16. change package of generated jaxb class

I have the following data type defined in a wsdl:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="myService" targetNamespace="" xmlns:wsdl="" xmlns:tns="" xmlns:xsd="" xmlns:soap="">
        <xs:schema xmlns:xs="" ...

17. Integer to int using jaxb

I have a weird situation where the getter in a class returns a primitive int type, and the setter takes a Integer class. When jaxb unmarshals an element to this class, it ...

19. Problem with CXF wsdl2java

20. Issues with CXF WSDL2Java

I have a web service that I have been using for that last few years using Axis2. We are now converting our web service client to CXF. I get the following error when I try and generate the java client using WSDL2Java from CXF. Any suggestions would be appreciated. I am using version 2.2.9 of CXF WSDLToJava Error: Non-unique body parts! ...

21. can we generate java classes using wsdl2java cxf command to specific targetNamespace

hi all, I have written a service interface like below: @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE) @WebResult(targetNamespace = "", partName = "parameters", name = "MatchedCustomer") @WebMethod public MatchedCustomer addDetails( @WebParam(targetNamespace = "", name = "requestDetails") Request request,@WebParam(targetNamespace = "", name = "headerInfoDetails", header = true) HeaderInfo headerInfo ) throws CustomException; Here addDetails service method takes two arguments : Class and Class When ...