1 Reply Latest reply on Sep 8, 2007 9:28 AM by Alessio Soldano

    Deploying EJB Endpoint Web Services on Jboss-4.0.5.GA

    Martín Urtasun Newbie

      Hi,

      I'm in a very similar situacion than:

      http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060099#4060099

      My web services runs on jboss 4.0.3_SP1 without problems. Unfortunatly on jboss 4.0.5.GA it doesn't work. I guess there is a deploy problem:

      08:49:45,421 INFO [EARDeployer] Init J2EE application: file:/C:/Proyectos/Gauss/jboss-4.0.5.GA/jboss-4.0.5.GA/server/default/deploy/WsVmonEAR.ear/
      08:49:46,015 INFO [EjbModule] Deploying VideoServerEJB
      08:49:46,625 WARN [PortComponentMetaData] <wsdl-port> element in webservices.xml not namespace qualified: VideoServerServicePort
      08:49:47,281 ERROR [MainDeployer] Could not create deployment: file:/C:/Proyectos/Gauss/jboss-4.0.5.GA/jboss-4.0.5.GA/server/default/deploy/WsVmonEAR.ear/WsVmon.jar/
      java.lang.NoSuchMethodError: com.ibm.wsdl.xml.WSDLReaderImpl.setEntityResolver(Lorg/xml/sax/EntityResolver;)V
      at org.jboss.ws.metadata.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:142)
      at org.jboss.ws.metadata.ServiceMetaData.getWsdlDefinitions(ServiceMetaData.java:273)
      at org.jboss.ws.deployment.JSR109ServerMetaDataBuilder.buildMetaData(JSR109ServerMetaDataBuilder.java:94)
      at org.jboss.ws.deployment.ServiceEndpointDeployer.create(ServiceEndpointDeployer.java:85)

      The wsdl and mapping files were generated by the SUN's JWSDP (http://java.sun.com/webservices/downloads/previous/index.jsp)



      This is the service endpoint

      package com.gauss.vmon.ws.endpoint;
      
      import java.rmi.Remote;
      import java.rmi.RemoteException;
      
      import com.gauss.vmon.ws.data.CameraData;
      import com.gauss.vmon.ws.data.Credential;
      
      public interface VideoServerService extends Remote {
      
      
       /**
       * @param vsfId
       * @return
       */
       public CameraData getCameraData(String vsfId) throws RemoteException;
      
       /**
       * @param vsfId
       * @return
       */
       public Credential getCredential(String vsfId) throws RemoteException;;
      
      }


      The JWSDP's config.xml file
      <?xml version="1.0" encoding="UTF-8"?>
      <configuration xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
       <service name="VideoServerService"
       targetNamespace="http://ws.vmon.gauss.com"
       typeNamespace="http://ws.vmon.gauss.com/types"
       packageName="com.gauss.vmon.ws">
       <interface name="com.gauss.vmon.ws.endpoint.VideoServerService"/>
       </service>
      </configuration>


      My webservices.xml:
      <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_web_services_1_1.xsd"
       version="1.1">
       <webservice-description>
       <webservice-description-name>
       VideoServerService
       </webservice-description-name>
       <wsdl-file>META-INF/wsdl/VideoServerService.wsdl</wsdl-file>
       <jaxrpc-mapping-file>META-INF/mapping.xml</jaxrpc-mapping-file>
       <port-component>
       <port-component-name>VideoServerService</port-component-name>
       <wsdl-port>VideoServerServicePort</wsdl-port>
       <service-endpoint-interface>
       com.gauss.vmon.ws.endpoint.VideoServerService
       </service-endpoint-interface>
       <service-impl-bean>
       <ejb-link>VideoServerEJB</ejb-link>
       </service-impl-bean>
       </port-component>
       </webservice-description>
      </webservices>
      


      And the wsdl and mapping files:

      wsdl
      <?xml version="1.0" encoding="UTF-8"?>
      
      <definitions name="VideoServerService" targetNamespace="http://ws.vmon.gauss.com" xmlns:tns="http://ws.vmon.gauss.com" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns2="http://ws.vmon.gauss.com/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
       <types>
       <schema targetNamespace="http://ws.vmon.gauss.com/types" xmlns:tns="http://ws.vmon.gauss.com/types" 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="CameraData">
       <sequence>
       <element name="apiCode" type="string" nillable="true"/>
       <element name="channel" type="int"/>
       <element name="ip" type="string" nillable="true"/>
       <element name="password" type="string" nillable="true"/>
       <element name="port" type="int"/>
       <element name="status" type="int"/>
       <element name="statusDescription" type="string" nillable="true"/>
       <element name="username" type="string" nillable="true"/>
       <element name="vsfId" type="string" nillable="true"/></sequence></complexType>
       <complexType name="Credential">
       <sequence>
       <element name="password" type="string" nillable="true"/>
       <element name="status" type="int"/>
       <element name="statusDescription" type="string" nillable="true"/>
       <element name="username" type="string" nillable="true"/></sequence></complexType></schema></types>
       <message name="VideoServerService_getCameraData">
       <part name="vsfId" type="xsd:string"/></message>
       <message name="VideoServerService_getCameraDataResponse">
       <part name="result" type="ns2:CameraData"/></message>
       <message name="VideoServerService_getCredential">
       <part name="vsfId" type="xsd:string"/></message>
       <message name="VideoServerService_getCredentialResponse">
       <part name="result" type="ns2:Credential"/></message>
       <portType name="VideoServerService">
       <operation name="getCameraData" parameterOrder="vsfId">
       <input message="tns:VideoServerService_getCameraData"/>
       <output message="tns:VideoServerService_getCameraDataResponse"/></operation>
       <operation name="getCredential" parameterOrder="vsfId">
       <input message="tns:VideoServerService_getCredential"/>
       <output message="tns:VideoServerService_getCredentialResponse"/></operation></portType>
       <binding name="VideoServerServiceBinding" type="tns:VideoServerService">
       <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>
       <operation name="getCameraData">
       <soap:operation soapAction=""/>
       <input>
       <soap:body use="literal" namespace="http://ws.vmon.gauss.com"/></input>
       <output>
       <soap:body use="literal" namespace="http://ws.vmon.gauss.com"/></output></operation>
       <operation name="getCredential">
       <soap:operation soapAction=""/>
       <input>
       <soap:body use="literal" namespace="http://ws.vmon.gauss.com"/></input>
       <output>
       <soap:body use="literal" namespace="http://ws.vmon.gauss.com"/></output></operation></binding>
       <service name="VideoServerService">
       <port name="VideoServerServicePort" binding="tns:VideoServerServiceBinding">
       <soap:address location="REPLACE_WITH_ACTUAL_URL"/></port></service></definitions>
      


      mapping.xml
      <?xml version="1.0" encoding="UTF-8"?>
      <java-wsdl-mapping xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd">
       <package-mapping>
       <package-type>com.gauss.vmon.ws</package-type>
       <namespaceURI>http://ws.vmon.gauss.com/types</namespaceURI>
       </package-mapping>
       <package-mapping>
       <package-type>com.gauss.vmon.ws</package-type>
       <namespaceURI>http://ws.vmon.gauss.com</namespaceURI>
       </package-mapping>
       <java-xml-type-mapping>
       <java-type>com.gauss.vmon.ws.data.CameraData</java-type>
       <root-type-qname xmlns:typeNS="http://ws.vmon.gauss.com/types">typeNS:CameraData</root-type-qname>
       <qname-scope>complexType</qname-scope>
       <variable-mapping>
       <java-variable-name>apiCode</java-variable-name>
       <xml-element-name>apiCode</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>channel</java-variable-name>
       <xml-element-name>channel</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>ip</java-variable-name>
       <xml-element-name>ip</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>password</java-variable-name>
       <xml-element-name>password</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>port</java-variable-name>
       <xml-element-name>port</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>status</java-variable-name>
       <xml-element-name>status</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>statusDescription</java-variable-name>
       <xml-element-name>statusDescription</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>username</java-variable-name>
       <xml-element-name>username</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>vsfId</java-variable-name>
       <xml-element-name>vsfId</xml-element-name>
       </variable-mapping>
       </java-xml-type-mapping>
       <java-xml-type-mapping>
       <java-type>com.gauss.vmon.ws.data.Credential</java-type>
       <root-type-qname xmlns:typeNS="http://ws.vmon.gauss.com/types">typeNS:Credential</root-type-qname>
       <qname-scope>complexType</qname-scope>
       <variable-mapping>
       <java-variable-name>password</java-variable-name>
       <xml-element-name>password</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>status</java-variable-name>
       <xml-element-name>status</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>statusDescription</java-variable-name>
       <xml-element-name>statusDescription</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>username</java-variable-name>
       <xml-element-name>username</xml-element-name>
       </variable-mapping>
       </java-xml-type-mapping>
       <service-interface-mapping>
       <service-interface>com.gauss.vmon.ws.VideoServerService</service-interface>
       <wsdl-service-name xmlns:serviceNS="http://ws.vmon.gauss.com">serviceNS:VideoServerService</wsdl-service-name>
       <port-mapping>
       <port-name>VideoServerServicePort</port-name>
       <java-port-name>VideoServerServicePort</java-port-name>
       </port-mapping>
       </service-interface-mapping>
       <service-endpoint-interface-mapping>
       <service-endpoint-interface>com.gauss.vmon.ws.endpoint.VideoServerService</service-endpoint-interface>
       <wsdl-port-type xmlns:portTypeNS="http://ws.vmon.gauss.com">portTypeNS:VideoServerService</wsdl-port-type>
       <wsdl-binding xmlns:bindingNS="http://ws.vmon.gauss.com">bindingNS:VideoServerServiceBinding</wsdl-binding>
       <service-endpoint-method-mapping>
       <java-method-name>getCameraData</java-method-name>
       <wsdl-operation>getCameraData</wsdl-operation>
       <method-param-parts-mapping>
       <param-position>0</param-position>
       <param-type>java.lang.String</param-type>
       <wsdl-message-mapping>
       <wsdl-message xmlns:wsdlMsgNS="http://ws.vmon.gauss.com">wsdlMsgNS:VideoServerService_getCameraData</wsdl-message>
       <wsdl-message-part-name>vsfId</wsdl-message-part-name>
       <parameter-mode>IN</parameter-mode>
       </wsdl-message-mapping>
       </method-param-parts-mapping>
       <wsdl-return-value-mapping>
       <method-return-value>com.gauss.vmon.ws.data.CameraData</method-return-value>
       <wsdl-message xmlns:wsdlMsgNS="http://ws.vmon.gauss.com">wsdlMsgNS:VideoServerService_getCameraDataResponse</wsdl-message>
       <wsdl-message-part-name>result</wsdl-message-part-name>
       </wsdl-return-value-mapping>
       </service-endpoint-method-mapping>
       <service-endpoint-method-mapping>
       <java-method-name>getCredential</java-method-name>
       <wsdl-operation>getCredential</wsdl-operation>
       <method-param-parts-mapping>
       <param-position>0</param-position>
       <param-type>java.lang.String</param-type>
       <wsdl-message-mapping>
       <wsdl-message xmlns:wsdlMsgNS="http://ws.vmon.gauss.com">wsdlMsgNS:VideoServerService_getCredential</wsdl-message>
       <wsdl-message-part-name>vsfId</wsdl-message-part-name>
       <parameter-mode>IN</parameter-mode>
       </wsdl-message-mapping>
       </method-param-parts-mapping>
       <wsdl-return-value-mapping>
       <method-return-value>com.gauss.vmon.ws.data.Credential</method-return-value>
       <wsdl-message xmlns:wsdlMsgNS="http://ws.vmon.gauss.com">wsdlMsgNS:VideoServerService_getCredentialResponse</wsdl-message>
       <wsdl-message-part-name>result</wsdl-message-part-name>
       </wsdl-return-value-mapping>
       </service-endpoint-method-mapping>
       </service-endpoint-interface-mapping>
      </java-wsdl-mapping>
      


      Thanks for your help
      Martín