Project and Portfolio Management Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Apache CXF Based Client for PPM Webservices

Highlighted
ussraf
Occasional Advisor

Apache CXF Based Client for PPM Webservices

Hi,

 

Anyone has tried Apache CXF based client for PPM Webservice? When I am generating the client code using WCF WSDL2Java , the following error was thrown. If you check the Common.xsd and Project.xsd, you will find there are 2 complexType and element both named "field/Field"(difference is capitalizaion). I tried -autoNameResolution, but that doesn't work. As CXF is the only supported platform inside our organization, any suggestion will be great help for me.

 

     [java] WSDLToJava Error: Thrown by JAXB : A class/interface with the same name "msjava.cxfutils.examples.jaxws.calculator2.spring.client.generated.Field" is already in use. Use a class customization or the -autoNameResolution option to resolve this conflict.

     [java] org.apache.cxf.tools.common.ToolException: Thrown by JAXB : A class/interface with the same name "msjava.cxfutils.examples.jaxws.calculator2.spring.client.generated.Field" is already in use. Use a class customization or the -autoNameResolution option to resolve this conflict.

     [java]               at org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBBindErrorListener.error(JAXBBindErrorListener.java:41)

     [java]               at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.error(SchemaCompilerImpl.java:285)

     [java]               at com.sun.tools.xjc.util.ErrorReceiverFilter.error(ErrorReceiverFilter.java:77)

     [java]               at com.sun.tools.xjc.util.CodeModelClassFactory.createClass(CodeModelClassFactory.java:116)

     [java]               at com.sun.tools.xjc.util.CodeModelClassFactory.createClass(CodeModelClassFactory.java:77)

     [java]               at com.sun.tools.xjc.generator.bean.ImplStructureStrategy$1.createClasses(ImplStructureStrategy.java:78)

     [java]               at com.sun.tools.xjc.generator.bean.BeanGenerator.generateClassDef(BeanGenerator.java:403)

     [java]               at com.sun.tools.xjc.generator.bean.BeanGenerator.getClazz(BeanGenerator.java:435)

     [java]               at com.sun.tools.xjc.generator.bean.BeanGenerator.<init>(BeanGenerator.java:202)

     [java]               at com.sun.tools.xjc.generator.bean.BeanGenerator.generate(BeanGenerator.java:175)

     [java]               at com.sun.tools.xjc.model.Model.generateCode(Model.java:286)

     [java]               at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:251)

     [java]               at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:85)

     [java]               at org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:374)

     [java]               at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.generateTypes(WSDLToJavaContainer.java:576)

     [java]               at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:228)

     [java]               at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:128)

     [java]               at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:271)

     [java]               at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103)

     [java]               at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113)

     [java]               at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86)

     [java]               at org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:184)

     [java]               at msjava.cxfutils.tools.SMWSDLToJava.main(SMWSDLToJava.java:26)

     [java] Caused by: org.xml.sax.SAXParseException: A class/interface with the same name "msjava.cxfutils.examples.jaxws.calculator2.spring.client.generated.Field" is already in use. Use a class customization to resolve this conflict.

     [java]               ... 20 more

1 REPLY
Utkarsh_Mishra
Honored Contributor

Re: Apache CXF Based Client for PPM Webservices

Debugging and deploying it using Apache CFX would take some time.

 

Rather you can user web service tool kit.

 

Copy this tool kit in destination machine and from there user PPM web service. it will be simple and quick; pluse no need to configure web server or Axis 2; the tool kit have these libraries embadded.

Cheers..
Utkarsh Mishra

-- Remember to give Kudos to answers! (click the KUDOS star)
//Add this to "OnDomLoad" event