Hello I have a question. I only want to deploy an EJB written in XDoclet (i 
know about annotations, but need to publish webservices of an existing project 
written with XDoclet) which is displayed under 
http://localhost:8080/jbossws/services 
I am using Maven2 and XDoclet.

I will post the POM.XML of the EJB-Project an the EJB's Java-Code.

First the EJB-Code with XDoclet:


  | package com.bbraun.bbmag.test;
  | 
  | import java.rmi.RemoteException;
  | 
  | import java.math.*;
  | import javax.ejb.SessionBean;
  | import javax.ejb.SessionContext;
  | import java.math.*;
  | 
  | /**
  |  * Trade Session EJB manages all Trading services
  |  * 
  |  * @ejb.bean              name="FirstEJBBean" 
  |  *                        display-name="FirstEJBBean" 
  |  *                        description="A simple hello world bean."
  |  *                        jndi-name="FirstEJBBean" 
  |  *                        type=stateless 
  |  *                        view-type="service-endpoint"
  |  * 
  |  * @ejb.interface
  |  * service-endpoint-class="com.bbraun.bbmag.test.StatlessEJBEndpoint"
  |  *
  |  * @wsee.port-component
  |  * name="StatlessEJBEndpointPort"
  |  */
  | public class StatlessEjbBean implements SessionBean
  | {
  | 
  |     BigDecimal yenRate = new BigDecimal("121.6000");
  | 
  |     BigDecimal euroRate = new BigDecimal("0.0077");
  | 
  |         /** 
  |      * @ejb.interface-method view-type="service-endpoint"
  |      */
  |     public BigDecimal dollarToYen(BigDecimal dollars) {
  |             BigDecimal result = dollars.multiply(yenRate);
  |             return result.setScale(2, BigDecimal.ROUND_UP);
  |     }
  |     
  |         /** 
  |      * @ejb.interface-method view-type="service-endpoint"
  |      */
  |     public BigDecimal yenToEuro(BigDecimal yen) {
  |             BigDecimal result = yen.multiply(euroRate);
  |             return result.setScale(2, BigDecimal.ROUND_UP);
  |     }
  | 
  |     public StatlessEjbBean() {
  |     }
  | 
  |     public void ejbCreate() {
  |     }
  | 
  |     public void ejbRemove() {
  |     }
  | 
  |     public void ejbActivate() {
  |     }
  | 
  |     public void ejbPassivate() {
  |     }
  | 
  |     public void setSessionContext(SessionContext sc) {
  |     }
  | }
  | 

Here is the POM.XML of the EJB-Project:


  | <project>
  |     <modelVersion>4.0.0</modelVersion>
  |     <parent>
  |             <groupId>com.bbraun.bbmag.test</groupId>
  |             <artifactId>FirstEJB</artifactId>
  |             <version>0.1</version>
  |     </parent> 
  |     <artifactId>FirstEJB-ejb</artifactId>
  |     <packaging>ejb</packaging>
  |     <name>FirstEJBejb</name>
  |     <description>Eine EJB</description>
  | 
  | 
  |     <dependencies>
  |             <dependency>
  |                     <groupId>org.apache.geronimo.specs</groupId>
  |                     <artifactId>geronimo-j2ee_1.4_spec</artifactId>
  |                     <version>1.0</version>
  |                     <scope>provided</scope>
  |             </dependency>
  |             <dependency>
  |                     <groupId>commons-logging</groupId>
  |                     <artifactId>commons-logging</artifactId>
  |                     <version>1.0.3</version>
  |                     <scope>provided</scope>
  |             </dependency>
  |             <dependency>
  |                     <groupId>axis</groupId>
  |                     <artifactId>axis</artifactId>
  |                     <version>1.2</version>
  |                     <scope>provided</scope>
  |             </dependency>
  |             <dependency>
  |                     <groupId>axis</groupId>
  |                     <artifactId>axis-jaxrpc</artifactId>
  |                     <version>1.2</version>
  |                     <scope>provided</scope>
  |             </dependency>           
  |     </dependencies>
  |     <build>
  |             <testSourceDirectory>src/test</testSourceDirectory>
  |             <plugins>
  |                     <plugin>
  |                             <groupId>org.codehaus.mojo</groupId>
  |                             <artifactId>xdoclet-maven-plugin</artifactId>
  |                             <executions>
  |                                     <execution>
  |                                             <id>ejb</id>
  |                                             <phase>generate-sources</phase>
  |                                             <goals>
  |                                                     <goal>xdoclet</goal>
  |                                             </goals>
  |                                             <configuration>
  |                                                     <tasks>
  |                                                             <ejbdoclet
  |                                                                     
verbose="true"
  |                                                                     
force="true"
  |                                                                     
ejbSpec="2.1"
  |                                                                     
destDir="${project.build.directory}/generated-sources/xdoclet">
  |                                                                     <fileset
  |                                                                             
dir="${project.build.sourceDirectory}">
  |                                                                             
<include name="**/*Bean.java"></include>
  |                                                                             
<include name="**/*MDB.java"></include>
  |                                                                     
</fileset>
  |                                                                     
<homeinterface />
  |                                                                     
<remoteinterface />
  |                                                                     
<localhomeinterface />
  |                                                                     
<localinterface />
  |                                                                     
<service-endpoint/>
  |                                                                     
<utilobject localProxies="true"/>
  |                                                                     
<deploymentdescriptor destDir="${project.build.outputDirectory}/META-INF"/>
  |                                                             </ejbdoclet>
  |                                                     </tasks>
  |                                             </configuration>
  |                                     </execution>
  |                             </executions>
  |                     </plugin>
  |                     <plugin>
  |                             <groupId>org.apache.maven.plugins</groupId>
  |                             <artifactId>maven-ejb-plugin</artifactId>
  |                             <configuration>
  |                                     <generateClient>true</generateClient>
  |                                     <clientExcludes>
  |                                             <clientExclude>
  |                                                     **/ejb/*Bean.class
  |                                             </clientExclude>
  |                                     </clientExcludes>
  |                             </configuration>
  |                     </plugin>
  |             </plugins>
  |     </build>
  | </project>
  | 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4036310#4036310

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4036310
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to