I am deploying my EJB 3.0 application on 3 servers for right now; JBoss, GlassFish and Oracle Application Server.
I have a simple Stateless Session Bean with the appropriate WebService annotations.
When I deploy my application to these 3 servers, each one has a different WSDL URL.
The name and serviceName are as specified in the @WebService annotation.
@WebService(name="HelloManager", serviceName = "HelloManagerService", targetNamespace = "urn:HelloManagerService")
There is however some consistency between JBoss and Oracle. They use the following notation:
soap:address location="http://hostname:portname/earfilename/name"
For e.g:
soap:address location="http://localhost:8080/ejb3webservices/HelloManager"
GlassFish on the other hand, uses the following notation:
soap:address location="http://hostname:portname/servicename/name"
For e.g:
soap:address location="http://localhost:8484/HelloManagerService/HelloManager"
I am trying to use SOAP UI to test my web services once they are deployed using Ant.
I didn't see any reference in the EJB 3.0 spec regarding the WSDL location. Is this vendor specific? Is there any place where we can customize the WSDL?
Also, I don't see any configurable attribute in the documentation for the @WebService annotation.
Tuesday, January 29, 2008
Subscribe to:
Post Comments (Atom)
Is there a way to change the hostname to use the actual IP instead of "localhost"?
ReplyDeleteSorry, no clue on that either.
ReplyDeleteThere is WebContext annotation for JBossWS.
ReplyDeleteI am not willing to add any annotations specific to an application server. I need my app to be portable across all these servers.
ReplyDeleteI have similar problem. Did you solve this?
ReplyDeleteSorry, haven't found any solution as yet.
ReplyDeleteThis is how you can change the webservice address location:
ReplyDeleteBindingProvider portBP = (BindingProvider) mpPort;
portBP.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "http://...");
Love,
Klaus
Any luck finding a solution for this yet?
ReplyDeleteThe BindingProvider option stated above is for the client afaik?
Sebas
It should be fixed in the latest version of the EJB spec.
ReplyDeleteHi, I have similar problem. Any solution?
ReplyDeleteThanks