Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Cannot expose EJB3.0 Stateless Session Bean as JAXWS webservice on WAS 6.1

453 views
Skip to first unread message

Sonal....@lntinfotech.com

unread,
Jul 17, 2008, 5:54:33 AM7/17/08
to
I am trying to expose EJB3.0 Stateless Session Bean as a JAX-WS webservice on WAS 6.1.

Server is WAS 6.1.0.13

Getting following error while deploying EJB

7/17/08 15:18:41:220 IST 000000dd WASWSDLGenera E WSWS7054E: The Web Services Description Language (WSDL) file could not be generated for the bs.dk.ejb.HelloBean Web service implementation class because of the following error: java.lang.Exception: A WSDL Definition could not be generated for the implementation class: bs.dk.ejb.HelloBean

7/17/08 15:18:41:252 IST 000000dd ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl initialize FFDC0009I: FFDC opened incident stream file C:\Program Files\IBM\SDP70\runtimes\base_v61\profiles\AppSrv01\logs\ffdc\server1_000000dd_ 08.07.17_15.18.41_0.txt

7/17/08 15:18:41:298 IST 000000dd ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC closed incident stream file C:\Program Files\IBM\SDP70\runtimes\base_v61\profiles\AppSrv01\logs\ffdc\server1_000000dd_ 08.07.17_15.18.41_0.txt

7/17/08 15:18:41:345 IST 000000dd WSModuleDescr E WSWS7027E: JAX-WS Service Descriptions could not be correctly built because of the following error: javax.xml.ws.WebServiceException: WSWS7054E: The Web Services Description Language (WSDL) file could not be generated for the bs.dk.ejb.HelloBean Web service implementation class because of the following error: java.lang.Exception: A WSDL Definition could not be generated for the implementation class: bs.dk.ejb.HelloBean

at com.ibm.ws.websvcs.wsdl.WASWSDLGenerator.generateWsdl(WASWSDLGenerator.java:210 )

at org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl.generateWSDL(En dpointDescriptionImpl.java:1752)

at org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl. (Endpoint DescriptionImpl.java:330)

at org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.setupServiceDesc riptionImpl(ServiceDescriptionImpl.java:225)

at org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.(ServiceDe scriptionImpl.java:183)

at org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.createServiceDes criptionFromDBCMap(DescriptionFactoryImpl.java:179)

at org.apache.axis2.jaxws.description.DescriptionFactory.createServiceDescriptionF romDBCMap(DescriptionFactory.java:135)

at com.ibm.ws.websvcs.desc.WSModuleDescriptorImpl.buildServices(WSModuleDescriptor Impl.java:320)

at com.ibm.ws.websvcs.desc.WSModuleDescriptorImpl.getServices(WSModuleDescriptorIm pl.java:260)

at com.ibm.ws.webservices.admin.deploy.ServiceIndexDataBuilder.getWSData(ServiceIn dexDataBuilder.java:50)

at com.ibm.ws.webservices.admin.deploy.ServiceIndexServerTaskImpl.listWebServices( ServiceIndexServerTaskImpl.java:142)

at com.ibm.ws.webservices.admin.deploy.ServiceIndexServerTaskImpl.listWebServices( ServiceIndexServerTaskImpl.java:107)

at com.ibm.ws.webservices.admin.deploy.ServiceIndexServerTask.performTask(ServiceI ndexServerTask.java:163)

at com.ibm.ws.management.application.SchedulerImpl.run(SchedulerImpl.java:262)

at java.lang.Thread.run(Thread.java:810)

Caused by: java.lang.Exception: A WSDL Definition could not be generated for the implementation class: bs.dk.ejb.HelloBean

at com.ibm.ws.websvcs.wsdl.WASWSDLGenerator.generateWsdl(WASWSDLGenerator.java:183 )

... 14 more

Sonal....@lntinfotech.com

unread,
Jul 17, 2008, 6:33:41 AM7/17/08
to
Following is the code:

@Stateless
@WebService(serviceName= "HelloWS" )
public class HelloBean implements HelloIntr
{
 
@WebMethod
public String callHello(String name)
{
System.out.println( "in callHello()" );
System.out.println( "Input - String name : " + name);
return "Hello " + name + " !!!!!!" ;
}
}


Is it possible to expose EJB3.0 as JAX-WS webservice ??

Mark Lewis

unread,
Jul 18, 2008, 11:37:39 AM7/18/08
to
Hopefully somebody will correct me if they have better information but I
believe that is is not possible to directly expose an EJB3 session bean
as a JAX-WS Web Services in WebSphere 6.1. Instead you need to expose a
plain Java object as a JAX-WS Web Service, and have that Java object
invoke the EJB3 bean.

PeterQ...@freightliner.com

unread,
Jul 18, 2008, 6:12:32 PM7/18/08
to
So, the web service endpoint cannot live in the EJB3 container? Is this going to be changed in the future, or will we always have to write wires or pass through adapters?

Also, according to the document, you generate a WSDL off of an EJB implementation using wsgen. This gets placed into the EJB project. Then using the web services wizard you copy the WSDL to the Dynamic Web project. We're supposed to keep two copies of the WSDL file in one EAR archive?

Can the wsdlLocation attribute in the javax.jws.WebService annotation point to a WSDL file in a different project? (E.G. to keep only one copy of the WSDL)

Mark Lewis

unread,
Jul 21, 2008, 11:12:03 AM7/21/08
to
PeterQ...@freightliner.com wrote:
> So, the web service endpoint cannot live in the EJB3 container? Is this going to be changed in the future, or will we always have to write wires or pass through adapters?

A SOAP/HTTP endpoint is not likely to actually live in an EJB container
since an EJB container does not service HTTP requests. However, tooling
will generate the required artifacts to expose an annotated stateless
session bean via HTTP without requiring you to write anything yourself.

> Also, according to the document, you generate a WSDL off of an EJB implementation using wsgen. This gets placed into the EJB project. Then using the web services wizard you copy the WSDL to the Dynamic Web project. We're supposed to keep two copies of the WSDL file in one EAR archive?
>
> Can the wsdlLocation attribute in the javax.jws.WebService annotation point to a WSDL file in a different project? (E.G. to keep only one copy of the WSDL)

I haven't actually read the document in question so I am not familiar
with the scenario being described. It may be worth pointing out that
the wsdlLocation attribute is not actually required if you are happy
with the WSDL that will be generated based on an annotated class, so no
WSDL is required to be included in either an EJB or Web module
containing JAX-WS services. Hope that helps.

Randy Schnier

unread,
Jul 21, 2008, 12:03:34 PM7/21/08
to
The workaround is required when using the webservice feature pack for WAS 6.1 and EJB 3.0 feature pack for WAS 6.1. WAS 7.0, being the full Java EE v5 release, will no longer require the workaround.

-- Randy

miguelp...@hotmail.com

unread,
Sep 29, 2008, 4:10:03 PM9/29/08
to
I have the same problem, and I can't make the example that is on the Book, since I don't have JAX WS web service runtime, can anyone help me? Thanks in advanced

Randy Schnier

unread,
Sep 29, 2008, 5:17:50 PM9/29/08
to
The JAX-WS tools and runtime are part of the web service feature pack for WAS 6.1.

- Randy

0 new messages