cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jay Blanton (JIRA)" <j...@apache.org>
Subject [jira] Updated: (CXF-2989) cxf-java2ws-plugin - While running the maven plugin, the wrapper beans that are generated complain when dependencies are in another jar.
Date Fri, 10 Sep 2010 19:55:33 GMT

     [ https://issues.apache.org/jira/browse/CXF-2989?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jay Blanton updated CXF-2989:
-----------------------------

    Attachment: sample-model-impl.zip

This project is a zip file of two maven projects because this zip file is used in another
JIRA issue that I will be opening up. 

There is a model project and a service project.

The model is built as a jar file and the service has a dependency on that model jar.  It is
defined in the pom.xml and defined in the plugin section.

When running mvn install, the generated wrapper beans will not get compiled because they complain
that they cannot resolve model references to classes that are in the model jar.


> cxf-java2ws-plugin - While running the maven plugin, the wrapper beans that are generated
complain when dependencies are in another jar.
> ----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-2989
>                 URL: https://issues.apache.org/jira/browse/CXF-2989
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 2.2.10
>         Environment: Running on Windows 7, with JDK 1.6, in STS
>            Reporter: Jay Blanton
>         Attachments: sample-model-impl.zip
>
>
> http://cxf.547215.n5.nabble.com/java2ws-problem-td568861.html#a2653030
> So here is a quick example.   
> 1) I have a pojo called ContactPoint with some basic information and it is to be represented
as a complexType. 
> 2) Pom file for building this into a jar. 
> 3) ContactPointEndpoint is a simple interface that takes in a ContactPoint and returns
it. 
> 4) Pom file that runs java2ws to generate a wsdl, wrapper bean, and client. 
> This produces a similar error where the ContactPointEndpoint is in its own project with
a dependency to the jar artifact that ContactPoint exists in. 
> The java2ws generates code and errors, but when I am in Eclipse and look at the generated
wrapper bean and client, there are no errors and it resolves the classes. 
> Any thoughts as to what this might be or what I have done wrong? 
> Thanks a ton!!!   Jay 
> ------------ContactPoint.java--------------------------------- 
> package com.foo; 
> import javax.xml.bind.annotation.XmlAccessType; 
> import javax.xml.bind.annotation.XmlAccessorType; 
> import javax.xml.bind.annotation.XmlType; 
> @XmlAccessorType(XmlAccessType.FIELD) 
> @XmlType(namespace = "http://foo.com/model", name = "ContactPoint", propOrder = { 
>         "id", "number" }) 
> public class ContactPoint { 
>     /** The id. */ 
>     private Long id; // NOPMD 
>     private String number; 
>     public Long getId() { 
>         return id; 
>     } 
>     public void setId(final Long id) { 
>         this.id = id; 
>     } 
>     public String getNumber() { 
>         return number; 
>     } 
>     public void setNumber(final String number) { 
>         this.number = number; 
>     } 
> } 
> ------------ContactPoint pom.xml--------------------------------- 
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

>   <modelVersion>4.0.0</modelVersion> 
>   <artifactId>foo-model</artifactId> 
>   <groupId>com.foo</groupId> 
>   <version>0.0.1-SNAPSHOT</version> 
>   <packaging>jar</packaging> 
> </project> 
> ------------ContactPointEndpoint.java--------------------------------- 
> package com.foo; 
> import javax.jws.WebMethod; 
> import javax.jws.WebParam; 
> import javax.jws.WebResult; 
> import javax.jws.WebService; 
> import javax.jws.soap.SOAPBinding; 
> import javax.xml.ws.RequestWrapper; 
> import javax.xml.ws.ResponseWrapper; 
> /** 
>  * Spring service that handles CRUD requests for People entities 
>  * 
>  * @generated 
>  */ 
> @WebService(targetNamespace = "http://foo.com/service") 
> @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.WRAPPED, use = SOAPBinding.Use.LITERAL,
style = SOAPBinding.Style.DOCUMENT) 
> public interface ContactPointEndpoint { 
>     /** 
>      * Save an existing People entity 
>      * 
>      * @generated 
>      */ 
>     @WebMethod 
>     @ResponseWrapper(targetNamespace = "http://foo.com/service") 
>     @RequestWrapper(targetNamespace = "http://foo.com/service") 
>     @WebResult(targetNamespace = "http://foo.com/model", name = "updatedContactPoint")

>     ContactPoint updateContactPoint( 
>             @WebParam(targetNamespace = "http://foo.com/model", name = "criteria") ContactPoint
cp); 
> } 
> ------------ContactPointEndpoint pom.xml--------------------------------- 
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

>         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

>         <modelVersion>4.0.0</modelVersion> 
>         <artifactId>foo-service</artifactId> 
>         <groupId>com.foo</groupId> 
>         <version>0.0.1-SNAPSHOT</version> 
>         <packaging>jar</packaging> 
>         <build> 
>                 <plugins> 
>                         <plugin> 
>                                 <groupId>org.apache.cxf</groupId> 
>                                 <artifactId>cxf-java2ws-plugin</artifactId>

>                                 <version>2.2.9</version> 
>                                 <dependencies> 
>                                         <dependency> 
>                                                 <groupId>org.apache.cxf</groupId>

>                                                 <artifactId>cxf-rt-frontend-jaxws</artifactId>

>                                                 <version>2.2.9</version>

>                                         </dependency> 
>                                         <dependency> 
>                                                 <groupId>org.apache.cxf</groupId>

>                                                 <artifactId>cxf-rt-frontend-simple</artifactId>

>                                                 <version>2.2.9</version>

>                                         </dependency> 
>                                         <dependency> 
>                                                 <artifactId>foo-model</artifactId>

>                                                 <groupId>com.foo</groupId>

>                                                 <version>0.0.1-SNAPSHOT</version>

>                                         </dependency> 
>                                 </dependencies> 
>                                 <executions> 
>                                         <execution> 
>                                                 <id>process-classes</id>

>                                                 <phase>process-classes</phase>

>                                                 <configuration> 
>                                                         <className>com.foo.ContactPointEndpoint</className>

>                                                         <genWsdl>true</genWsdl>

>                                                         <verbose>true</verbose>

>                                                         <genClient>true</genClient>

>                                                         <genWrapperbean>true</genWrapperbean>

>                                                         <frontend>jaxws</frontend>

>                                                         <databinding>jaxb</databinding>

>                                                         <argline>-createxsdimports
-s 
>                                                                 ${project.build.directory}/generated-sources/main/java
-classdir 
>                                                                 ${basedir}/target/classes</argline>

>                                                 </configuration> 
>                                                 <goals> 
>                                                         <goal>java2ws</goal>

>                                                 </goals> 
>                                         </execution> 
>                                 </executions> 
>                         </plugin> 
>                 </plugins> 
>         </build> 
>         <dependencies> 
>                 <dependency> 
>                         <artifactId>foo-model</artifactId> 
>                         <groupId>com.foo</groupId> 
>                         <version>0.0.1-SNAPSHOT</version> 
>                 </dependency> 
>         </dependencies> 
> </project> 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message