[JBossWS] - Method Overloading and SOAP Annotations
by nraghava
I have my HelloWorld EJB3 service with 3 overloaded methods and corresponding SOAP Annotations.
Hello World Impl Code:
| public class SomeServiceBean implements SomeService {
|
| @WebMethod
| @WebResult(name="someData")
| public string SomeMethod ( @WebParam(name="somedaylong") long X,
| @WebParam(name="somedaylong") long Y,
| @WebParam(name="somemonth") string Z) {
| ....
| }
|
| @WebMethod
| @WebResult(name="someData")
| public string SomeMethod ( @WebParam(name="somedayint") int X,
| @WebParam(name="someweekint") int Y,
| @WebParam(name="somemonth") string Z) {
| ....
| }
|
|
| @WebMethod
| @WebResult(name="someData")
| public string SomeMethod ( @WebParam(name="somedaylong") long X,
| @WebParam(name="someweekint") int Y,
| @WebParam(name="somemonth") string Z) {
| ....
| }
| }
|
|
Per the WSDL Spec, the combination of method name and in/out parameter name should be unique as in this case i.e.,
[SomeMethod, somedaylong, somedaylong, somemonth]
[SomeMethod, somedayint, somedayint, somemonth]
[SomeMethod, somedaylong, somedayint, somemonth]
When I deploy this service in my JBoss 4.2.1 GA container i get the following error message:
| 2008-06-06 14:23:26,714 WARN [org.jboss.ws.metadata.wsdl.WSDLBinding] Multiple binding operations r
| eference: {http://Some.services.xyz.com/}SomeMethod
| 2008-06-06 14:23:26,715 WARN [org.jboss.ws.metadata.wsdl.WSDLBinding] Multiple binding operations r
| eference: {http://Some.services.xyz.com/}SomeMethod
| 2008-06-06 14:23:26,715 WARN [org.jboss.ws.metadata.wsdl.WSDLBinding] Multiple binding operations r
| eference: {http://Some.services.xyz.com/}SomeMethod
| 2008-06-06 14:23:26,742 ERROR [org.jboss.deployment.MainDeployer] Could not start deployment: file:/
| var/lib/jbossas/server/production/tmp/deploy/tmp34936Some-service-ear-1.0-SNAPSHOT.ear-contents/Some
| -service-ejb-1.0-SNAPSHOT.jar
| java.lang.IllegalArgumentException: Duplicate operation with name=SomeMethod, found in binding '{htt
| p://Some.services.xyz.com/}SomeServiceBinding'.
| at com.ibm.wsdl.BindingImpl.getBindingOperation(BindingImpl.java:244)
| at org.jboss.ws.tools.wsdl.WSDL11Reader.getBindingOperation(WSDL11Reader.java:940)
| at org.jboss.ws.tools.wsdl.WSDL11Reader.getOperationStyle(WSDL11Reader.java:949)
| at org.jboss.ws.tools.wsdl.WSDL11Reader.processPortTypeOperations(WSDL11Reader.java:655)
| at org.jboss.ws.tools.wsdl.WSDL11Reader.processPortType(WSDL11Reader.java:642)
| at org.jboss.ws.tools.wsdl.WSDL11Reader.processBinding(WSDL11Reader.java:1035)
| at org.jboss.ws.tools.wsdl.WSDL11Reader.processPort(WSDL11Reader.java:1560)
| at org.jboss.ws.tools.wsdl.WSDL11Reader.processPorts(WSDL11Reader.java:1545)
| at org.jboss.ws.tools.wsdl.WSDL11Reader.processServices(WSDL11Reader.java:1515)
| at org.jboss.ws.tools.wsdl.WSDL11Reader.processDefinition(WSDL11Reader.java:174)
| at org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:128)
| at org.jboss.ws.metadata.umdm.ServiceMetaData.getWsdlDefinitions(ServiceMetaData.java:321)
| at org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder.buildWebServiceMetaDat
| a(JAXWSWebServiceMetaDataBuilder.java:166)
| at org.jboss.ws.metadata.builder.jaxws.JAXWSServerMetaDataBuilder.setupProviderOrWebService(
| JAXWSServerMetaDataBuilder.java:50)
| at org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderEJB3.buildMetaData(JAXWSMetaDataB
| uilderEJB3.java:78)
| at org.jboss.wsf.stack.jbws.UnifiedMetaDataDeploymentAspect.create(UnifiedMetaDataDeployment
| Aspect.java:71)
| at org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl.deploy(Unknown Source)
| at org.jboss.wsf.container.jboss42.ArchiveDeployerHook.deploy(ArchiveDeployerHook.java:97)
| at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:90)
| at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInt
| erceptorSupport.java:188)
| at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy34.start(Unknown Source)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at sun.reflect.GeneratedMethodAccessor27.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:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterce
| ptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy9.deploy(Unknown Source)
| at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
| at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeplo
| ymentScanner.java:263)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploym
| entScanner.java:274)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeployme
| ntScanner.java:225)
|
Any help is much appreciated?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4157060#4157060
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4157060
17 years, 10 months
[JBoss Messaging] - Redelivery order
by szhigunov
I ran into a problem that message redelivery order depends on if the server was restarted before redelivery or not.
This is my scenario.
I read three messages from the queue (sequentially) in separate transacted sessions and rollback them all.
Then, if I restart the server, the messages are redelivered in the order they were published (desired behavior).
If I do not restart the server, and begin receiving again (after all messages were rolled back to the queue),
the order of redelivery depends on the rollback timing.
The last to rollback is the first to redeliver and the original order is broken.
Is there a way to guarantee original message order in such situation without bouncing the server?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4157058#4157058
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4157058
17 years, 10 months
[JBossWS] - JbossWS array type issues
by agohar
Hi,
I am having a problem with JBossWS for Array elements in wsdl. I am using JBoss-4.2.2.
One of my webservices method returns an object (complex type), which contains the array of other objects in it. Here is the snippt from my wsdl
| <xs:complexType name='MyVO'>
| <xs:sequence>
| <xs:element maxOccurs='unbounded' name='attr1' type='xs:string'/>
| <xs:element maxOccurs='unbounded' name='attr2' type='tns:MyOtherVO'/>
| <xs:element name='attr3' type='tns:MyOtherVO'/>
| <xs:element maxOccurs='unbounded' name='attr4' type='tns:MyOtherVO2'/>
| <xs:element name='attr5' type='xs:int'/>
| <xs:element name='attr6' type='xs:string'/>
| <xs:element name='attr7' type='xs:string'/>
| <xs:element name='attr8' type='xs:int'/>
| </xs:sequence>
| </xs:complexType>
|
This Object is returned from one of the webservices method and when attr2 and attr4 are null array or empty array, it doesn't return anything back to the soap client. I want it to return empty array.
Is it possible?
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4157054#4157054
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4157054
17 years, 10 months