12 Replies Latest reply on Mar 23, 2006 2:07 PM by Jose Manuel Gomez

    FiboBean (as per Eclipse-IDE Documentation) as a webservice

    for Jbpm Novice

      Hi all,

      I created a statless session bean as per example in Eclipse-IDE documentation. I want to use it as a webservice.
      For that I made changes in ejb-jar.xml as :


      <session >
      <description>[CDATA[Description for Fibo]]</description>
      <display-name>Name for Fibo</display-name>
      <ejb-name>Fibo</ejb-name>
      <service-endpoint>jbpm.interfaces.Fibo</service-endpoint>
      <ejb-class>jbpm.ejb.FiboBean</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Container</transaction-type>
      </session>

      My FiboService.wsdl looks like

      
      <?xml version="1.0" encoding="UTF-8"?>
      
      <definitions name="FiboService" targetNamespace="http://Fibo.ejb.jbpm/" xmlns:tns="http://Fibo.ejb.jbpm/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns2="http://Fibo.ejb.jbpm/types/arrays/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
       <types>
       <schema targetNamespace="http://Fibo.ejb.jbpm/types/arrays/" xmlns:tns="http://Fibo.ejb.jbpm/types/arrays/" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://www.w3.org/2001/XMLSchema">
       <complexType name="doubleArray">
       <sequence>
       <element name="value" type="double" minOccurs="0" maxOccurs="unbounded"/></sequence></complexType></schema></types>
       <message name="Fibo_compute">
       <part name="int_1" type="xsd:int"/></message>
       <message name="Fibo_computeResponse">
       <part name="result" type="ns2:doubleArray"/></message>
       <portType name="Fibo">
       <operation name="compute" parameterOrder="int_1">
       <input message="tns:Fibo_compute"/>
       <output message="tns:Fibo_computeResponse"/></operation></portType>
       <binding name="FiboBinding" type="tns:Fibo">
       <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>
       <operation name="compute">
       <soap:operation soapAction=""/>
       <input>
       <soap:body use="literal" namespace="http://Fibo.ejb.jbpm/"/></input>
       <output>
       <soap:body use="literal" namespace="http://Fibo.ejb.jbpm/"/></output></operation></binding>
       <service name="FiboService">
       <port name="FiboPort" binding="tns:FiboBinding">
       <soap:address location="REPLACE_WITH_ACTUAL_URL"/></port></service></definitions>
      



      and my webservice.xml is :
      <?xml version="1.0" encoding="UTF-8"?>
      <webservices xmlns="http://java.sun.com/xml/ns/j2ee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_webservice_1.1.xsd">
      <webservice-description>
      <webservice-description-name>FiboService</webservice-description-name>
      <wsdl-file>META-INF/wsdl/FiboService.wsdl</wsdl-file>
      <jaxrpc-mapping-file>META-INF/mapping.xml</jaxrpc-mapping-file>
      <port-component>
      <port-component-name>FiboPort</port-component-name>
      <wsdl-port>ns:FiboPort</wsdl-port>
      <service-endpoint-interface>jbpm.interfaces.Fibo</service-endpoint-interface>
      <service-impl-bean>
      <ejb-link>Fibo</ejb-link>
      </service-impl-bean>
      </port-component>
      </webservice-description>
      </webservices>

      But Whenever I tried to deploy it (as a webservice) I get error as


      16:24:18,825 ERROR [ServiceDeployer] Cannot startup webservice for: FiboWeb.war
      org.jboss.deployment.DeploymentException: Cannot find servlet-link in port-component:FiboPort
      at org.jboss.webservice.ServiceDeployerJSE.modifyWebXMLDocument(ServiceDeployerJSE.java:187)
      at org.jboss.webservice.ServiceDeployerJSE.modifyWebXML(ServiceDeployerJSE.java:125)
      at org.jboss.webservice.ServiceDeployerJSE.createWebservice(ServiceDeployerJSE.java:98)
      at org.jboss.webservice.ServiceDeployer.handleNotification(ServiceDeployer.java:108)
      at sun.reflect.GeneratedMethodAccessor80.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.notification.NotificationListenerProxy.invoke(NotificationListenerProxy.java:138)
      at $Proxy32.handleNotification(Unknown Source)
      at org.jboss.mx.util.JBossNotificationBroadcasterSupport.handleNotification(JBossNotificationBroadcasterSupport.java:112)
      at org.jboss.mx.util.JBossNotificationBroadcasterSupport.sendNotification(JBossNotificationBroadcasterSupport.java:95)
      at org.jboss.deployment.SubDeployerSupport.emitNotification(SubDeployerSupport.java:325)
      at org.jboss.deployment.SubDeployerSupport.create(SubDeployerSupport.java:282)
      at org.jboss.web.AbstractWebContainer.create(AbstractWebContainer.java:381)
      at sun.reflect.GeneratedMethodAccessor108.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
      at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:80)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy30.create(Unknown Source)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:935)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:925)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:789)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
      at sun.reflect.GeneratedMethodAccessor47.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy9.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:319)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:507)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:192)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:203)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:182)
      16:24:18,830 WARN [ServiceDeployer] Cannot undeploy webservice: java.lang.IllegalStateException: Cannot find port component info for: FiboApp.ear/FiboWeb.war#FiboService/FiboPort
      16:24:18,976 INFO [EJBDeployer] Deployed: file:/home/JbossJbpm/jboss-4.0.3/server/jbpm/tmp/deploy/tmp30476FiboApp.ear-contents/FiboEJB.jar
      16:24:19,239 WARN [ServiceController] Ignoring request to start null service:
      java.lang.Exception: STACKTRACE
      at org.jboss.system.ServiceController.start(ServiceController.java:376)
      at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy29.start(Unknown Source)
      at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:400)
      at sun.reflect.GeneratedMethodAccessor109.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
      at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:80)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy30.start(Unknown Source)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:989)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:979)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:790)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
      at sun.reflect.GeneratedMethodAccessor47.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy9.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:319)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:507)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:192)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:203)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:182)


      can anyone tell me What should I do differently?
      I am really very new to whole concept!
      Any help in this regard is highly appreciated!
      Thanks!