You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Maxence Dewil <th...@gmail.com> on 2012/10/31 11:38:24 UTC

cxf-codegen-plugin / XML Catalog / WSDL validation

Hi,

I'm not sure it is a bug, so I submit this one to the community first:

Here is my problem:
- The WSDLs of our business partner are on the internet BUT are invalid.
- They provided me the valid WSDLs by mail.
- I embedded the valid WSDLs in my project jar.
- I embedded an XML Catalog in my project jar in order to prevent the
cxf-codegen-plugin from downloading the invalid WSDLs from the internet.
- I enabled the WSDL validation

But with cxf-codegen-plugin releases >= 2.6.1, the wsdl2java goal fails: it
seems that the validation ignores the XML Catalog.
And if I disable the validation, the wsdl2java goal succeeds. The XML
Catalog is used in that case.

Thank you for your help



--
View this message in context: http://cxf.547215.n5.nabble.com/cxf-codegen-plugin-XML-Catalog-WSDL-validation-tp5717615.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: cxf-codegen-plugin / XML Catalog / WSDL validation

Posted by Maxence Dewil <th...@gmail.com>.
Hi,

I checked against v2.7.1-SNAPSHOT (20121031.113517-18) and the problem does
not happen.

So Daniel thank you for your help, I will wait for the next release.



--
View this message in context: http://cxf.547215.n5.nabble.com/cxf-codegen-plugin-XML-Catalog-WSDL-validation-tp5717615p5717761.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: cxf-codegen-plugin / XML Catalog / WSDL validation

Posted by Daniel Kulp <dk...@apache.org>.
On Oct 31, 2012, at 1:09 PM, David Karlsen <da...@gmail.com> wrote:

> I have  a slightly similar problem where CXF complaints about my WSDLs
> if I use cxf 2.6.3 or 2.7.0 (they are warnings with cxf 2.6.2, and no
> complaints with 2.6.1).
> Tried running 2.7.1-SNAPSHOT, but then codegen barfs on:

Looks like somehow there is a mix of CXF versions or it didn't get ALL the  latest snapshots.   Can you try 2.7.1-SNAPSHOT with:

mvn -X -e -U -cpu

and see if it updates things enough to proceed?


Also try with 2.6.4-SNAPSHOT as that should also have the fixes I did in it.


Dan





> 
> [ERROR] Failed to execute goal
> org.apache.cxf:cxf-codegen-plugin:2.7.1-SNAPSHOT:wsdl2java (default)
> on project cp-server-schemas: Execution default of goal
> org.apache.cxf:cxf-codegen-plugin:2.7.1-SNAPSHOT:wsdl2jav
> a failed: An API incompatibility was encountered while executing
> org.apache.cxf:cxf-codegen-plugin:2.7.1-SNAPSHOT:wsdl2java:
> java.lang.ExceptionInInitializerError: null
> [ERROR] -----------------------------------------------------
> [ERROR] realm =    plugin>org.apache.cxf:cxf-codegen-plugin:2.7.1-SNAPSHOT
> [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
> [ERROR] urls[0] =
> file:/home/et2448/.m2/repository/org/apache/cxf/cxf-codegen-plugin/2.7.1-SNAPSHOT/cxf-codegen-plugin-2.7.1-SNAPSHOT.jar
> [ERROR] urls[1] =
> file:/home/et2448/.m2/repository/org/apache/cxf/xjcplugins/cxf-xjc-ts/2.4.0/cxf-xjc-ts-2.4.0.jar
> [ERROR] urls[2] =
> file:/home/et2448/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
> [ERROR] urls[3] =
> file:/home/et2448/.m2/repository/org/jvnet/jaxb2_commons/jaxb2-fluent-api/3.0/jaxb2-fluent-api-3.0.jar
> [ERROR] urls[4] =
> file:/home/et2448/.m2/repository/org/apache/maven/shared/maven-artifact-resolver/1.0/maven-artifact-resolver-1.0.jar
> [ERROR] urls[5] =
> file:/home/et2448/.m2/repository/org/codehaus/plexus/plexus-utils/2.0.5/plexus-utils-2.0.5.jar
> [ERROR] urls[6] =
> file:/home/et2448/.m2/repository/org/codehaus/plexus/plexus-archiver/1.2/plexus-archiver-1.2.jar
> [ERROR] urls[7] =
> file:/home/et2448/.m2/repository/org/codehaus/plexus/plexus-io/1.0.1/plexus-io-1.0.1.jar
> [ERROR] urls[8] =
> file:/home/et2448/.m2/repository/org/apache/cxf/cxf-api/2.7.1-SNAPSHOT/cxf-api-2.7.1-SNAPSHOT.jar
> [ERROR] urls[9] =
> file:/home/et2448/.m2/repository/org/codehaus/woodstox/woodstox-core-asl/4.1.4/woodstox-core-asl-4.1.4.jar
> [ERROR] urls[10] =
> file:/home/et2448/.m2/repository/org/codehaus/woodstox/stax2-api/3.1.1/stax2-api-3.1.1.jar
> [ERROR] urls[11] =
> file:/home/et2448/.m2/repository/org/apache/ws/xmlschema/xmlschema-core/2.0.3/xmlschema-core-2.0.3.jar
> [ERROR] urls[12] =
> file:/home/et2448/.m2/repository/org/apache/geronimo/specs/geronimo-javamail_1.4_spec/1.7.1/geronimo-javamail_1.4_spec-1.7.1.jar
> [ERROR] urls[13] =
> file:/home/et2448/.m2/repository/wsdl4j/wsdl4j/1.6.2/wsdl4j-1.6.2.jar
> [ERROR] urls[14] =
> file:/home/et2448/.m2/repository/org/apache/cxf/cxf-tools-common/2.7.1-SNAPSHOT/cxf-tools-common-2.7.1-SNAPSHOT.jar
> [ERROR] urls[15] =
> file:/home/et2448/.m2/repository/org/apache/velocity/velocity/1.7/velocity-1.7.jar
> [ERROR] urls[16] =
> file:/home/et2448/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar
> [ERROR] urls[17] =
> file:/home/et2448/.m2/repository/com/sun/xml/bind/jaxb-xjc/2.2.6/jaxb-xjc-2.2.6.jar
> [ERROR] urls[18] =
> file:/home/et2448/.m2/repository/com/sun/xml/bind/jaxb-impl/2.2.6/jaxb-impl-2.2.6.jar
> [ERROR] urls[19] =
> file:/home/et2448/.m2/repository/org/apache/cxf/cxf-rt-core/2.7.1-SNAPSHOT/cxf-rt-core-2.7.1-SNAPSHOT.jar
> [ERROR] urls[20] =
> file:/home/et2448/.m2/repository/org/apache/cxf/cxf-tools-wsdlto-core/2.7.1-SNAPSHOT/cxf-tools-wsdlto-core-2.7.1-SNAPSHOT.jar
> [ERROR] urls[21] =
> file:/home/et2448/.m2/repository/org/apache/cxf/cxf-tools-validator/2.7.1-SNAPSHOT/cxf-tools-validator-2.7.1-SNAPSHOT.jar
> [ERROR] urls[22] =
> file:/home/et2448/.m2/repository/org/apache/cxf/cxf-rt-bindings-soap/2.7.1-SNAPSHOT/cxf-rt-bindings-soap-2.7.1-SNAPSHOT.jar
> [ERROR] urls[23] =
> file:/home/et2448/.m2/repository/org/apache/cxf/cxf-rt-databinding-jaxb/2.7.1-SNAPSHOT/cxf-rt-databinding-jaxb-2.7.1-SNAPSHOT.jar
> [ERROR] urls[24] =
> file:/home/et2448/.m2/repository/org/apache/cxf/cxf-tools-wsdlto-databinding-jaxb/2.7.1-SNAPSHOT/cxf-tools-wsdlto-databinding-jaxb-2.7.1-SNAPSHOT.jar
> [ERROR] urls[25] =
> file:/home/et2448/.m2/repository/org/apache/cxf/cxf-tools-wsdlto-frontend-jaxws/2.7.1-SNAPSHOT/cxf-tools-wsdlto-frontend-jaxws-2.7.1-SNAPSHOT.jar
> [ERROR] urls[26] =
> file:/home/et2448/.m2/repository/xml-resolver/xml-resolver/1.2/xml-resolver-1.2.jar
> [ERROR] urls[27] =
> file:/home/et2448/.m2/repository/org/apache/cxf/cxf-tools-wsdlto-frontend-javascript/2.7.1-SNAPSHOT/cxf-tools-wsdlto-frontend-javascript-2.7.1-SNAPSHOT.jar
> [ERROR] urls[28] =
> file:/home/et2448/.m2/repository/org/apache/cxf/cxf-rt-javascript/2.7.1-SNAPSHOT/cxf-rt-javascript-2.7.1-SNAPSHOT.jar
> [ERROR] urls[29] =
> file:/home/et2448/.m2/repository/org/springframework/spring-core/3.0.7.RELEASE/spring-core-3.0.7.RELEASE.jar
> [ERROR] urls[30] =
> file:/home/et2448/.m2/repository/org/springframework/spring-asm/3.0.7.RELEASE/spring-asm-3.0.7.RELEASE.jar
> [ERROR] urls[31] =
> file:/home/et2448/.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar
> [ERROR] urls[32] =
> file:/home/et2448/.m2/repository/org/springframework/spring-beans/3.0.7.RELEASE/spring-beans-3.0.7.RELEASE.jar
> [ERROR] urls[33] =
> file:/home/et2448/.m2/repository/org/springframework/spring-context/3.0.7.RELEASE/spring-context-3.0.7.RELEASE.jar
> [ERROR] urls[34] =
> file:/home/et2448/.m2/repository/org/springframework/spring-aop/3.0.7.RELEASE/spring-aop-3.0.7.RELEASE.jar
> [ERROR] urls[35] =
> file:/home/et2448/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar
> [ERROR] urls[36] =
> file:/home/et2448/.m2/repository/org/springframework/spring-expression/3.0.7.RELEASE/spring-expression-3.0.7.RELEASE.jar
> [ERROR] urls[37] =
> file:/home/et2448/.m2/repository/org/apache/ant/ant/1.8.4/ant-1.8.4.jar
> [ERROR] urls[38] =
> file:/home/et2448/.m2/repository/org/apache/ant/ant-launcher/1.8.4/ant-launcher-1.8.4.jar
> [ERROR] urls[39] =
> file:/home/et2448/.m2/repository/org/apache/ant/ant-nodeps/1.8.1/ant-nodeps-1.8.1.jar
> [ERROR] urls[40] =
> file:/home/et2448/.m2/repository/org/sonatype/plexus/plexus-build-api/0.0.7/plexus-build-api-0.0.7.jar
> [ERROR] Number of foreign imports: 1
> [ERROR] import: Entry[import  from realm
> ClassRealm[project>com.edb.fs.cashpool.srv:cp-server-schemas:1.0-SNAPSHOT,
> parent: ClassRealm[maven.api, parent: null]]]
> [ERROR]
> [ERROR] -----------------------------------------------------:
> org.apache.cxf.APIMessages != org.apache.cxf.Messages
> [ERROR] -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with
> the -e switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions,
> please read the following articles:
> 
> 
> With 2.6.3 I get:
> [INFO] ------------------------------------------------------------------------
> [ERROR] Failed to execute goal
> org.apache.cxf:cxf-codegen-plugin:2.6.3:wsdl2java (default) on project
> cp-server-schemas: Execution default of goal
> org.apache.cxf:cxf-codegen-plugin:2.6.3:wsdl2java failed: Schema Error
> : src-resolve: Cannot resolve the name 'common:baseResponseType' to
> a(n) 'type definition' component. -> [Help 1]
> 
> 
> 
> In 2.6.2 it's a warning - but the actual generation passes:
> [WARNING] /home/et2448/projects/payment/cashpool/server/cp-server-schemas/target/generated-resources/wsfabric/wsdl/CPLSCashpoolParameters_V1.wsdl
> [1113:11]: src-resolve.4.2: Error resolving component
> 'common:basePersistentEntityType'. It was detected that
> 'common:basePersistentEntityType' is in namespace
> 'urn:srv.cashpool.fs.edb.com:domain:common:v1', but components from
> this namespace are not referenceable from schema document
> 'file:/home/et2448/projects/payment/cashpool/server/cp-server-schemas/target/generated-resources/wsfabric/wsdl/CPLSCashpoolParameters_V1.wsdl#types11'.
> If this is the incorrect namespace, perhaps the prefix of
> 'common:basePersistentEntityType' needs to be changed. If this is the
> correct namespace, then an appropriate 'import' tag should be added to
> 'file:/home/et2448/projects/payment/cashpool/server/cp-server-schemas/target/generated-resources/wsfabric/wsdl/CPLSCashpoolParameters_V1.wsdl#types11'.
> 
> 
> In 2.6.1 there is no complaint at all.
> 
> Stripped down wsdl:
> 
> <--type using type from common schema: -->
>  <wsdl:types>
>    <xs:schema xmlns:common="urn:srv.cashpool.fs.edb.com:domain:common:v1"
> xmlns:cp="urn:srv.cashpool.fs.edb.com:domain:cashpool:v1"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> attributeFormDefault="unqualified" e
> lementFormDefault="qualified"
> targetNamespace="urn:srv.cashpool.fs.edb.com:ws:cashpool:v1">....
> 
>  <xs:import namespace="urn:srv.cashpool.fs.edb.com:domain:common:v1"/>
> 
>  <xs:complexContent>
>          <xs:extension base="common:baseResponseType">
>            <xs:sequence>
> 
> 
> 
> 
> 
> 
>    </xsd:schema>
> 
> 
> <-- schema defining common types: -->
>    <schema xmlns="http://www.w3.org/2001/XMLSchema"
> xmlns:common="urn:srv.cashpool.fs.edb.com:domain:common:v1"
> xmlns:edbheader="http://edb.com/ws/WSCommon_v21"
> attributeFormDefault="unqualified" elementFormDefau
> lt="qualified" targetNamespace="urn:srv.cashpool.fs.edb.com:domain:common:v1">
> 
> 
> 
> 2012/10/31 Daniel Kulp <dk...@apache.org>:
>> 
>> On Oct 31, 2012, at 6:38 AM, Maxence Dewil <th...@gmail.com> wrote:
>>> I'm not sure it is a bug, so I submit this one to the community first:
>>> 
>>> Here is my problem:
>>> - The WSDLs of our business partner are on the internet BUT are invalid.
>>> - They provided me the valid WSDLs by mail.
>>> - I embedded the valid WSDLs in my project jar.
>>> - I embedded an XML Catalog in my project jar in order to prevent the
>>> cxf-codegen-plugin from downloading the invalid WSDLs from the internet.
>>> - I enabled the WSDL validation
>>> 
>>> But with cxf-codegen-plugin releases >= 2.6.1, the wsdl2java goal fails: it
>>> seems that the validation ignores the XML Catalog.
>>> And if I disable the validation, the wsdl2java goal succeeds. The XML
>>> Catalog is used in that case.
>>> 
>>> Thank you for your help
>> 
>> 
>> Is there any chance you could test this with the latest 2.7.1-SNAPSHOT version of CXF?    I made a bunch of changes in this area two weeks ago that may fix this, not really sure.   There are a few places in the JAXB code (particularly with JAXB 2.2.x) that does some funky (and incorrect) URL resolving that is very hard to override and "fix".
>> 
>> If the latest snapshots don't fix it, a simple test case attached to a JIRA would be great.
>> 
>> Thanks!
>> --
>> Daniel Kulp
>> dkulp@apache.org - http://dankulp.com/blog
>> Talend Community Coder - http://coders.talend.com
>> 
> 
> 
> 
> -- 
> --
> David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen

-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com


Re: cxf-codegen-plugin / XML Catalog / WSDL validation

Posted by David Karlsen <da...@gmail.com>.
I have  a slightly similar problem where CXF complaints about my WSDLs
if I use cxf 2.6.3 or 2.7.0 (they are warnings with cxf 2.6.2, and no
complaints with 2.6.1).
Tried running 2.7.1-SNAPSHOT, but then codegen barfs on:

[ERROR] Failed to execute goal
org.apache.cxf:cxf-codegen-plugin:2.7.1-SNAPSHOT:wsdl2java (default)
on project cp-server-schemas: Execution default of goal
org.apache.cxf:cxf-codegen-plugin:2.7.1-SNAPSHOT:wsdl2jav
a failed: An API incompatibility was encountered while executing
org.apache.cxf:cxf-codegen-plugin:2.7.1-SNAPSHOT:wsdl2java:
java.lang.ExceptionInInitializerError: null
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.apache.cxf:cxf-codegen-plugin:2.7.1-SNAPSHOT
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] =
file:/home/et2448/.m2/repository/org/apache/cxf/cxf-codegen-plugin/2.7.1-SNAPSHOT/cxf-codegen-plugin-2.7.1-SNAPSHOT.jar
[ERROR] urls[1] =
file:/home/et2448/.m2/repository/org/apache/cxf/xjcplugins/cxf-xjc-ts/2.4.0/cxf-xjc-ts-2.4.0.jar
[ERROR] urls[2] =
file:/home/et2448/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
[ERROR] urls[3] =
file:/home/et2448/.m2/repository/org/jvnet/jaxb2_commons/jaxb2-fluent-api/3.0/jaxb2-fluent-api-3.0.jar
[ERROR] urls[4] =
file:/home/et2448/.m2/repository/org/apache/maven/shared/maven-artifact-resolver/1.0/maven-artifact-resolver-1.0.jar
[ERROR] urls[5] =
file:/home/et2448/.m2/repository/org/codehaus/plexus/plexus-utils/2.0.5/plexus-utils-2.0.5.jar
[ERROR] urls[6] =
file:/home/et2448/.m2/repository/org/codehaus/plexus/plexus-archiver/1.2/plexus-archiver-1.2.jar
[ERROR] urls[7] =
file:/home/et2448/.m2/repository/org/codehaus/plexus/plexus-io/1.0.1/plexus-io-1.0.1.jar
[ERROR] urls[8] =
file:/home/et2448/.m2/repository/org/apache/cxf/cxf-api/2.7.1-SNAPSHOT/cxf-api-2.7.1-SNAPSHOT.jar
[ERROR] urls[9] =
file:/home/et2448/.m2/repository/org/codehaus/woodstox/woodstox-core-asl/4.1.4/woodstox-core-asl-4.1.4.jar
[ERROR] urls[10] =
file:/home/et2448/.m2/repository/org/codehaus/woodstox/stax2-api/3.1.1/stax2-api-3.1.1.jar
[ERROR] urls[11] =
file:/home/et2448/.m2/repository/org/apache/ws/xmlschema/xmlschema-core/2.0.3/xmlschema-core-2.0.3.jar
[ERROR] urls[12] =
file:/home/et2448/.m2/repository/org/apache/geronimo/specs/geronimo-javamail_1.4_spec/1.7.1/geronimo-javamail_1.4_spec-1.7.1.jar
[ERROR] urls[13] =
file:/home/et2448/.m2/repository/wsdl4j/wsdl4j/1.6.2/wsdl4j-1.6.2.jar
[ERROR] urls[14] =
file:/home/et2448/.m2/repository/org/apache/cxf/cxf-tools-common/2.7.1-SNAPSHOT/cxf-tools-common-2.7.1-SNAPSHOT.jar
[ERROR] urls[15] =
file:/home/et2448/.m2/repository/org/apache/velocity/velocity/1.7/velocity-1.7.jar
[ERROR] urls[16] =
file:/home/et2448/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar
[ERROR] urls[17] =
file:/home/et2448/.m2/repository/com/sun/xml/bind/jaxb-xjc/2.2.6/jaxb-xjc-2.2.6.jar
[ERROR] urls[18] =
file:/home/et2448/.m2/repository/com/sun/xml/bind/jaxb-impl/2.2.6/jaxb-impl-2.2.6.jar
[ERROR] urls[19] =
file:/home/et2448/.m2/repository/org/apache/cxf/cxf-rt-core/2.7.1-SNAPSHOT/cxf-rt-core-2.7.1-SNAPSHOT.jar
[ERROR] urls[20] =
file:/home/et2448/.m2/repository/org/apache/cxf/cxf-tools-wsdlto-core/2.7.1-SNAPSHOT/cxf-tools-wsdlto-core-2.7.1-SNAPSHOT.jar
[ERROR] urls[21] =
file:/home/et2448/.m2/repository/org/apache/cxf/cxf-tools-validator/2.7.1-SNAPSHOT/cxf-tools-validator-2.7.1-SNAPSHOT.jar
[ERROR] urls[22] =
file:/home/et2448/.m2/repository/org/apache/cxf/cxf-rt-bindings-soap/2.7.1-SNAPSHOT/cxf-rt-bindings-soap-2.7.1-SNAPSHOT.jar
[ERROR] urls[23] =
file:/home/et2448/.m2/repository/org/apache/cxf/cxf-rt-databinding-jaxb/2.7.1-SNAPSHOT/cxf-rt-databinding-jaxb-2.7.1-SNAPSHOT.jar
[ERROR] urls[24] =
file:/home/et2448/.m2/repository/org/apache/cxf/cxf-tools-wsdlto-databinding-jaxb/2.7.1-SNAPSHOT/cxf-tools-wsdlto-databinding-jaxb-2.7.1-SNAPSHOT.jar
[ERROR] urls[25] =
file:/home/et2448/.m2/repository/org/apache/cxf/cxf-tools-wsdlto-frontend-jaxws/2.7.1-SNAPSHOT/cxf-tools-wsdlto-frontend-jaxws-2.7.1-SNAPSHOT.jar
[ERROR] urls[26] =
file:/home/et2448/.m2/repository/xml-resolver/xml-resolver/1.2/xml-resolver-1.2.jar
[ERROR] urls[27] =
file:/home/et2448/.m2/repository/org/apache/cxf/cxf-tools-wsdlto-frontend-javascript/2.7.1-SNAPSHOT/cxf-tools-wsdlto-frontend-javascript-2.7.1-SNAPSHOT.jar
[ERROR] urls[28] =
file:/home/et2448/.m2/repository/org/apache/cxf/cxf-rt-javascript/2.7.1-SNAPSHOT/cxf-rt-javascript-2.7.1-SNAPSHOT.jar
[ERROR] urls[29] =
file:/home/et2448/.m2/repository/org/springframework/spring-core/3.0.7.RELEASE/spring-core-3.0.7.RELEASE.jar
[ERROR] urls[30] =
file:/home/et2448/.m2/repository/org/springframework/spring-asm/3.0.7.RELEASE/spring-asm-3.0.7.RELEASE.jar
[ERROR] urls[31] =
file:/home/et2448/.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar
[ERROR] urls[32] =
file:/home/et2448/.m2/repository/org/springframework/spring-beans/3.0.7.RELEASE/spring-beans-3.0.7.RELEASE.jar
[ERROR] urls[33] =
file:/home/et2448/.m2/repository/org/springframework/spring-context/3.0.7.RELEASE/spring-context-3.0.7.RELEASE.jar
[ERROR] urls[34] =
file:/home/et2448/.m2/repository/org/springframework/spring-aop/3.0.7.RELEASE/spring-aop-3.0.7.RELEASE.jar
[ERROR] urls[35] =
file:/home/et2448/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar
[ERROR] urls[36] =
file:/home/et2448/.m2/repository/org/springframework/spring-expression/3.0.7.RELEASE/spring-expression-3.0.7.RELEASE.jar
[ERROR] urls[37] =
file:/home/et2448/.m2/repository/org/apache/ant/ant/1.8.4/ant-1.8.4.jar
[ERROR] urls[38] =
file:/home/et2448/.m2/repository/org/apache/ant/ant-launcher/1.8.4/ant-launcher-1.8.4.jar
[ERROR] urls[39] =
file:/home/et2448/.m2/repository/org/apache/ant/ant-nodeps/1.8.1/ant-nodeps-1.8.1.jar
[ERROR] urls[40] =
file:/home/et2448/.m2/repository/org/sonatype/plexus/plexus-build-api/0.0.7/plexus-build-api-0.0.7.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm
ClassRealm[project>com.edb.fs.cashpool.srv:cp-server-schemas:1.0-SNAPSHOT,
parent: ClassRealm[maven.api, parent: null]]]
[ERROR]
[ERROR] -----------------------------------------------------:
org.apache.cxf.APIMessages != org.apache.cxf.Messages
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with
the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions,
please read the following articles:


With 2.6.3 I get:
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.cxf:cxf-codegen-plugin:2.6.3:wsdl2java (default) on project
cp-server-schemas: Execution default of goal
org.apache.cxf:cxf-codegen-plugin:2.6.3:wsdl2java failed: Schema Error
: src-resolve: Cannot resolve the name 'common:baseResponseType' to
a(n) 'type definition' component. -> [Help 1]



In 2.6.2 it's a warning - but the actual generation passes:
[WARNING] /home/et2448/projects/payment/cashpool/server/cp-server-schemas/target/generated-resources/wsfabric/wsdl/CPLSCashpoolParameters_V1.wsdl
[1113:11]: src-resolve.4.2: Error resolving component
'common:basePersistentEntityType'. It was detected that
'common:basePersistentEntityType' is in namespace
'urn:srv.cashpool.fs.edb.com:domain:common:v1', but components from
this namespace are not referenceable from schema document
'file:/home/et2448/projects/payment/cashpool/server/cp-server-schemas/target/generated-resources/wsfabric/wsdl/CPLSCashpoolParameters_V1.wsdl#types11'.
If this is the incorrect namespace, perhaps the prefix of
'common:basePersistentEntityType' needs to be changed. If this is the
correct namespace, then an appropriate 'import' tag should be added to
'file:/home/et2448/projects/payment/cashpool/server/cp-server-schemas/target/generated-resources/wsfabric/wsdl/CPLSCashpoolParameters_V1.wsdl#types11'.


In 2.6.1 there is no complaint at all.

Stripped down wsdl:

<--type using type from common schema: -->
  <wsdl:types>
    <xs:schema xmlns:common="urn:srv.cashpool.fs.edb.com:domain:common:v1"
xmlns:cp="urn:srv.cashpool.fs.edb.com:domain:cashpool:v1"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
attributeFormDefault="unqualified" e
lementFormDefault="qualified"
targetNamespace="urn:srv.cashpool.fs.edb.com:ws:cashpool:v1">....

  <xs:import namespace="urn:srv.cashpool.fs.edb.com:domain:common:v1"/>

  <xs:complexContent>
          <xs:extension base="common:baseResponseType">
            <xs:sequence>






    </xsd:schema>


<-- schema defining common types: -->
    <schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:common="urn:srv.cashpool.fs.edb.com:domain:common:v1"
xmlns:edbheader="http://edb.com/ws/WSCommon_v21"
attributeFormDefault="unqualified" elementFormDefau
lt="qualified" targetNamespace="urn:srv.cashpool.fs.edb.com:domain:common:v1">



2012/10/31 Daniel Kulp <dk...@apache.org>:
>
> On Oct 31, 2012, at 6:38 AM, Maxence Dewil <th...@gmail.com> wrote:
>> I'm not sure it is a bug, so I submit this one to the community first:
>>
>> Here is my problem:
>> - The WSDLs of our business partner are on the internet BUT are invalid.
>> - They provided me the valid WSDLs by mail.
>> - I embedded the valid WSDLs in my project jar.
>> - I embedded an XML Catalog in my project jar in order to prevent the
>> cxf-codegen-plugin from downloading the invalid WSDLs from the internet.
>> - I enabled the WSDL validation
>>
>> But with cxf-codegen-plugin releases >= 2.6.1, the wsdl2java goal fails: it
>> seems that the validation ignores the XML Catalog.
>> And if I disable the validation, the wsdl2java goal succeeds. The XML
>> Catalog is used in that case.
>>
>> Thank you for your help
>
>
> Is there any chance you could test this with the latest 2.7.1-SNAPSHOT version of CXF?    I made a bunch of changes in this area two weeks ago that may fix this, not really sure.   There are a few places in the JAXB code (particularly with JAXB 2.2.x) that does some funky (and incorrect) URL resolving that is very hard to override and "fix".
>
> If the latest snapshots don't fix it, a simple test case attached to a JIRA would be great.
>
> Thanks!
> --
> Daniel Kulp
> dkulp@apache.org - http://dankulp.com/blog
> Talend Community Coder - http://coders.talend.com
>



-- 
--
David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen

Re: cxf-codegen-plugin / XML Catalog / WSDL validation

Posted by Daniel Kulp <dk...@apache.org>.
On Oct 31, 2012, at 6:38 AM, Maxence Dewil <th...@gmail.com> wrote:
> I'm not sure it is a bug, so I submit this one to the community first:
> 
> Here is my problem:
> - The WSDLs of our business partner are on the internet BUT are invalid.
> - They provided me the valid WSDLs by mail.
> - I embedded the valid WSDLs in my project jar.
> - I embedded an XML Catalog in my project jar in order to prevent the
> cxf-codegen-plugin from downloading the invalid WSDLs from the internet.
> - I enabled the WSDL validation
> 
> But with cxf-codegen-plugin releases >= 2.6.1, the wsdl2java goal fails: it
> seems that the validation ignores the XML Catalog.
> And if I disable the validation, the wsdl2java goal succeeds. The XML
> Catalog is used in that case.
> 
> Thank you for your help


Is there any chance you could test this with the latest 2.7.1-SNAPSHOT version of CXF?    I made a bunch of changes in this area two weeks ago that may fix this, not really sure.   There are a few places in the JAXB code (particularly with JAXB 2.2.x) that does some funky (and incorrect) URL resolving that is very hard to override and "fix".

If the latest snapshots don't fix it, a simple test case attached to a JIRA would be great.

Thanks!
-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com