• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJB 3.0 WebService, How to change context

 
Ali Gohar
Ranch Hand
Posts: 572
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I've created an EJB 3.0 Web Service and deployed in Jboss 4.2.2. My ejb jar file is packaged inside an ear file. There are two problems now

1- i've tried to use the @SoapBinding annotation to make my webserice use RPC/Encoded style like this:


but it doesn't work, it still creates wsdl file with Document/literal.

2- Secondly how can i change the soap address of my webservice? Currently the soap address, jboss creates is http://localhost:8080/my-ear-file/ejb-jar-file/SessionBeanName?wsdl. I want it to be change something like http://localhost:8080/myWebSerivce/myName?wsdl. Is it possible?

Thanks
 
Bill Shirley
Ranch Hand
Posts: 457
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Ali Gohar
Ranch Hand
Posts: 572
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using Jboss-4.2.2, and it seems that @WebContext is not available for it anymore.

Any other idea?

Thanks
 
Bill Shirley
Ranch Hand
Posts: 457
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have 4.2.1.GA

There is no mention of the @WebContext in the 4.2.2 Release Notes

It's hard to believe they'd do that in a dot release.

Do you have the JBoss client library in your path? (I had to add it as a library in Eclipse) It's in ~JBOSS/client/jbossws-client.jar

Another reference:
http://labs.jboss.com/jbossws/docs/jaxws_userguide-2.0/index.html#d0e1785
[ January 29, 2008: Message edited by: Bill Shirley ]
 
Ali Gohar
Ranch Hand
Posts: 572
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no mention of the @WebContext in the 4.2.2 Release Notes


Yes, it seems that it is no more in 4.2.2 release

Do you have the JBoss client library in your path? (I had to add it as a library in Eclipse) It's in ~JBOSS/client/jbossws-client.jar


Yes, i've that in classpath.

They should have provided some other way to set the context thing if they have removed @WebContext.
 
Bill Shirley
Ranch Hand
Posts: 457
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From 4.2.2 release notes:

According to our product versioning rules, JBossAS 4.2.2 should be fully compatible with previous JBossAS 4.2.x releases. However you may want to check the release notes of the individual JBoss and Thirdparty libraries updated with this release. Some related issues that you should be aware of are listed below:
* JBossWS 1.2.1 supported JAX-WS only as a technology preview while JBossWS 2.0.1 used in AS 4.2.2 provides full JAX-WS support. If you have used in your code the annotation org.jboss.ws.annotation.WebContext this must be replaced by org.jboss.wsf.spi.annotation.WebContext.
 
Ali Gohar
Ranch Hand
Posts: 572
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Great!!

Thanks for your help
 
Ali Gohar
Ranch Hand
Posts: 572
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any Idea about the first problem? @SoapBinding annotation is not working for jboss-4.2.2.

I am trying to generate the WSDL as RPC/ENCODED but even specifying that in soapbinding it is still generating the wsdl as document/literal.

Any idea?

Thanks
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic