Hi,

I have still have this warning (JDK6+Maven3):


[WARNING] src-resolve: Cannot resolve the name 'ns1:multiItemEntitlementDTO' to 
a(n) 'type definition' component.
  line 35 of 
file:/E:/IdeaProjects/1/test-cxf-java2wsdl/target/generated-sources/wsdl/AmazingService.wsdl#types?schema2

[WARNING] src-resolve: Cannot resolve the name 'ns1:multiItemEntitlementDTO' to 
a(n) 'type definition' component.
  line 35 of 
file:/E:/IdeaProjects/1/test-cxf-java2wsdl/target/generated-sources/wsdl/AmazingService.wsdl#types?schema2

From: Daniel Kulp [mailto:[email protected]]
Sent: Friday, August 24, 2012 2:17 PM
To: [email protected]; Pavel Khodchenkov
Subject: Re: cxf-java2ws-plugin wsdl generation on java 7



I've attached the pom I used.

Dan




On Aug 24, 2012, at 5:23 AM, Pavel Khodchenkov 
<[email protected]<mailto:[email protected]>> 
wrote:

> Hi,
> If you change the CXF plugin to generate the WSDL into 
> ${project.build.directory}/generated-sources/wsdl, then you get the EXACT 
> same wsdl as if you generate elsewhere, but you no longer get the warning 
> from the JAX-WS plugin.
> ----------------------------------
>
> I have tried to apply proposed solution, but still have warnings (suppose I 
> am doing smth wrong :) ).
> Can you please send me the modified maven project where the wsdl generated by 
> CXF is accepted by Metro without warning?
>
> -----Original Message-----
> From: Daniel Kulp [mailto:[email protected]]
> Sent: Thursday, August 23, 2012 9:08 PM
> To: [email protected]<mailto:[email protected]>
> Subject: Re: cxf-java2ws-plugin wsdl generation on java 7
>
>
> I honestly think you've hit a bug in the jaxws-maven-plugin and not CXF.
>
> If you change the CXF plugin to generate the WSDL into 
> ${project.build.directory}/generated-sources/wsdl, then you get the EXACT 
> same wsdl as if you generate elsewhere, but you no longer get the warning 
> from the JAX-WS plugin.
>
> Also, if you add:
>                
> <resourceDestDir>${project.build.directory}/generated/wsdl</resourceDestDir>
>                 <inlineSchemas>true</inlineSchemas>
> to the METRO profiles call to wsgen and run "mvn  clean install -PMETRO" and 
> then "mvn install -PMETRO", you get the same error.
>
>
>
> Basically, it looks like the wsimport thing needs to have the "generated" 
> directory on the class path somehow.    If you add:
>
>    <build>
>         <resources>
>              <resource>
>                    <directory>${project.build.directory}/generated</directory>
>              </resource>
>         </resources>
>    </build>
>
> to the pom to make sure the generated directory is on the class path, then it 
> also runs without the error.
>
>
> Dan
>
>
>
> On Aug 22, 2012, at 8:25 AM, Pavel Khodchenkov 
> <[email protected]<mailto:[email protected]>> 
> wrote:
>
>> Hi there,
>> I have tried Metro and it was able to generate the wsdl without this 
>> warning. The problem is in having the XmlRootElement annotation in one of 
>> the entities when this entity is placed inside a list :D . I have extracted 
>> the most simple reproducible use case (please see maven 3 project attached) 
>> which produce such warning. However , this warning in this sample project is 
>> generated also on JDK 6 when using CXF java2wsdl (Metro works fine). Once 
>> XmlRootElement annotation is removed from MultiItemEntitlementDTO then CXF 
>> also generates a valid wsdl. Please take a look.
>>
>> P.S Some of my services were exposed as SOAP as REST at the same time, so 
>> XmlRootElement annotation was required on entity classes , otherwise rest 
>> invocation fails with 'No message body writer has been found for class' and  
>> <response> element in wadl will not have type declaration.
>> -----Original Message-----
>> From: Glen Mazza [mailto:[email protected]]
>> Sent: Tuesday, August 21, 2012 10:02 PM
>> To: [email protected]<mailto:[email protected]>
>> Subject: Re: cxf-java2ws-plugin wsdl generation on java 7
>>
>> It might be good to post a *minimal* Java class that reproduces the same 
>> error; basically rip out as much as you can from the SEI to give the 
>> simplest class that provides the same error.  Checking to see what Metro 
>> does (same error? no error?) might also be informative:
>> http://www.jroller.com/gmazza/entry/java_first_web_service.
>>
>> Offhand, I know the default JAXB is different between Java 6 and 7
>> (JAXB
>> 2.1 vs. JAXB 2.2), so that could be the issue.
>>
>> Glen
>>
>> On 08/20/2012 06:33 AM, Pavel Khodchenkov wrote:
>>>
>>> Hi folks,
>>>
>>> When I use jdk 7 I have the following warning in jaxws-maven-plugin
>>> when importing the wsdl generated by cxf-java2ws-plugin 2.6.0:
>>>
>>> [WARNING] src-resolve: Cannot resolve the name
>>> 'ns1:multiItemEntitlementDTO' to a(n) 'element declaration' component.
>>>
>>> line 163 of
>>> file:/E:/IdeaProjects/transaction-service/web/target/generated/wsdl/T
>>> r
>>> ansactionService.wsdl#types?schema1
>>>
>>> [WARNING] src-resolve: Cannot resolve the name
>>> 'ns1:multiItemEntitlementDTO' to a(n) 'element declaration' component.
>>>
>>> line 163 of
>>> file:/E:/IdeaProjects/transaction-service/web/target/generated/wsdl/T
>>> r
>>> ansactionService.wsdl#types?schema1
>>>
>>> And the stub generated this wsdl does not work very well: server
>>> fails with namespace mismatch.
>>>
>>> There is no such issues when I use jdk 6.
>>>
>>> I have attached both wsdls generated by jdk 6 and jdk 7.
>>>
>>> Does somebody have any ideas?
>>>
>>
>> <test-cxf-java2wsdl.zip>
>
> --
> Daniel Kulp
> [email protected]<mailto:[email protected]> - http://dankulp.com/blog Talend 
> Community Coder - http://coders.talend.com
>

--
Daniel Kulp
[email protected]<mailto:[email protected]> - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Reply via email to