maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sim085 <sim...@hotmail.com>
Subject Exposing EJB3.1 bean as webservice and use from servlet!?
Date Sat, 17 Mar 2012 20:24:57 GMT
Hello, can please someone help me. I am at a loss how I can expose an EJB3.1
as a  Webservice in a maven project and access this from a Servlet. 

My EJB class is as follows:

[code]
@WebService(serviceName="EcoService")
@SOAPBinding(style = SOAPBinding.Style.DOCUMENT)
@Stateless
public class EchoBean {

	@WebMethod(operationName="EchoIn", action="EchoIn")
	@WebResult(name="EchoOut")
	public String echo(@WebParam(name = "Message") String message){
		return message;
	}
}
[/code]

Now from my reading and examples on the Internet, I understand that somehow
I need to generate an Service to access 

[code]
@WebServiceRef(wsdlLocation="http://localhost:8080/EchoService/EcoBean?WSDL")
EchoService echoService = null;
...
EchoBean echoBean = EchoService.getEchoBeanPort();
String result = echoBean.echo();
[/code]

However I am at a loss how I will generate the EchoService class! I tried
looking in to org.jvnet.jax-ws-commons:jaxws-maven-plugin:2.2:wsgen and this
is generating classes for every method I have in EchoBean, but not a Service
class on which I can use the @WebServiceRef annotation on!! This could be
because I did not configure the plugin correctly

[code]
            <plugin>
                <groupId>org.jvnet.jax-ws-commons</groupId>
                <artifactId>jaxws-maven-plugin</artifactId>
				<version>2.2</version>
                <configuration>
                    <verbose>true</verbose>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>wsgen</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>	
[/code]
Can please someone help me out!! I have also made the whole project
available on my drop box account available from here:

http://dl.dropbox.com/u/27542229/webservice-example.zip



 

--
View this message in context: http://maven.40175.n5.nabble.com/Exposing-EJB3-1-bean-as-webservice-and-use-from-servlet-tp5574228p5574228.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message