[jboss-user] [EJB 3.0] - Embedded EJB3.0 and Web service problems

thillerson do-not-reply at jboss.com
Thu Sep 14 21:57:20 EDT 2006


I've been using Embedded JBoss EJB3.0 for a while now, but pretty new, and I'm brand new to JBoss web services.

First of all, I can't tell, is it possible to access web services using Embedded JBoss? Do I need to have some extra JbossWS artifacts around as well?

In case I can, here's my problem. I used wstool to generate my stubs and mapping file. Here is my ejb-jar.xml:

<?xml version="1.0" encoding="UTF-8"?>
  | <ejb-jar xmlns="http://java.sun.com/xml/ns/javaee"
  | 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  | 	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_3_0.xsd"
  | 	xmlns:campaignComplete="http://api.campaigncomplete.com/WebApi"
  | 	version="3.0"
  | >
  | 	<enterprise-beans>
  | 		<session>
  | 			<ejb-name>EmailCampaignServiceEJB</ejb-name>
  | 			<local>com.jlhalsey.mcc.webservices.EmailCampaignService</local>
  | 			<ejb-class>com.jlhalsey.mcc.webservices.EmailCampaignServiceBean</ejb-class>
  | 			<service-ref>
  | 				<service-ref-name>service/CampaignCompleteService</service-ref-name>
  | 				<service-interface>com.campaigncomplete.api.webapi.NonHostedDataService</service-interface>
  | 				<wsdl-file>META-INF/wsdl/NonHostedDataService.wsdl</wsdl-file>
  | 				<jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
  | 				<service-qname>campaignComplete:NonHostedDataService</service-qname>
  | 				<!--<mapped-name>service/CampaignCompleteService</mapped-name>
  | 				--><injection-target>
  | 					<injection-target-class>com.jlhalsey.mcc.webservices.EmailCampaignServiceBean</injection-target-class>
  | 					<injection-target-name>nonHostedDataService</injection-target-name>
  | 				</injection-target>
  | 				<port-component-ref>
  | 					<service-endpoint-interface>com.campaigncomplete.api.webapi.NonHostedDataServiceSoap</service-endpoint-interface>
  | 				</port-component-ref>
  | 			</service-ref>
  | 		</session>
  | 	</enterprise-beans>
  | </ejb-jar>

And here is my session bean:

package com.jlhalsey.mcc.webservices;
  | 
  | import javax.ejb.Local;
  | import javax.ejb.Stateless;
  | 
  | import com.campaigncomplete.api.webapi.HelloWorld;
  | import com.campaigncomplete.api.webapi.HelloWorldResponse;
  | import com.campaigncomplete.api.webapi.NonHostedDataService;
  | import com.campaigncomplete.api.webapi.NonHostedDataServiceSoap;
  | 
  | @Stateless(mappedName = "EmailCampaignServiceEJB")
  | @Local(value={EmailCampaignService.class})
  | public class EmailCampaignServiceBean implements EmailCampaignService {
  | 
  | 	private NonHostedDataService nonHostedDataService;
  | 
  | 	public String helloWorld() throws Exception {
  | 		NonHostedDataServiceSoap port = (NonHostedDataServiceSoap) nonHostedDataService.getNonHostedDataServiceSoap();
  | 
  | 		HelloWorldResponse respond =  port.helloWorld(new HelloWorld());
  | 		return respond.getHelloWorldResult();
  | 	}
  | 
  | 	public void setNonHostedDataService(NonHostedDataService service) {
  | 		this.nonHostedDataService = service;
  | 	}
  | 
  | }

into which I'm trying to get a proxy of the service injected. It won't inject because it says that "service" is not bound.

Do I have a jndi problem? a configuration problem? Or am I doing something completely wrong?

Thank you,
Tony

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

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



More information about the jboss-user mailing list