1 Reply Latest reply on Oct 25, 2005 4:21 PM by thomas.diesler

    problem deploying WS - duplicate method names

    jaybee

      I'm trying to move a WS from Tomcat/Axis to jboss and having a few problems deploying it correctly. Several methods are overloaded and when I attempt to deploy the ear file I'm getting errors re duplicate methods - they do have the same name but diff. signature. It works OK in previous setup but that used a handwritten deployment wsdl file and the axis admin tool. This is the jboss error on deployment:

      15:02:07,140 INFO [WSDLFilePublisher] WSDL published to: file:/C:/jboss-4.0.3/s
      erver/default/data/wsdl/bhcc-gazetteer.ear/bhcc-gazetteer-ejb.jar/gazetteerPorta
      ble.wsdl
      15:02:07,312 ERROR [ServiceDeployer] Cannot startup webservice for: bhcc-gazette
      er-ejb.jar
      org.jboss.deployment.DeploymentException: Cannot deploy webservice; - nested thr
      owable: (java.lang.IllegalArgumentException: Duplicate operation with name=doPro
      pertySearch, found in portType '{http://ejb.gazetteer.ws.brightonhove.gov.uk}Gaz
      etteerPortableEndpointSoapBinding'.)
       at org.jboss.webservice.ServiceDeployer.deployWebservices(ServiceDeploye
      r.java:376)
       at org.jboss.webservice.ServiceDeployerEJB.deployWebservices(ServiceDepl
      oyerEJB.java:106)
       at org.jboss.webservice.ServiceDeployer.startWebservice(ServiceDeployer.
      java:229)
       at org.jboss.webservice.ServiceDeployer.handleNotification(ServiceDeploy
      er.java:110)
       at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.notification.NotificationListenerProxy.invoke(Notificati
      onListenerProxy.java:138)
       at $Proxy27.handleNotification(Unknown Source)
       at org.jboss.mx.util.JBossNotificationBroadcasterSupport.handleNotificat
      ion(JBossNotificationBroadcasterSupport.java:112)
       at org.jboss.mx.util.JBossNotificationBroadcasterSupport.sendNotificatio
      n(JBossNotificationBroadcasterSupport.java:95)
       at org.jboss.deployment.SubDeployerSupport.emitNotification(SubDeployerS
      upport.java:325)
       at org.jboss.deployment.SubDeployerSupport.start(SubDeployerSupport.java
      :293)
       at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:642)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
      er.java:141)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
      or.java:118)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
      BeanOperationInterceptor.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 $Proxy24.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.GeneratedMethodAccessor49.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
      er.java:141)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
      or.java:118)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
      BeanOperationInterceptor.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(URLDeploymen
      tScanner.java:319)
       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
      canner.java:507)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      doScan(AbstractDeploymentScanner.java:192)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(A
      bstractDeploymentScanner.java:265)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
      upport.java:274)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
      eanSupport.java:230)
       at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
      er.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.system.ServiceController$ServiceProxy.invoke(ServiceControl
      ler.java:943)
       at $Proxy0.start(Unknown Source)
       at org.jboss.system.ServiceController.start(ServiceController.java:428)
       at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
      er.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 $Proxy4.start(Unknown Source)
       at org.jboss.deployment.SARDeployer.start(SARDeployer.java:285)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:989)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:790)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:737)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
      er.java:141)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
      or.java:118)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
      BeanOperationInterceptor.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 $Proxy5.deploy(Unknown Source)
       at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:453)
       at org.jboss.system.server.ServerImpl.start(ServerImpl.java:330)
       at org.jboss.Main.boot(Main.java:187)
       at org.jboss.Main$1.run(Main.java:438)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: java.lang.IllegalArgumentException: Duplicate operation with name=doP
      ropertySearch, found in portType '{http://ejb.gazetteer.ws.brightonhove.gov.uk}G
      azetteerPortableEndpointSoapBinding'.
       at com.ibm.wsdl.BindingImpl.getBindingOperation(Unknown Source)
       at org.jboss.webservice.deployment.ServiceDescription.isHeaderParam(Serv
      iceDescription.java:806)
       at org.jboss.webservice.deployment.ServiceDescription.initOperations(Ser
      viceDescription.java:592)
       at org.jboss.webservice.deployment.ServiceDescription.initServiceDescrip
      tion(ServiceDescription.java:140)
       at org.jboss.webservice.deployment.ServiceDescription.<init>(ServiceDesc
      ription.java:108)
       at org.jboss.webservice.AxisService.getServiceDescription(AxisService.ja
      va:533)
       at org.jboss.webservice.AxisService.deployService(AxisService.java:359)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
      er.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.JMXInvocationHandler.invoke(JMXInvocationHandler.ja
      va:273)
       at $Proxy26.deployService(Unknown Source)
       at org.jboss.webservice.ServiceDeployer.deployWebservices(ServiceDeploye
      r.java:370)
       ... 96 more
      


      My service is based on a stateless session bean and I followed the bankws example to use java2wsdl (the wsdl deployment was previously written by hand). My java2wsdl ant task is copied from the dukes bankws example and looks like:

      <target name="wsdl" description="Generate the wsdl">
       <java classname="org.jboss.axis.wsdl.Java2WSDL" classpathref="compile.classpath" fork="yes">
       <arg value="-lhttp://this.value.is.replaced.by.jboss" />
       <arg value="-SGazetteerPortableService" />
       <arg value="-sGazetteerPortableEndpoint" />
       <arg value="-oetc/ejb/gazetteerPortable.wsdl" />
       <arg value="-uLITERAL" />
       <arg value="uk.gov.brightonhove.ws.gazetteer.ejb.GazetteerPortableWSEndPoint" />
       </java>
       </target>
      


      Which produces this:

      <?xml version="1.0" encoding="UTF-8"?>
      <wsdl:definitions targetNamespace="http://ejb.gazetteer.ws.brightonhove.gov.uk"
      xmlns="http://schemas.xmlsoap.org/wsdl/"
      xmlns:apachesoap="http://xml.apache.org/xml-soap"
      xmlns:impl="http://ejb.gazetteer.ws.brightonhove.gov.uk"
      xmlns:intf="http://ejb.gazetteer.ws.brightonhove.gov.uk"
      xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
      xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema">
       <wsdl:types>
       <schema targetNamespace="http://xml.apache.org/xml-soap" xmlns="http://www.w3.org/2001/XMLSchema">
       <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
       <complexType name="mapItem">
       <sequence>
       <element name="key" nillable="true" type="xsd:string"/>
       <element name="value" nillable="true" type="xsd:string"/>
       </sequence>
       </complexType>
       <complexType name="Map">
       <sequence>
       <element maxOccurs="unbounded" minOccurs="0" name="item" type="apachesoap:mapItem"/>
       </sequence>
       </complexType>
       </schema>
       <schema targetNamespace="http://ejb.gazetteer.ws.brightonhove.gov.uk" xmlns="http://www.w3.org/2001/XMLSchema">
       <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
       <complexType name="ArrayOf_apachesoap_Map">
       <complexContent>
       <restriction base="soapenc:Array">
       <attribute ref="soapenc:arrayType" wsdl:arrayType="apachesoap:Map[]"/>
       </restriction>
       </complexContent>
       </complexType>
       </schema>
       </wsdl:types>
      
       <wsdl:message name="doPropertySearchRequest2">
       <wsdl:part name="in0" type="xsd:string"/>
       <wsdl:part name="in1" type="xsd:int"/>
       <wsdl:part name="in2" type="xsd:int"/>
       </wsdl:message>
      
       <wsdl:message name="doPropertySearchRequest">
       <wsdl:part name="in0" type="xsd:string"/>
       </wsdl:message>
      
       <wsdl:message name="doPropertySearchResponse1">
       <wsdl:part name="doPropertySearchResponse" type="impl:ArrayOf_apachesoap_Map"/>
       </wsdl:message>
      
       <wsdl:message name="doPropertySearchResponse4">
       <wsdl:part name="doPropertySearchResponse" type="impl:ArrayOf_apachesoap_Map"/>
       </wsdl:message>
      
       <wsdl:message name="doPropertySearchResponse">
       <wsdl:part name="doPropertySearchResponse" type="impl:ArrayOf_apachesoap_Map"/>
       </wsdl:message>
      
       <wsdl:message name="doPropertySearchRequest4">
       <wsdl:part name="in0" type="xsd:string"/>
       <wsdl:part name="in1" type="xsd:int"/>
       <wsdl:part name="in2" type="xsd:int"/>
       <wsdl:part name="in3" type="xsd:boolean"/>
       <wsdl:part name="in4" type="xsd:int"/>
       </wsdl:message>
      
       [snip ...]
      
       <wsdl:portType name="GazetteerPortableWSEndPoint">
       <wsdl:operation name="doPropertySearch" parameterOrder="in0">
       <wsdl:input message="impl:doPropertySearchRequest" name="doPropertySearchRequest"/>
       <wsdl:output message="impl:doPropertySearchResponse" name="doPropertySearchResponse"/>
       </wsdl:operation>
      
       <wsdl:operation name="doPropertySearch" parameterOrder="in0 in1">
       <wsdl:input message="impl:doPropertySearchRequest1" name="doPropertySearchRequest1"/>
       <wsdl:output message="impl:doPropertySearchResponse1" name="doPropertySearchResponse1"/>
       </wsdl:operation>
      
       <wsdl:operation name="doPropertySearch" parameterOrder="in0 in1 in2">
       <wsdl:input message="impl:doPropertySearchRequest2" name="doPropertySearchRequest2"/>
       <wsdl:output message="impl:doPropertySearchResponse2" name="doPropertySearchResponse2"/>
       </wsdl:operation>
      
       <wsdl:operation name="doPropertySearch" parameterOrder="in0 in1 in2 in3">
       <wsdl:input message="impl:doPropertySearchRequest3" name="doPropertySearchRequest3"/>
       <wsdl:output message="impl:doPropertySearchResponse3" name="doPropertySearchResponse3"/>
       </wsdl:operation>
      
       <wsdl:operation name="doPropertySearch" parameterOrder="in0 in1 in2 in3 in4">
       <wsdl:input message="impl:doPropertySearchRequest4" name="doPropertySearchRequest4"/>
       <wsdl:output message="impl:doPropertySearchResponse4" name="doPropertySearchResponse4"/>
       </wsdl:operation>
      
       [snip ...]
      
       </wsdl:portType>
      
       <wsdl:binding name="GazetteerPortableEndpointSoapBinding" type="impl:GazetteerPortableWSEndPoint">
       <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
       <wsdl:operation name="doPropertySearch">
       <wsdlsoap:operation soapAction=""/>
       <wsdl:input name="doPropertySearchRequest">
       <wsdlsoap:body namespace="http://ejb.gazetteer.ws.brightonhove.gov.uk" use="literal"/>
       </wsdl:input>
       <wsdl:output name="doPropertySearchResponse">
       <wsdlsoap:body namespace="http://ejb.gazetteer.ws.brightonhove.gov.uk" use="literal"/>
       </wsdl:output>
       </wsdl:operation>
      
       <wsdl:operation name="doPropertySearch">
       <wsdlsoap:operation soapAction=""/>
       <wsdl:input name="doPropertySearchRequest1">
       <wsdlsoap:body namespace="http://ejb.gazetteer.ws.brightonhove.gov.uk" use="literal"/>
       </wsdl:input>
       <wsdl:output name="doPropertySearchResponse1">
       <wsdlsoap:body namespace="http://ejb.gazetteer.ws.brightonhove.gov.uk" use="literal"/>
       </wsdl:output>
       </wsdl:operation>
      
       <wsdl:operation name="doPropertySearch">
       <wsdlsoap:operation soapAction=""/>
       <wsdl:input name="doPropertySearchRequest2">
       <wsdlsoap:body namespace="http://ejb.gazetteer.ws.brightonhove.gov.uk" use="literal"/>
       </wsdl:input>
       <wsdl:output name="doPropertySearchResponse2">
       <wsdlsoap:body namespace="http://ejb.gazetteer.ws.brightonhove.gov.uk" use="literal"/>
       </wsdl:output>
       </wsdl:operation>
      
       <wsdl:operation name="doPropertySearch">
       <wsdlsoap:operation soapAction=""/>
       <wsdl:input name="doPropertySearchRequest3">
       <wsdlsoap:body namespace="http://ejb.gazetteer.ws.brightonhove.gov.uk" use="literal"/>
       </wsdl:input>
       <wsdl:output name="doPropertySearchResponse3">
       <wsdlsoap:body namespace="http://ejb.gazetteer.ws.brightonhove.gov.uk" use="literal"/>
       </wsdl:output>
       </wsdl:operation>
      
       <wsdl:operation name="doPropertySearch">
       <wsdlsoap:operation soapAction=""/>
       <wsdl:input name="doPropertySearchRequest4">
       <wsdlsoap:body namespace="http://ejb.gazetteer.ws.brightonhove.gov.uk" use="literal"/>
       </wsdl:input>
       <wsdl:output name="doPropertySearchResponse4">
       <wsdlsoap:body namespace="http://ejb.gazetteer.ws.brightonhove.gov.uk" use="literal"/>
       </wsdl:output>
       </wsdl:operation>
      
       [snip ...]
      
       </wsdl:binding>
       <wsdl:service name="GazetteerPortableService">
       <wsdl:port binding="impl:GazetteerPortableEndpointSoapBinding" name="GazetteerPortableEndpoint">
       <wsdlsoap:address location="http://this.value.is.replaced.by.jboss"/>
       </wsdl:port>
       </wsdl:service>
      
      </wsdl:definitions>
      


      Thanks in advance! (Let me know if it's useful for me to post other deployment files)