[jboss-user] [JBossWS] - WSDL not autogenerating for WebServiceProvider

aazaroff do-not-reply at jboss.com
Mon Nov 26 15:29:29 EST 2007


I am trying to deploy a web service using the @WebServiceProvider annotation. I am trying to deploy a stateless session bean as a web service. My target platform is 4.0.5. The code is packaged in a simple jar file. Here is the code:


  | @Stateless
  | @Remote(PosDataServicesRemoteInterface.class)
  | @Local(PosDataServicesInterface.class)
  | @LocalBinding(jndiBinding = "/local/ejb3/PosDataServicesBean")
  | @RemoteBinding(jndiBinding = "/ejb3/PosDataServicesBean")
  | @WebServiceProvider
  | @ServiceMode(value = Service.Mode.MESSAGE)
  | public class PosDataServices implements PosDataServicesRemoteInterface, PosDataServicesInterface, Provider<SOAPMessage> {
  | 
  |     private java.util.Properties properties;
  |     private java.util.TreeSet dataSourceMap;
  |     private org.apache.log4j.Logger logger;
  |     
  |     /**
  |      * Creates a new instance of PosDataServices
  |      */
  |     public PosDataServices() {
  |         this.logger = org.apache.log4j.Logger.getLogger(this.getClass().getName());
  |     }
  |     
  |     public SOAPMessage invoke(SOAPMessage sourceDocument) {
  |         return sourceDocument;
  |     }
  |     
  | }
  | 


Here are the results

With the stock 1.0.3 sp1 stack there are no exceptions thrown and no service endpoints registered when using the http://localhost:8080/jbossws/services


I then upgraded to the 2.0.2 stack and I get the following error during deployment:
java.lang.IllegalStateException: Cannot obtain wsdl location for: {http://posdataservices.possystems/}PosDataServicesService


After startup is complete I get the obligatory incomplete deployment message:
--- Incompletely deployed packages ---
org.jboss.deployment.DeploymentInfo at 85514b6f { url=file:/usr/local/appserver/jboss/jboss-4.0.5.GA/server/default/deploy/ws.jar }
  deployer: MBeanProxyExt[jboss.ejb3:service=EJB3Deployer]
  status: Deployment FAILED reason: Cannot obtain wsdl location for: {http://posdataservices.possystems/}PosDataServicesService
  state: FAILED
  watch: file:/usr/local/appserver/jboss/jboss-4.0.5.GA/server/default/deploy/ws.jar
  altDD: null
  lastDeployed: 1196103088795
  lastModified: 1196103088000
  mbeans:
    jboss.j2ee:jar=ws.jar,name=PosDataServices,service=EJB3 state: Started


The odd thing is that using 2.0.2, the endpoint gets registered and I can see it in the list of deployed web services under http://localhost:8080/jbossws/services but when I click on the link for the WSDL it throws the same error as at deploy time and returns a message to the browser about an xml error (jaxb I think) that there is no root element.

According to the docs the WSDL should autogenerate for me. The examples I have researched in the case of a provider all have hard WSDL files that are not autogenerated and use the location attribute of the @WebServiceProvider annotation. If autogeneration is not the case for a provider I believe I am to put it in the META-INF directory, correct? Also should I be deploying this in a war instead of a jar? 

What am I missing?

One more thing to note. The EJB gets deployed in either case (1.0.3 and 2.0.2) and is available and usable as an EJB internally to applications in the container. I have not yet tested the remote interface for the EJB but I have no doubt it will probably work.

Thanks in advance

Andre

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

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



More information about the jboss-user mailing list