Jin Kwon
Jin Kwon

Reputation: 22027

EJB as WebService context-root gone

I'm working on a project with JAX-WS.

When I annotate my endpoint class with @WebService the WSDL is marked in console like

.../<context-root>/XXXService?wsdl

When I add @Stateless on those endpoints the WSDL is not marked in console and the actual address is

.../XXXService/XXXEndpoint?wsdl

Is this normal or expected?

Update

For further readers.

I couldn't find any resolution. I decided not to use mixed @Stateless+@WebService. I split those @EJBs and @WebServices for clear module separation.

Upvotes: 1

Views: 1195

Answers (1)

kolossus
kolossus

Reputation: 20691

What youre experiencing is expected behaviour. It's a different matter if the service s not functional. When an EJB 3.x stateless bean is deployed as a WS, it's naming defaults to what you see there,

Servername/SIBnameService/SIBName. 

The reason for this is obvious: EJBs don't operate within the context of a web application and so cannot be addressed as such. You can customise the default name using the serviceName attribute on the @WebService annotation

Look at this from apache

Upvotes: 5

Related Questions