You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Marcel Casado <ma...@ucar.edu> on 2010/03/12 22:23:29 UTC

Problem with wsdl2java codegen tool & jaxb episodes

Hi,

I'm generating jaxb bindings with episodes for all schemas included/imported
for a "wsdl" so I have a more modular project structure and better
dependency reusability. Then I pass the jaxb episodes to the "wsdl2java" so
it does not have to generate any the bindings again. Then when it tries to
resolve the message parts on the wsdl to create the service artifacts it
crashes :

./wsdl2java -d
/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/target/generated-sources/src
-b
file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/jaxb/xmlBindings.xml
-b
file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/episodes/gml-v_3_1_1.episode
-b
file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/episodes/ows-v_1_1_0.episode
-b
file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/episodes/wcs-v_1_1_2.episode
-verbose
/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/wsdl/wcs/1.1.2/wcs1_1_2.wsdl
Loading FrontEnd jaxws ...
Loading DataBinding jaxb ...
wsdl2java -d
/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/target/generated-sources/src
-b
file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/jaxb/xmlBindings.xml
-b
file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/episodes/gml-v_3_1_1.episode
-b
file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/episodes/ows-v_1_1_0.episode
-b
file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/episodes/wcs-v_1_1_2.episode
-verbose
/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/wsdl/wcs/1.1.2/wcs1_1_2.wsdl
wsdl2java - Apache CXF 2.2.6

Deprecated Xalan: org.apache.xml.serializer.XMLEntities

WSDLToJava Error: Failed to create java parameter for part parameters in
method getCoverageOperation - 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 parameters in method getCoverageOperation - this wsdl is invalid,
please use the wsdlvalidator tool to validate this wsdl
at
org.apache.cxf.tools.common.model.JavaMethod.addParameter(JavaMethod.java:186)
at
org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.ParameterProcessor.addParameter(ParameterProcessor.java:126)
at
org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.ParameterProcessor.processInput(ParameterProcessor.java:221)
at
org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.ParameterProcessor.buildParamModelsWithoutOrdering(ParameterProcessor.java:650)
at
org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.ParameterProcessor.process(ParameterProcessor.java:86)
at
org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.OperationProcessor.processMethod(OperationProcessor.java:91)
at
org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.OperationProcessor.process(OperationProcessor.java:62)
at
org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.PortTypeProcessor.process(PortTypeProcessor.java:139)
at
org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.WSDLToJavaProcessor.wsdlDefinitionToJavaModel(WSDLToJavaProcessor.java:88)
at
org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.WSDLToJavaProcessor.process(WSDLToJavaProcessor.java:60)
at
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:238)
at
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:128)
at
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:271)
at
org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103)
at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113)
at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86)
at org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:184)
But the wsdl validator says is a valid wsdl :

./wsdlvalidator
/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/wsdl/wcs/1.1.2/wcs1_1_2.wsdlPassed
Validation : Valid WSDL 
It seems to me that "wsdl2java" does not work properly when jaxb episodes
are used for the elements defined on the messages part on the wsdl. 
Thanks,

-Marcel
-- 
View this message in context: http://old.nabble.com/Problem-with-wsdl2java-codegen-tool---jaxb-episodes-tp27883012p27883012.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Problem with wsdl2java codegen tool & jaxb episodes

Posted by Marcel Casado <ma...@ucar.edu>.

Additionally it will be great if  "cxf-codegen-plugin" could provide similar
support than "maven-jaxb2-plugin"  for episodes dependencies like :

                        	<episodes>
						<episode>
							<groupId>edu.ucar.ral.ogc.jaxb</groupId>
							<artifactId>jaxb-gml-v_3_1_1-bindings</artifactId>
							<version>1.0.0</version>
						</episode>
						<episode>
							<groupId>edu.ucar.ral.ogc.jaxb</groupId>
							<artifactId>jaxb-ows-v_1_1_0-bindings</artifactId>
							<version>1.0.0</version>
						</episode>
					</episodes>

 so the plugin can pull the episodes dependenices from the maven
dependencies in META-INF/sun-jaxb.episode

 Should I create a jira for this new feature ?

Thanks,

-Marcel


Marcel Casado wrote:
> 
> 
> I've created a Jira and attached test case :
> https://issues.apache.org/jira/browse/CXF-2712
> 
> Thanks,
> 
> -Marcel
> 
> 
> dkulp wrote:
>> 
>> 
>> I've heard of mixed reports of people using episode files.  Some have
>> claimed 
>> it worked fine.   Others have had issues.   The main problem I have is
>> that 
>> no-one that has had problems have been able to provide a test case that
>> we can 
>> debug.   If you could create a test case and attach to a JIRA, that would
>> be a 
>> big help in getting any issues fixed.
>> 
>> Dan
>> 
>> 
>> On Friday 12 March 2010 4:23:29 pm Marcel Casado wrote:
>>> Hi,
>>> 
>>> I'm generating jaxb bindings with episodes for all schemas
>>> included/imported for a "wsdl" so I have a more modular project
>>> structure
>>> and better dependency reusability. Then I pass the jaxb episodes to the
>>> "wsdl2java" so it does not have to generate any the bindings again. Then
>>> when it tries to resolve the message parts on the wsdl to create the
>>> service artifacts it crashes :
>>> 
>>> ./wsdl2java -d
>>> /Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/target/generated-sources/s
>>> rc -b
>>> file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/jaxb/xmlBind
>>> ings.xml -b
>>> file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/ep
>>> isodes/gml-v_3_1_1.episode -b
>>> file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/ep
>>> isodes/ows-v_1_1_0.episode -b
>>> file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/ep
>>> isodes/wcs-v_1_1_2.episode -verbose
>>> /Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/wsdl/wc
>>> s/1.1.2/wcs1_1_2.wsdl Loading FrontEnd jaxws ...
>>> Loading DataBinding jaxb ...
>>> wsdl2java -d
>>> /Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/target/generated-sources/s
>>> rc -b
>>> file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/jaxb/xmlBind
>>> ings.xml -b
>>> file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/ep
>>> isodes/gml-v_3_1_1.episode -b
>>> file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/ep
>>> isodes/ows-v_1_1_0.episode -b
>>> file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/ep
>>> isodes/wcs-v_1_1_2.episode -verbose
>>> /Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/wsdl/wc
>>> s/1.1.2/wcs1_1_2.wsdl wsdl2java - Apache CXF 2.2.6
>>> 
>>> Deprecated Xalan: org.apache.xml.serializer.XMLEntities
>>> 
>>> WSDLToJava Error: Failed to create java parameter for part parameters in
>>> method getCoverageOperation - 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 parameters in method getCoverageOperation - this wsdl is
>>> invalid,
>>> please use the wsdlvalidator tool to validate this wsdl
>>> at
>>> org.apache.cxf.tools.common.model.JavaMethod.addParameter(JavaMethod.java:1
>>> 86) at
>>> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.ParameterProc
>>> essor.addParameter(ParameterProcessor.java:126) at
>>> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.ParameterProc
>>> essor.processInput(ParameterProcessor.java:221) at
>>> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.ParameterProc
>>> essor.buildParamModelsWithoutOrdering(ParameterProcessor.java:650) at
>>> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.ParameterProc
>>> essor.process(ParameterProcessor.java:86) at
>>> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.OperationProc
>>> essor.processMethod(OperationProcessor.java:91) at
>>> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.OperationProc
>>> essor.process(OperationProcessor.java:62) at
>>> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.PortTypeProce
>>> ssor.process(PortTypeProcessor.java:139) at
>>> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.WSDLToJavaProcessor.ws
>>> dlDefinitionToJavaModel(WSDLToJavaProcessor.java:88) at
>>> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.WSDLToJavaProcessor.pr
>>> ocess(WSDLToJavaProcessor.java:60) at
>>> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaConta
>>> iner.java:238) at
>>> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer
>>> .java:128) at
>>> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer
>>> .java:271) at
>>> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103
>>> ) at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113) at
>>> org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86)
>>> at org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:184)
>>> But the wsdl validator says is a valid wsdl :
>>> 
>>> ./wsdlvalidator
>>> /Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/wsdl/wc
>>> s/1.1.2/wcs1_1_2.wsdlPassed Validation : Valid WSDL
>>> It seems to me that "wsdl2java" does not work properly when jaxb
>>> episodes
>>> are used for the elements defined on the messages part on the wsdl.
>>> Thanks,
>>> 
>>> -Marcel
>> 
>> -- 
>> Daniel Kulp
>> dkulp@apache.org
>> http://dankulp.com/blog
>> 
>> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Problem-with-wsdl2java-codegen-tool---jaxb-episodes-tp27883012p27884135.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Problem with wsdl2java codegen tool & jaxb episodes

Posted by Daniel Kulp <dk...@apache.org>.
On Friday 12 March 2010 6:43:16 pm Marcel Casado wrote:
> I've created a Jira and attached test case :
> https://issues.apache.org/jira/browse/CXF-2712

OK.  I can now see what is going on.   It's technically a "bug" (or missing 
API) in JAXB.   See:

https://jaxb.dev.java.net/issues/show_bug.cgi?id=514

Basically, for code generation, we need to know the class names that JAXB 
determined for the various wrappers and parameters.   We call a method on the 
JAXB model passing the QName in and get a special object back with the 
classname in it.   However, JAXB only passes back stuff it actually generated.   
In the case of episodes, it didn't generate anything.   Thus, null is returned 
and we cannot proceed.     Ideally, JAXB would return a proper object for us 
so we can get the information.    

I think this is why I've seen mixed results with episode files and CXF.    The 
use cases I've seen before use episodes for their domain schemas, but not for 
the "wrapper" schemas used for the wsdl/soap interactions.    For example, a 
"PurchaseOrder" object would be in the episode, but the "submitPO" and 
"submitPOResponse" schemas would be in the wsdl (which would import the domain 
schema).    That use case WOULD work fine.   JAXB would generate the SubmitPO 
object so null would not be returned.

Without that fix in JAXB, I'm not sure what options we have.   The ONLY thing 
I can think of is to parse and process the episode files ourselves and if jaxb 
returns null, start searching through them to see if a type is mapped or not.   
Quite a bit fragile.  

Dan



> Thanks,
> 
> -Marcel
> 
> dkulp wrote:
> > I've heard of mixed reports of people using episode files.  Some have
> > claimed
> > it worked fine.   Others have had issues.   The main problem I have is
> > that
> > no-one that has had problems have been able to provide a test case that
> > we can
> > debug.   If you could create a test case and attach to a JIRA, that would
> > be a
> > big help in getting any issues fixed.
> > 
> > Dan

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

Re: Problem with wsdl2java codegen tool & jaxb episodes

Posted by Marcel Casado <ma...@ucar.edu>.

I've created a Jira and attached test case :
https://issues.apache.org/jira/browse/CXF-2712

Thanks,

-Marcel


dkulp wrote:
> 
> 
> I've heard of mixed reports of people using episode files.  Some have
> claimed 
> it worked fine.   Others have had issues.   The main problem I have is
> that 
> no-one that has had problems have been able to provide a test case that we
> can 
> debug.   If you could create a test case and attach to a JIRA, that would
> be a 
> big help in getting any issues fixed.
> 
> Dan
> 
> 
> On Friday 12 March 2010 4:23:29 pm Marcel Casado wrote:
>> Hi,
>> 
>> I'm generating jaxb bindings with episodes for all schemas
>> included/imported for a "wsdl" so I have a more modular project structure
>> and better dependency reusability. Then I pass the jaxb episodes to the
>> "wsdl2java" so it does not have to generate any the bindings again. Then
>> when it tries to resolve the message parts on the wsdl to create the
>> service artifacts it crashes :
>> 
>> ./wsdl2java -d
>> /Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/target/generated-sources/s
>> rc -b
>> file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/jaxb/xmlBind
>> ings.xml -b
>> file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/ep
>> isodes/gml-v_3_1_1.episode -b
>> file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/ep
>> isodes/ows-v_1_1_0.episode -b
>> file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/ep
>> isodes/wcs-v_1_1_2.episode -verbose
>> /Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/wsdl/wc
>> s/1.1.2/wcs1_1_2.wsdl Loading FrontEnd jaxws ...
>> Loading DataBinding jaxb ...
>> wsdl2java -d
>> /Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/target/generated-sources/s
>> rc -b
>> file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/jaxb/xmlBind
>> ings.xml -b
>> file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/ep
>> isodes/gml-v_3_1_1.episode -b
>> file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/ep
>> isodes/ows-v_1_1_0.episode -b
>> file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/ep
>> isodes/wcs-v_1_1_2.episode -verbose
>> /Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/wsdl/wc
>> s/1.1.2/wcs1_1_2.wsdl wsdl2java - Apache CXF 2.2.6
>> 
>> Deprecated Xalan: org.apache.xml.serializer.XMLEntities
>> 
>> WSDLToJava Error: Failed to create java parameter for part parameters in
>> method getCoverageOperation - 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 parameters in method getCoverageOperation - this wsdl is
>> invalid,
>> please use the wsdlvalidator tool to validate this wsdl
>> at
>> org.apache.cxf.tools.common.model.JavaMethod.addParameter(JavaMethod.java:1
>> 86) at
>> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.ParameterProc
>> essor.addParameter(ParameterProcessor.java:126) at
>> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.ParameterProc
>> essor.processInput(ParameterProcessor.java:221) at
>> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.ParameterProc
>> essor.buildParamModelsWithoutOrdering(ParameterProcessor.java:650) at
>> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.ParameterProc
>> essor.process(ParameterProcessor.java:86) at
>> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.OperationProc
>> essor.processMethod(OperationProcessor.java:91) at
>> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.OperationProc
>> essor.process(OperationProcessor.java:62) at
>> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.PortTypeProce
>> ssor.process(PortTypeProcessor.java:139) at
>> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.WSDLToJavaProcessor.ws
>> dlDefinitionToJavaModel(WSDLToJavaProcessor.java:88) at
>> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.WSDLToJavaProcessor.pr
>> ocess(WSDLToJavaProcessor.java:60) at
>> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaConta
>> iner.java:238) at
>> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer
>> .java:128) at
>> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer
>> .java:271) at
>> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103
>> ) at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113) at
>> org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86)
>> at org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:184)
>> But the wsdl validator says is a valid wsdl :
>> 
>> ./wsdlvalidator
>> /Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/wsdl/wc
>> s/1.1.2/wcs1_1_2.wsdlPassed Validation : Valid WSDL
>> It seems to me that "wsdl2java" does not work properly when jaxb episodes
>> are used for the elements defined on the messages part on the wsdl.
>> Thanks,
>> 
>> -Marcel
> 
> -- 
> Daniel Kulp
> dkulp@apache.org
> http://dankulp.com/blog
> 
> 

-- 
View this message in context: http://old.nabble.com/Problem-with-wsdl2java-codegen-tool---jaxb-episodes-tp27883012p27884131.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Problem with wsdl2java codegen tool & jaxb episodes

Posted by Marcel Casado <ma...@ucar.edu>.
Dan,

Episodes seems to work fine for the schema compiler so no new bindings are
generated but then when wsdl2java tries to generate the service portType
artifacts for example it does not know how to resolve the schema elements on
the message parts since class bindings have not been generated. Seems that
"wsimport" jaxb tool has a similar problem.

Anyway, fair enough, I'll work on creating a simple test case to try to
demonstrate the problem. I'll let you know about the JIRA ticket.

Thanks,

-Marcel


dkulp wrote:
> 
> 
> I've heard of mixed reports of people using episode files.  Some have
> claimed 
> it worked fine.   Others have had issues.   The main problem I have is
> that 
> no-one that has had problems have been able to provide a test case that we
> can 
> debug.   If you could create a test case and attach to a JIRA, that would
> be a 
> big help in getting any issues fixed.
> 
> Dan
> 
> 
> On Friday 12 March 2010 4:23:29 pm Marcel Casado wrote:
>> Hi,
>> 
>> I'm generating jaxb bindings with episodes for all schemas
>> included/imported for a "wsdl" so I have a more modular project structure
>> and better dependency reusability. Then I pass the jaxb episodes to the
>> "wsdl2java" so it does not have to generate any the bindings again. Then
>> when it tries to resolve the message parts on the wsdl to create the
>> service artifacts it crashes :
>> 
>> ./wsdl2java -d
>> /Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/target/generated-sources/s
>> rc -b
>> file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/jaxb/xmlBind
>> ings.xml -b
>> file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/ep
>> isodes/gml-v_3_1_1.episode -b
>> file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/ep
>> isodes/ows-v_1_1_0.episode -b
>> file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/ep
>> isodes/wcs-v_1_1_2.episode -verbose
>> /Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/wsdl/wc
>> s/1.1.2/wcs1_1_2.wsdl Loading FrontEnd jaxws ...
>> Loading DataBinding jaxb ...
>> wsdl2java -d
>> /Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/target/generated-sources/s
>> rc -b
>> file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/jaxb/xmlBind
>> ings.xml -b
>> file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/ep
>> isodes/gml-v_3_1_1.episode -b
>> file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/ep
>> isodes/ows-v_1_1_0.episode -b
>> file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/ep
>> isodes/wcs-v_1_1_2.episode -verbose
>> /Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/wsdl/wc
>> s/1.1.2/wcs1_1_2.wsdl wsdl2java - Apache CXF 2.2.6
>> 
>> Deprecated Xalan: org.apache.xml.serializer.XMLEntities
>> 
>> WSDLToJava Error: Failed to create java parameter for part parameters in
>> method getCoverageOperation - 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 parameters in method getCoverageOperation - this wsdl is
>> invalid,
>> please use the wsdlvalidator tool to validate this wsdl
>> at
>> org.apache.cxf.tools.common.model.JavaMethod.addParameter(JavaMethod.java:1
>> 86) at
>> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.ParameterProc
>> essor.addParameter(ParameterProcessor.java:126) at
>> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.ParameterProc
>> essor.processInput(ParameterProcessor.java:221) at
>> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.ParameterProc
>> essor.buildParamModelsWithoutOrdering(ParameterProcessor.java:650) at
>> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.ParameterProc
>> essor.process(ParameterProcessor.java:86) at
>> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.OperationProc
>> essor.processMethod(OperationProcessor.java:91) at
>> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.OperationProc
>> essor.process(OperationProcessor.java:62) at
>> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.PortTypeProce
>> ssor.process(PortTypeProcessor.java:139) at
>> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.WSDLToJavaProcessor.ws
>> dlDefinitionToJavaModel(WSDLToJavaProcessor.java:88) at
>> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.WSDLToJavaProcessor.pr
>> ocess(WSDLToJavaProcessor.java:60) at
>> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaConta
>> iner.java:238) at
>> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer
>> .java:128) at
>> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer
>> .java:271) at
>> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103
>> ) at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113) at
>> org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86)
>> at org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:184)
>> But the wsdl validator says is a valid wsdl :
>> 
>> ./wsdlvalidator
>> /Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/wsdl/wc
>> s/1.1.2/wcs1_1_2.wsdlPassed Validation : Valid WSDL
>> It seems to me that "wsdl2java" does not work properly when jaxb episodes
>> are used for the elements defined on the messages part on the wsdl.
>> Thanks,
>> 
>> -Marcel
> 
> -- 
> Daniel Kulp
> dkulp@apache.org
> http://dankulp.com/blog
> 
> 

-- 
View this message in context: http://old.nabble.com/Problem-with-wsdl2java-codegen-tool---jaxb-episodes-tp27883012p27883273.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Problem with wsdl2java codegen tool & jaxb episodes

Posted by Daniel Kulp <dk...@apache.org>.
I've heard of mixed reports of people using episode files.  Some have claimed 
it worked fine.   Others have had issues.   The main problem I have is that 
no-one that has had problems have been able to provide a test case that we can 
debug.   If you could create a test case and attach to a JIRA, that would be a 
big help in getting any issues fixed.

Dan


On Friday 12 March 2010 4:23:29 pm Marcel Casado wrote:
> Hi,
> 
> I'm generating jaxb bindings with episodes for all schemas
> included/imported for a "wsdl" so I have a more modular project structure
> and better dependency reusability. Then I pass the jaxb episodes to the
> "wsdl2java" so it does not have to generate any the bindings again. Then
> when it tries to resolve the message parts on the wsdl to create the
> service artifacts it crashes :
> 
> ./wsdl2java -d
> /Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/target/generated-sources/s
> rc -b
> file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/jaxb/xmlBind
> ings.xml -b
> file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/ep
> isodes/gml-v_3_1_1.episode -b
> file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/ep
> isodes/ows-v_1_1_0.episode -b
> file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/ep
> isodes/wcs-v_1_1_2.episode -verbose
> /Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/wsdl/wc
> s/1.1.2/wcs1_1_2.wsdl Loading FrontEnd jaxws ...
> Loading DataBinding jaxb ...
> wsdl2java -d
> /Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/target/generated-sources/s
> rc -b
> file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/jaxb/xmlBind
> ings.xml -b
> file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/ep
> isodes/gml-v_3_1_1.episode -b
> file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/ep
> isodes/ows-v_1_1_0.episode -b
> file:/Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/ep
> isodes/wcs-v_1_1_2.episode -verbose
> /Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/wsdl/wc
> s/1.1.2/wcs1_1_2.wsdl wsdl2java - Apache CXF 2.2.6
> 
> Deprecated Xalan: org.apache.xml.serializer.XMLEntities
> 
> WSDLToJava Error: Failed to create java parameter for part parameters in
> method getCoverageOperation - 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 parameters in method getCoverageOperation - this wsdl is invalid,
> please use the wsdlvalidator tool to validate this wsdl
> at
> org.apache.cxf.tools.common.model.JavaMethod.addParameter(JavaMethod.java:1
> 86) at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.ParameterProc
> essor.addParameter(ParameterProcessor.java:126) at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.ParameterProc
> essor.processInput(ParameterProcessor.java:221) at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.ParameterProc
> essor.buildParamModelsWithoutOrdering(ParameterProcessor.java:650) at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.ParameterProc
> essor.process(ParameterProcessor.java:86) at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.OperationProc
> essor.processMethod(OperationProcessor.java:91) at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.OperationProc
> essor.process(OperationProcessor.java:62) at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.PortTypeProce
> ssor.process(PortTypeProcessor.java:139) at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.WSDLToJavaProcessor.ws
> dlDefinitionToJavaModel(WSDLToJavaProcessor.java:88) at
> org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.WSDLToJavaProcessor.pr
> ocess(WSDLToJavaProcessor.java:60) at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaConta
> iner.java:238) at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer
> .java:128) at
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer
> .java:271) at
> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103
> ) at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113) at
> org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86)
> at org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:184)
> But the wsdl validator says is a valid wsdl :
> 
> ./wsdlvalidator
> /Users/marcel/ogc-bindings/trunk/jaxws/wcs/1.1.2/src/main/resources/wsdl/wc
> s/1.1.2/wcs1_1_2.wsdlPassed Validation : Valid WSDL
> It seems to me that "wsdl2java" does not work properly when jaxb episodes
> are used for the elements defined on the messages part on the wsdl.
> Thanks,
> 
> -Marcel

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