You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Daniel Kulp <dk...@apache.org> on 2009/03/02 19:14:01 UTC

Re: Problems generating Code - Apache CXF Version 2.1.4

Hmm.... it's not really  a valid wsdl.   Not sure why the validator isn't 
picking it up.

The problem is in the parts:
<wsdl:part name="in" type="Login"/>

The "type" needs to be qualified.   Something like:
<wsdl:part name="in" type="uaaTypes:Login"/>

You would then need to add:
 targetNamespace="http://example.org/uaa/types/"
to the <xsd:schema> element as well.

In any case, a better error message is warranted.

Dan


On Sat February 28 2009 8:45:03 am Frank Thater wrote:
> Hello,
>
> I have some problems with the code generation from a WSDL file.
>
> The file (see attachement) seems to be valid. At least this is what the
> WSDL validator from CXF says:
>
> wsdlvalidator -verbose ..\META-INF\wsdl\MyService.wsdl
> wsdlvalidator - Apache CXF 2.1.4
>
> Passed Validation : Valid WSDL
>
> I generated the WSDL from scratch defining types, messages and ports.
> Thereafter I added the binding (SOAP 1.2) and the service element using
> the CXF tools wsdl2soap and wsdl2service. Everything worked fine.
>
> Trying to generate Java code from the WSDL (wsdl2java -verbose -all
> ..\META-INF\wsdl\MyService.wsdl) I get the following output:
>
> ----------------------------------------
>
> Loading FrontEnd jaxws ...
> Loading DataBinding jaxb ...
> wsdl2java -verbose -all ..\META-INF\wsdl\MyService.wsdl
> wsdl2java - Apache CXF 2.1.4
>
> WSDLToJava Error: Failed to create java parameter for part [in] in
> method [login] - this wsdl is invalid, please use the wsdlvalidator tool
> to validate this wsdl
>
> org.apache.cxf.tools.common.ToolException: Failed to create java
> parameter for part [in] in method [login] - this wsdl is invalid, please
> use the wsdlvalidator tool to validate this wsdl
>         at
> org.apache.cxf.tools.common.model.JavaMethod.addParameter(JavaMethod.
> java:156)
>         at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.Paramet
> erProcessor.addParameter(ParameterProcessor.java:112)
>         at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.Paramet
> erProcessor.processInput(ParameterProcessor.java:183)
>         at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.Paramet
> erProcessor.buildParamModelsWithoutOrdering(ParameterProcessor.java:546)
>         at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.Paramet
> erProcessor.process(ParameterProcessor.java:80)
>         at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.Operati
> onProcessor.processMethod(OperationProcessor.java:92)
>         at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.Operati
> onProcessor.process(OperationProcessor.java:63)
>         at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.PortTyp
> eProcessor.process(PortTypeProcessor.java:143)
>         at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.WSDLToJavaProces
> sor.wsdlDefinitionToJavaModel(WSDLToJavaProcessor.java:88)
>         at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.WSDLToJavaProces
> sor.process(WSDLToJavaProcessor.java:60)
>         at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaCon
> tainer.java:197)
>         at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaCon
> tainer.java:232)
>         at
> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.ja
> va:83)
>         at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:103)
>         at org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:173)
>
> ----------------------------------------
>
> Any hints?
>
> Regards,
>
> Frank

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog