I figured it out - I needed to add a dependency to geronimo-axis in my geronimo-web.xml deployment plan:
<dep:dependency>
<dep:groupId>geronimo</dep:groupId>
<dep:artifactId>geronimo-axis</dep:artifactId>
<dep:version>1.1.1</dep:version>
<dep:type>jar</dep:type>
</dep:dependency>
Jeff Rhodes
Internet Software Architecture Group
x62637
[EMAIL PROTECTED] wrote on 10/03/2006 07:56:22 AM:
>
> I'm having trouble deploying a simple JSR-109 "Hello World" web
> service. Hopefully, someone can point out what I'm doing wrong.
> I generated the wsdl and jaxrpc-mapping files using the J2EE 1.4
> wscompile tool. My WAR is in standard format, with the web.xml,
> geronimo-web.xml, and webservices.xml file residing in the WEB-INF
> directory. The wsdl is in the WEB-INF/wsdl directory.
>
> Below is the source for the Web service interface and endpoint:
>
> WSHello.java:
> ---------------------
> package com.dstsystems.to.geronimows;
>
> import java.rmi.Remote;
> import java.rmi.RemoteException;
>
> public interface WSHello extends Remote
> {
> public String sayHello(String to, String from) throws RemoteException;
> }
>
> WSHelloEndpoint.java:
> ----------------------------------
> package com.dstsystems.to.geronimows;
>
> public class WSHelloEndpoint implements WSHello
> {
>
> public String sayHello(String to, String from)
> {
> return "Dear " + to + ": " + from + " says HELLO!!";
> }
>
> }
>
>
> Below are the contents of my config files:
>
> web.xml:
> -------------
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app 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://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd
> " version="2.4">
> <!-- WebService Endpoints are declared as servlets -->
> <servlet>
> <servlet-name>WSHelloService</servlet-name>
> <servlet-class>com.dstsystems.to.geronimows.
> WSHelloEndpoint</servlet-class>
> </servlet>
> <servlet-mapping>
> <servlet-name>WSHelloService</servlet-name>
> <url-pattern>/*</url-pattern>
> </servlet-mapping>
>
> </web-app>
>
> geronimo-web.xml (I've also tried it without the geronimo-
> webservices dependency):
> -----------------------------
> <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1" xmlns:naming="
> http://geronimo.apache.org/xml/ns/naming-1.1">
>
> <dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1
> ">
> <dep:moduleId>
> <dep:groupId>ECommApps</dep:groupId>
> <dep:artifactId>WSHello</dep:artifactId>
> <dep:version>1.0</dep:version>
> <dep:type>war</dep:type>
> </dep:moduleId>
> <dep:dependencies>
> <dep:dependency>
> <dep:groupId>geronimo</dep:groupId>
> <dep:artifactId>geronimo-
> webservices</dep:artifactId>
> <dep:version>1.1.1</dep:version>
> <dep:type>jar</dep:type>
> </dep:dependency>
> </dep:dependencies>
> <dep:hidden-classes/>
> <dep:non-overridable-classes/>
> </dep:environment>
>
> <context-root>/tf/WSHello</context-root>
>
> </web-app>
>
> webservices.xml:
> -------------------------
> <webservices xmlns="http://java.sun.com/xml/ns/j2ee" version="1.1">
>
> <webservice-description>
>
> <webservice-description-name>WSHelloService</webservice-description-name>
> <wsdl-file>WEB-INF/wsdl/WSHelloService.wsdl</wsdl-file>
> <jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
> <port-component>
> <port-component-name>WSHelloPort</port-component-name>
> <wsdl-port>WSHelloPort</wsdl-port>
> <service-endpoint-interface>com.dstsystems.to.geronimows.
> WSHello</service-endpoint-interface>
> <service-impl-bean>
> <servlet-link>WSHelloService</servlet-link>
> </service-impl-bean>
> </port-component>
>
> </webservice-description>
>
> </webservices>
>
> jaxrpc-mapping:
> ------------------------
> <?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.dstsystems.to.geronimows</package-type>
> <namespaceURI>http://dstsystems.
> com/to/geronimows/wshello/types</namespaceURI>
> </package-mapping>
> <package-mapping>
> <package-type>com.dstsystems.to.geronimows</package-type>
> <namespaceURI>http://dstsystems.
> com/to/geronimows/wshello</namespaceURI>
> </package-mapping>
> <service-interface-mapping>
> <service-interface>com.dstsystems.to.geronimows.
> WSHelloService</service-interface>
> <wsdl-service-name xmlns:serviceNS="http://dstsystems.
> com/to/geronimows/wshello">serviceNS:WSHelloService</wsdl-service-name>
> <port-mapping>
> <port-name>WSHelloPort</port-name>
> <java-port-name>WSHelloPort</java-port-name>
> </port-mapping>
> </service-interface-mapping>
> <service-endpoint-interface-mapping>
> <service-endpoint-interface>com.dstsystems.to.geronimows.
> WSHello</service-endpoint-interface>
> <wsdl-port-type xmlns:portTypeNS="http://dstsystems.
> com/to/geronimows/wshello">portTypeNS:WSHello</wsdl-port-type>
> <wsdl-binding xmlns:bindingNS="http://dstsystems.
> com/to/geronimows/wshello">bindingNS:WSHelloBinding</wsdl-binding>
> <service-endpoint-method-mapping>
> <java-method-name>sayHello</java-method-name>
> <wsdl-operation>sayHello</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://dstsystems.
> com/to/geronimows/wshello">wsdlMsgNS:WSHello_sayHello</wsdl-message>
> <wsdl-message-part-name>String_1</wsdl-message-part-name>
> <parameter-mode>IN</parameter-mode>
> </wsdl-message-mapping>
> </method-param-parts-mapping>
> <method-param-parts-mapping>
> <param-position>1</param-position>
> <param-type>java.lang.String</param-type>
> <wsdl-message-mapping>
> <wsdl-message xmlns:wsdlMsgNS="http:
> //dstsystems.com/to/geronimows/wshello">wsdlMsgNS:
> WSHello_sayHello</wsdl-message>
> <wsdl-message-part-name>String_2</wsdl-message-part-name>
> <parameter-mode>IN</parameter-mode>
> </wsdl-message-mapping>
> </method-param-parts-mapping>
> <wsdl-return-value-mapping>
> <method-return-value>java.lang.String</method-return-value>
> <wsdl-message xmlns:wsdlMsgNS="http://dstsystems.
> com/to/geronimows/wshello">wsdlMsgNS:WSHello_sayHelloResponse</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>
>
> WSDL:
> -----------
> <?xml version="1.0" encoding="UTF-8"?>
>
> <definitions targetNamespace="http://dstsystems.com/to/geronimows/wshello"
> xmlns:tns="http://dstsystems.com/to/geronimows/wshello"
> xmlns="http://schemas.xmlsoap.org/wsdl/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
>
> <types/>
>
> <message name="WSHello_sayHello">
> <part name="String_1" type="xsd:string"/>
> <part name="String_2" type="xsd:string"/>
> </message>
>
> <message name="WSHello_sayHelloResponse">
> <part name="result" type="xsd:string"/>
> </message>
>
> <portType name="WSHello">
> <operation name="sayHello" parameterOrder="String_1 String_2">
> <input message="tns:WSHello_sayHello"/>
> <output message="tns:WSHello_sayHelloResponse"/>
> </operation>
> </portType>
>
> <binding name="WSHelloBinding" type="tns:WSHello">
> <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
> style="rpc"/>
> <operation name="sayHello">
> <soap:operation soapAction=""/>
> <input>
> <soap:body use="literal" namespace="http://dstsystems.
> com/to/geronimows/wshello"/></input>
> <output>
> <soap:body use="literal" namespace="http://dstsystems.
> com/to/geronimows/wshello"/>
> </output>
> </operation>
> </binding>
>
> <service name="WSHelloService">
> <port name="WSHelloPort" binding="tns:WSHelloBinding">
> <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
> </port>
> </service>
>
> </definitions>
>
>
> Whenever I attempt to deploy this Web service I get the following
> error from Geronimo:
> ...
> Retrieving document at 'WEB-INF/wsdl/WSHelloService.wsdl'.
> 06:52:27,761 ERROR [GBeanInstanceState] Error while starting; GBean
> is now in the FAILED state: abstractName="ECommApps/WSHello/1.0/war?
> configurationName=ECommApps/WSHello/1.0/war"
> org.apache.geronimo.kernel.config.InvalidConfigException: Unable to
> deserialize GBeanState
> at org.apache.geronimo.kernel.config.SerializedGBeanState.
> loadGBeans(SerializedGBeanState.java:120)
> at org.apache.geronimo.kernel.config.SerializedGBeanState.
> getGBeans(SerializedGBeanState.java:65)
> at org.apache.geronimo.kernel.config.ConfigurationData.
> getGBeans(ConfigurationData.java:171)
> at org.apache.geronimo.kernel.config.Configuration.
> <init>(Configuration.java:277)
> at sun.reflect.NativeConstructorAccessorImpl.
> newInstance0(Native Method)
> at sun.reflect.NativeConstructorAccessorImpl.
> newInstance(NativeConstructorAccessorImpl.java:39)
> at sun.reflect.DelegatingConstructorAccessorImpl.
> newInstance(DelegatingConstructorAccessorImpl.java:27)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
> at org.apache.geronimo.gbean.runtime.GBeanInstance.
> createInstance(GBeanInstance.java:933)
> at org.apache.geronimo.gbean.runtime.GBeanInstanceState.
> attemptFullStart(GBeanInstanceState.java:267)
> at org.apache.geronimo.gbean.runtime.GBeanInstanceState.
> start(GBeanInstanceState.java:102)
> at org.apache.geronimo.gbean.runtime.GBeanInstance.
> start(GBeanInstance.java:526)
> at org.apache.geronimo.kernel.basic.BasicKernel.
> startGBean(BasicKernel.java:361)
> at org.apache.geronimo.kernel.config.
> KernelConfigurationManager.load(KernelConfigurationManager.java:161)
> at org.apache.geronimo.kernel.config.
> SimpleConfigurationManager.
> loadConfiguration(SimpleConfigurationManager.java:307)
> at org.apache.geronimo.kernel.config.
> SimpleConfigurationManager.
> loadConfiguration(SimpleConfigurationManager.java:275)
> at org.apache.geronimo.kernel.config.
> SimpleConfigurationManager.
> loadConfiguration(SimpleConfigurationManager.java:250)
> at org.apache.geronimo.kernel.config.
> KernelConfigurationManager.
> loadConfiguration(KernelConfigurationManager.java:112)
> at org.apache.geronimo.kernel.config.
> KernelConfigurationManager$$FastClassByCGLIB$$b117102f.invoke(<generated>)
> at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
> at org.apache.geronimo.gbean.runtime.FastMethodInvoker.
> invoke(FastMethodInvoker.java:38)
> at org.apache.geronimo.gbean.runtime.GBeanOperation.
> invoke(GBeanOperation.java:122)
> at org.apache.geronimo.gbean.runtime.GBeanInstance.
> invoke(GBeanInstance.java:852)
> at org.apache.geronimo.kernel.basic.BasicKernel.
> invoke(BasicKernel.java:239)
> at org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:338)
> at org.apache.geronimo.kernel.
> KernelGBean$$FastClassByCGLIB$$1cccefc9.invoke(<generated>)
> at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
> at org.apache.geronimo.gbean.runtime.FastMethodInvoker.
> invoke(FastMethodInvoker.java:38)
> at org.apache.geronimo.gbean.runtime.GBeanOperation.
> invoke(GBeanOperation.java:122)
> at org.apache.geronimo.gbean.runtime.GBeanInstance.
> invoke(GBeanInstance.java:852)
> at org.apache.geronimo.kernel.basic.BasicKernel.
> invoke(BasicKernel.java:239)
> at org.apache.geronimo.system.jmx.MBeanGBeanBridge.
> invoke(MBeanGBeanBridge.java:168)
> at mx4j.server.interceptor.InvokerMBeanServerInterceptor.
> invoke(InvokerMBeanServerInterceptor.java:221)
> at mx4j.server.interceptor.DefaultMBeanServerInterceptor.
> invoke(DefaultMBeanServerInterceptor.java:120)
> at mx4j.server.interceptor.SecurityMBeanServerInterceptor.
> invoke(SecurityMBeanServerInterceptor.java:84)
> at mx4j.server.interceptor.DefaultMBeanServerInterceptor.
> invoke(DefaultMBeanServerInterceptor.java:120)
> at mx4j.server.interceptor.DefaultMBeanServerInterceptor.
> invoke(DefaultMBeanServerInterceptor.java:120)
> at mx4j.server.interceptor.
> ContextClassLoaderMBeanServerInterceptor.
> invoke(ContextClassLoaderMBeanServerInterceptor.java:203)
> at mx4j.server.MX4JMBeanServer.invoke(MX4JMBeanServer.java:1043)
> at mx4j.remote.rmi.RMIConnectionInvoker.
> invoke(RMIConnectionInvoker.java:219)
> at sun.reflect.GeneratedMethodAccessor185.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.
> invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at mx4j.remote.rmi.RMIConnectionProxy.
> invoke(RMIConnectionProxy.java:34)
> at mx4j.remote.rmi.RMIConnectionSubjectInvoker.
> chain(RMIConnectionSubjectInvoker.java:99)
> at mx4j.remote.rmi.RMIConnectionSubjectInvoker.
> access$000(RMIConnectionSubjectInvoker.java:31)
> at mx4j.remote.rmi.RMIConnectionSubjectInvoker$1.
> run(RMIConnectionSubjectInvoker.java:90)
> at java.security.AccessController.doPrivileged(Native Method)
> at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
> at mx4j.remote.MX4JRemoteUtils.subjectInvoke(MX4JRemoteUtils.java:163)
> at mx4j.remote.rmi.RMIConnectionSubjectInvoker.
> subjectInvoke(RMIConnectionSubjectInvoker.java:86)
> at mx4j.remote.rmi.RMIConnectionSubjectInvoker.
> invoke(RMIConnectionSubjectInvoker.java:80)
> at $Proxy0.invoke(Unknown Source)
> at javax.management.remote.rmi.RMIConnectionImpl.
> invoke(RMIConnectionImpl.java:221)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.
> invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.
> invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
> at sun.rmi.transport.Transport$1.run(Transport.java:148)
> at java.security.AccessController.doPrivileged(Native Method)
> at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
> at sun.rmi.transport.tcp.TCPTransport.
> handleMessages(TCPTransport.java:460)
> at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.
> run(TCPTransport.java:701)
> at java.lang.Thread.run(Thread.java:534)
> Caused by: java.io.IOException: Unable to deserialize GBeanData
> ECommApps/WSHello/1.0/war?J2EEApplication=null,j2eeType=WebModule,
> name=ECommApps/WSHello/1.0/war
> at org.apache.geronimo.gbean.GBeanData.
> readExternal(GBeanData.java:266)
> at org.apache.geronimo.kernel.config.SerializedGBeanState.
> loadGBeans(SerializedGBeanState.java:111)
> ... 64 more
> Caused by: java.io.IOException: Unable to deserialize GBeanData
> ECommApps/WSHello/1.0/war?J2EEApplication=null,j2eeType=WebModule,
> name=ECommApps/WSHello/1.0/war, attribute: webServices
> at org.apache.geronimo.gbean.GBeanData.
> readExternal(GBeanData.java:239)
> ... 65 more
> Caused by: java.io.StreamCorruptedException
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1301)
> at java.io.ObjectInputStream.
> defaultReadFields(ObjectInputStream.java:1845)
> at java.io.ObjectInputStream.
> readSerialData(ObjectInputStream.java:1769)
> at java.io.ObjectInputStream.
> readOrdinaryObject(ObjectInputStream.java:1646)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
> at java.util.ArrayList.readObject(ArrayList.java:547)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.
> invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.
> invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at java.io.ObjectStreamClass.
> invokeReadObject(ObjectStreamClass.java:838)
> at java.io.ObjectInputStream.
> readSerialData(ObjectInputStream.java:1746)
> at java.io.ObjectInputStream.
> readOrdinaryObject(ObjectInputStream.java:1646)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
> at java.io.ObjectInputStream.
> defaultReadFields(ObjectInputStream.java:1845)
> at java.io.ObjectInputStream.
> readSerialData(ObjectInputStream.java:1769)
> at java.io.ObjectInputStream.
> readOrdinaryObject(ObjectInputStream.java:1646)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
> at java.util.ArrayList.readObject(ArrayList.java:547)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.
> invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.
> invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at java.io.ObjectStreamClass.
> invokeReadObject(ObjectStreamClass.java:838)
> at java.io.ObjectInputStream.
> readSerialData(ObjectInputStream.java:1746)
> at java.io.ObjectInputStream.
> readOrdinaryObject(ObjectInputStream.java:1646)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
> at java.util.HashMap.readObject(HashMap.java:1006)
> at sun.reflect.GeneratedMethodAccessor273.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.
> invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at java.io.ObjectStreamClass.
> invokeReadObject(ObjectStreamClass.java:838)
> at java.io.ObjectInputStream.
> readSerialData(ObjectInputStream.java:1746)
> at java.io.ObjectInputStream.
> readOrdinaryObject(ObjectInputStream.java:1646)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
> at java.io.ObjectInputStream.
> defaultReadFields(ObjectInputStream.java:1845)
> at java.io.ObjectInputStream.
> readSerialData(ObjectInputStream.java:1769)
> at java.io.ObjectInputStream.
> readOrdinaryObject(ObjectInputStream.java:1646)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
> at java.io.ObjectInputStream.
> skipCustomData(ObjectInputStream.java:1810)
> at java.io.ObjectInputStream.
> readExternalData(ObjectInputStream.java:1698)
> at java.io.ObjectInputStream.
> readOrdinaryObject(ObjectInputStream.java:1644)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
> at java.io.ObjectInputStream.
> defaultReadFields(ObjectInputStream.java:1845)
> at java.io.ObjectInputStream.
> readSerialData(ObjectInputStream.java:1769)
> at java.io.ObjectInputStream.
> readOrdinaryObject(ObjectInputStream.java:1646)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
> at java.io.ObjectInputStream.
> defaultReadFields(ObjectInputStream.java:1845)
> at java.io.ObjectInputStream.
> readSerialData(ObjectInputStream.java:1769)
> at java.io.ObjectInputStream.
> readOrdinaryObject(ObjectInputStream.java:1646)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
> at java.util.HashMap.readObject(HashMap.java:1006)
> at sun.reflect.GeneratedMethodAccessor273.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.
> invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at java.io.ObjectStreamClass.
> invokeReadObject(ObjectStreamClass.java:838)
> at java.io.ObjectInputStream.
> readSerialData(ObjectInputStream.java:1746)
> at java.io.ObjectInputStream.
> readOrdinaryObject(ObjectInputStream.java:1646)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
> at org.apache.geronimo.gbean.GBeanData.
> readExternal(GBeanData.java:235)
> ... 65 more
>
>
>
> Jeff Rhodes
> Internet Software Architecture Group
> x62637
>
>
> This e-mail and any attachments are intended only for the
> individual or company to which it is addressed and may contain
> information which is privileged, confidential and prohibited from
> disclosure or unauthorized use under applicable law. If you are
> not the intended recipient of this e-mail, you are hereby notified
> that any use, dissemination, or copying of this e-mail or the
> information contained in this e-mail is strictly prohibited by the
> sender. If you have received this transmission in error, please
> return the material received to the sender and delete all copies
> from your system.
