Announcement

Collapse
No announcement yet.

XDoclet, Maven2 und JBossWS

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • XDoclet, Maven2 und JBossWS

    Hallo!

    Ich habe das Problem, dass mir einfache Webservices nicht unter http://localhost:8080/jbossws/services angezeigt werden. Ich benutze Maven2 mit dem JBoss und muss XDoclet nehmen, da es sich um ein einfaches Projekt handelt. Könnte mir bitte jdm. helfen?


    Die EJB hat folgenden Quellcode:

    Code:
    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) {
    	}
    }
    Die POM.XML des Maven-Projekts hat folgenden Code:

    Code:
    <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>
Working...
X