• Post Reply Bookmark Topic Watch Topic
  • New Topic

Shared library class between client and server

 
daniele licitra
Ranch Hand
Posts: 81
Java Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi to all.

I have a library with some entities: the classes representing the MODEL. For example, i have the class Order. I have also another library with EJBs for the CONTROL layer to persist the entity on the DB.

Then, I have two application, the first is a server and the second is a client.

The server has a SOAP webservice with a simple method : it get order and save it on DB using the two library.
The client send orders to the server by the webservice client created by wsimport maven plugin.

When maven generates the client from the wsdl, it create another Order class, different from the first, so I can't use EJB from the control layer library, so i must recreate the EJB or traslate generated Order class in the entity class Order.

Does exist a simple way to force wsimport to use some classes from provided library?

This is the maven plugin

<plugin>
<groupId>org.jvnet.jax-ws-commons</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<id>wsimport-generate-StdODanSWebServicePortType</id>
<goals>
<goal>wsimport</goal>
</goals>
<configuration>
<bindingDirectory>${basedir}/src/main/resources/xsd</bindingDirectory>
<!-- <bindingFiles>
<bindingFile>bssstdodan.episode</bindingFile>
</bindingFiles>-->
<wsdlFiles>
<wsdlFile>192.168.89.134_8080/BssWebCore/StdODanSWebService/StdODanSWebServicePortType.wsdl</wsdlFile>
</wsdlFiles>
<packageName>com.bsssrl.bssstdodan_wss.client</packageName>
<wsdlLocation>http://192.168.89.134:8080/BssWebCore/StdODanSWebService/StdODanSWebServicePortType?wsdl</wsdlLocation>
<staleFile>${project.build.directory}/jaxws/stale/StdODanSWebServicePortType.stale</staleFile>
</configuration>
<phase>generate-sources</phase>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>javax.xml</groupId>
<artifactId>webservices-api</artifactId>
<version>2.0</version>
</dependency>
</dependencies>
<configuration>
<sourceDestDir>${project.build.directory}/generated-sources/jaxws-wsimport</sourceDestDir>
<xnocompile>true</xnocompile>
<verbose>true</verbose>
<extension>true</extension>
<catalog>${basedir}/src/jax-ws-catalog.xml</catalog>
<target>2.0</target>
</configuration>
</plugin>


I tryed using episode file but without success
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!