[jboss-user] [JBossWS] - Consuming a web service from an EJB3 stateless sb

aboudank do-not-reply at jboss.com
Sat Nov 4 04:49:01 EST 2006


I am new to JBOSSWS. I am using JBoss 4.0.4.GA, EJB3 RC8 and JBoss WS 1.0.1.GA. I wrote and deployed a JSR 180 WS which worked fine. I can access it from a .NET C# app. Now I am trying to consume this WS from a statless EJB3 and I am not able to do it. Here is what I did:

Using WSTOOLS, I generated the client artifacts which generated the mapping.xml file and the client interfaces. Then I added the following EJB-JAR.xml file in the META-INF directory:

  | <?xml version="1.0" encoding="UTF-8"?>
  | <ejb-jar
  | 	xmlns="http://java.sun.com/xml/ns/j2ee"
  | 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  | 	xmlns:GEE="http://www.poseidon.com/webservices/sgee"
  | 	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/ejb-jar_3_0.xsd"
  | 	version="2.1"
  | >
  | 	<enterprise-beans>
  | 		<session>
  | 			<ejb-name>MembersManagerBean</ejb-name>
  | 			<service-ref>
  | 				<service-ref-name>service/GEEWebService</service-ref-name>
  | 				<service-interface>javax.xml.rpc.Service</service-interface>
  | 				<wsdl-file>META-INF/wsdl/GEEWebService.wsdl</wsdl-file>
  | 				<jaxrpc-mapping-file>META-INF/GEEWS-jaxrpc-mapping.xml</jaxrpc-mapping-file>
  | 				<mapped-name>service/GEEWebService</mapped-name>
  | 				<port-component-ref>
  | 					<service-endpoint-interface>poseidon.com.webservices.sgee.GEEWebService_Service</service-endpoint-interface>
  | 				</port-component-ref>
  | 			</service-ref>
  | 		</session>
  | 	</enterprise-beans>
  | </ejb-jar>

I have an empty JBOSS.XML file...should it have anything?

I get a message in the log file that says:

  | DEBUG [org.jboss.ejb3.EJBContainer] binding enc: env/service/GEEWebService to service/GEEWebService

But I do not see the JNDI binding and when I try to access it using:

  | ctx.lookup("java:comp/env/service/GEEWebService");


  | ctx.lookup("service/GEEWebService");

I get the following error:

  | INFO  [STDOUT] GHRRulesManagerBean.getGEEWebService exception: env not bound

Please help. Thanks.


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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3983189

More information about the jboss-user mailing list