Hi,

I got the CXF code-gen plugin 2.1 working after debugging the plugin source code :-(.

Here is the pom.xml snippt I figured out. Please note I had to override wsdlRoot/testWsdlRoot to be a non-existing file to avoid NPE (I assume it's CXF bug if the wsdl files are in src/test/resources/wsdl).

       <plugin>
               <groupId>org.apache.cxf</groupId>
               <artifactId>cxf-codegen-plugin</artifactId>
               <version>2.1</version>
               <executions>
                   <execution>
                       <id>generate-sources</id>
                       <phase>generate-sources</phase>

                       <configuration>
                           
<sourceRoot>${basedir}/target/jaxws-source</sourceRoot>
                           <wsdlRoot>NONE</wsdlRoot>
                           <!-- Override the default value to avoid NPE -->
                           <testWsdlRoot>NONE</testWsdlRoot>
                           <wsdlOptions>
                               <wsdlOption>
                                   
<wsdl>${basedir}/src/test/resources/wsdl/Stock.wsdl</wsdl>
                                   
<outputDir>${basedir}/target/jaxws-source</outputDir>
                                   <packagenames>
                                       
<packagename>com.example.stock.cxf</packagename>
                                   </packagenames>
                               </wsdlOption>
                           </wsdlOptions>
                       </configuration>
                       <goals>
                           <goal>wsdl2java</goal>
                       </goals>
                   </execution>
               </executions>
           </plugin>

Thanks,
Raymond

--------------------------------------------------
From: "Scott Kurz" <[EMAIL PROTECTED]>
Sent: Wednesday, June 04, 2008 2:37 PM
To: <tuscany-user@ws.apache.org>
Subject: Re: Can't generate a Java interface from a WSDL portType

The Apache CXF tool issues a warning but still gens Java w/ JAXB
databindings from a portType WSDL.



On Wed, Jun 4, 2008 at 5:00 PM, Jean-Sebastien Delfino <[EMAIL PROTECTED]>
wrote:

SCA allows you to define service interfaces using either WSDL or Java (and
potentially other languages too). The SCA Java API and Annotations  spec
v1.0 says (section 1.9) says that the JAX-WS WSDL to Java mapping rules are
used to generate Java interfaces from WSDL.

I have a WSDL file describing my interface using a portType and I've been
trying the JAXWS wsimport Maven tool for about an hour now with no luck.
Looks like wsimport requires a WSDL <service>, which I don't have, and don't want to have to write in my WSDL (it wouldn't make much sense to have it on
an interface anyway).

Is Tuscany providing a WSDL interface/portType to Java generation tool?

Is anybody out there using WSDL and Java interfaces? Any luck? What JAX-WS
compliant tool are you using to generate your Java interfaces?
--
Jean-Sebastien


Reply via email to