[JBossWS] - Problem Converting EJB2.1 to Web Services
by mendaye
We have existing Session EJB and trying to convert it to Web Services. I have created all the WS artifact using ant task and also modify ejb-jar.xml to include the service point. However, when I deploy as part of an ear file I am getting the following errors. We are using JBOSS 4.0.4. Based on JBOSS documenetaion, I don't need to include any exteranal jar for we services support. Our ear deployed on a different directory "pvng" but we copy all the files, and dir from default. As shown below in the server log
commons-discovery.jar, saaj.jar, wsdl4j.jar, commons-logging.jar, jaxrpc.jar? Do I need to get all this JARs?
I am not sure what is going on here? Do I need to include all jars into a lib directory inside ear file?
Help... Pls look the error message I got in server log below.
2007-08-30 15:41:31,592 DEBUG [org.jboss.deployment.MainDeployer] The manifest entry in file:/C:/DEV/JBoss/jboss-4.0.4.GA/server/pvng/tmp/deploy/tmp30558pvng.ear-contents/de.danet.an.wfcore-ejbs.jar references URL file:/C:/DEV/JBoss/jboss-4.0.4.GA/server/pvng/tmp/deploy/tmp30558pvng.ear-contents/lib/commons-discovery.jar which could not be opened, entry ignored
org.jboss.deployment.DeploymentException: url file:/C:/DEV/JBoss/jboss-4.0.4.GA/server/pvng/tmp/deploy/tmp30558pvng.ear-contents/lib/commons-discovery.jar could not be opened, does it exist?
at org.jboss.deployment.DeploymentInfo.(DeploymentInfo.java:211)
at org.jboss.deployment.MainDeployer.parseManifestLibraries(MainDeployer.java:1119)
at org.jboss.deployment.MainDeployer.init(MainDeployer.java:873)
at org.jboss.deployment.MainDeployer.init(MainDeployer.java:881)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:798)
2007-08-30 15:41:31,592 DEBUG [org.jboss.deployment.MainDeployer] new manifest entry for sdi at de.danet.an.wfcore-ejbs.jar entry is lib/saaj.jar
2007-08-30 15:41:31,592 DEBUG [org.jboss.deployment.MainDeployer] The manifest entry in file:/C:/DEV/JBoss/jboss-4.0.4.GA/server/pvng/tmp/deploy/tmp30558pvng.ear-contents/de.danet.an.wfcore-ejbs.jar references URL file:/C:/DEV/JBoss/jboss-4.0.4.GA/server/pvng/tmp/deploy/tmp30558pvng.ear-contents/lib/saaj.jar which could not be opened, entry ignored
org.jboss.deployment.DeploymentException: url file:/C:/DEV/JBoss/jboss-4.0.4.GA/server/pvng/tmp/deploy/tmp30558pvng.ear-contents/lib/saaj.jar could not be opened, does it exist?
at org.jboss.deployment.DeploymentInfo.(DeploymentInfo.java:211)
at org.jboss.deployment.MainDeployer.parseManifestLibraries(MainDeployer.java:1119)
at org.jboss.deployment.MainDeployer.init(MainDeployer.java:873)
at org.jboss.deployment.MainDeployer.init(MainDeployer.java:881)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:798)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2007-08-30 15:41:31,592 DEBUG [org.jboss.deployment.MainDeployer] The manifest entry in file:/C:/DEV/JBoss/jboss-4.0.4.GA/server/pvng/tmp/deploy/tmp30558pvng.ear-contents/de.danet.an.wfcore-ejbs.jar references URL file:/C:/DEV/JBoss/jboss-4.0.4.GA/server/pvng/tmp/deploy/tmp30558pvng.ear-contents/lib/wsdl4j.jar which could not be opened, entry ignored
org.jboss.deployment.DeploymentException: url file:/C:/DEV/JBoss/jboss-4.0.4.GA/server/pvng/tmp/deploy/tmp30558pvng.ear-contents/lib/wsdl4j.jar could not be opened, does it exist?
at org.jboss.deployment.DeploymentInfo.(DeploymentInfo.java:211)
at org.jboss.deployment.MainDeployer.parseManifestLibraries(MainDeployer.java:1119)
at org.jboss.deployment.MainDeployer.init(MainDeployer.java:873)
at org.jboss.deployment.MainDeployer.init(MainDeployer.java:881)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:798)
2007-08-30 15:41:31,592 DEBUG [org.jboss.deployment.MainDeployer] new manifest entry for sdi at de.danet.an.wfcore-ejbs.jar entry is lib/commons-logging.jar
2007-08-30 15:41:31,592 DEBUG [org.jboss.deployment.MainDeployer] The manifest entry in file:/C:/DEV/JBoss/jboss-4.0.4.GA/server/pvng/tmp/deploy/tmp30558pvng.ear-contents/de.danet.an.wfcore-ejbs.jar references URL file:/C:/DEV/JBoss/jboss-4.0.4.GA/server/pvng/tmp/deploy/tmp30558pvng.ear-contents/lib/commons-logging.jar which could not be opened, entry ignored
org.jboss.deployment.DeploymentException: url file:/C:/DEV/JBoss/jboss-4.0.4.GA/server/pvng/tmp/deploy/tmp30558pvng.ear-contents/lib/commons-logging.jar could not be opened, does it exist?
at org.jboss.deployment.DeploymentInfo.(DeploymentInfo.java:211)
2007-08-30 15:41:31,592 DEBUG [org.jboss.deployment.MainDeployer] new manifest entry for sdi at de.danet.an.wfcore-ejbs.jar entry is lib/jaxrpc.jar
2007-08-30 15:41:31,592 DEBUG [org.jboss.deployment.MainDeployer] The manifest entry in file:/C:/DEV/JBoss/jboss-4.0.4.GA/server/pvng/tmp/deploy/tmp30558pvng.ear-contents/de.danet.an.wfcore-ejbs.jar references URL file:/C:/DEV/JBoss/jboss-4.0.4.GA/server/pvng/tmp/deploy/tmp30558pvng.ear-contents/lib/jaxrpc.jar which could not be opened, entry ignored
org.jboss.deployment.DeploymentException: url file:/C:/DEV/JBoss/jboss-4.0.4.GA/server/pvng/tmp/deploy/tmp30558pvng.ear-contents/lib/jaxrpc.jar could not be opened, does it exist?
at org.jboss.deployment.DeploymentInfo.(DeploymentInfo.java:211)
at org.jboss.deployment.MainDeployer.parseManifestLibraries(MainDeployer.java:1119)
at org.jboss.deployment.MainDeployer.init(MainDeployer.java:873)
at org.jboss.deployment.MainDeployer.init(MainDeployer.java:881)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4079794#4079794
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4079794
17 years, 3 months
[JBossWS] - Deploying EJB Endpoint Web Services on Jboss-4.0.5.GA
by letincho5
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
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4079585#4079585
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4079585
17 years, 3 months
[JBossWS] - Problem with publishing a web service
by AnisBM
Hi all,
I have this message when I try to publish a class as a web service :
Running JBossWS wstools for [jbossws-test1]
directory: C:\FitNetManager\workspaces\workspaceFitNet\jbossws-test1
command: cmd.exe /C C:\FitNetManager\Jboss-4.0.5.GA\bin\wstools.bat -cp bin -config C:\DOCUME~1\Anis\LOCALS~1\Temp\wstools-config55960.xml -dest C:\FitNetManager\workspaces\workspaceFitNet\jbossws-test1\src\java
========================================================================="
.
WSTools Environment
.
JBOSS_HOME: C:\FitNetManager\Jboss-4.0.5.GA\bin\\..
.
JAVA: C:\Program Files\Java\jdk1.5.0_05\bin\java
.
JAVA_OPTS:
.
========================================================================="
.
Exception in thread "main" java.lang.NoClassDefFoundError: javax/jws/soap/SOAPBinding$ParameterStyle
at org.jboss.ws.tools.helpers.ToolsHelper.handleJavaToWSDLGeneration(ToolsHelper.java:106)
at org.jboss.ws.tools.WSTools.process(WSTools.java:133)
at org.jboss.ws.tools.WSTools.generate(WSTools.java:69)
at org.jboss.ws.tools.WSTools.generate(WSTools.java:119)
at org.jboss.ws.tools.WSTools.main(WSTools.java:58)
I don't understand what is the matter. I'm working on Eclipse 3.2 with JBoss 4.0.5GA, JBossWS 1.2.0SP1, jdk 1.5.
Could someone help me ???
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4079482#4079482
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4079482
17 years, 3 months
[JBossWS] - Re: jbossws with apache
by palin
"gerry744" wrote : I'm using Jboss behind apache.
| '/jbossws/services' works fine, the wsdls's work fine, but the actual services don't work. They do work if I connect directly on port 8080, but not through apache. Everything else is working fine through apache.
| If I try connecting a browser to the actual service via apache, instead of seeing the service I just get "http GET not supported".
|
| Anyone know what I'm doing wrong ?
|
| I'm using jboss 4.2.1, jbossws 2.0.1, apache2 on another machine, jk 1.2, all on gentoo.
|
| Thanks!
I would check what url apache is actually trying to connect to; I mean, it's ok that you get a "http GET not supported" if you access an endpoint using your browser. As a matter of fact, endpoints support POST, GET is supposed to work only for wsdl retrieval calls.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4079450#4079450
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4079450
17 years, 3 months