3 Replies Latest reply on Apr 17, 2008 6:41 AM by Silvano Maffeis

    org.jboss.ws.WSException

    Avinash Nayak Newbie

      Does anyone have the idea about the following exception?
      I was trying to deploy a webservice.

      The exception says : org.jboss.ws.WSException: arg0 is not a valid property on class ...

      I am not getting any resource regarding the exception.

      Thanks.

        • 1. Re: org.jboss.ws.WSException
          Avinash Nayak Newbie

          Its a bit urgent.
          I would appreciate any response.

          Thanks.

          • 2. Re: org.jboss.ws.WSException
            Avinash Nayak Newbie

            I am posting the sample of the code.
            Package and Import statements are removed.

            @XmlAccessorType(XmlAccessType.FIELD)
            @XmlType(propOrder = { "id" })
            @XmlRootElement(name = "getMyRequest")
            public class MyRequest {
            private Long id;
            public Long getId() { return id; }
            public void setId(Long id) { this.id = id; }
            }


            @XmlAccessorType(XmlAccessType.FIELD)
            @XmlType(name = "", propOrder = { "name" })
            @XmlRootElement(name = "getMyResponse")
            public class MyResponse {
            private String name;
            public String getName() { return name; }
            public void setName(String name) { this.name = name; }
            }

            @WebService(name = "MyFunctions")
            public interface MyFunctions {
            @WebMethod(operationName = "getName")
            @WebResult(name = "name")
            @RequestWrapper(localName = "getMyRequest", className = "com.test.services.server.MyRequest")
            @ResponseWrapper(localName = "getMyResponse", className = "com.test.services.server.MyResponse")
            public String getName(Long tourId);
            }

            @Stateless
            @WebService(endpointInterface = "com.test.services.MyFunctions")
            @TransactionAttribute(TransactionAttributeType.REQUIRED)
            public class MyFunctionImpl implements MyFunctions {
            public String getName(Long tourId) { return null; }
            }

            The following is the error I get.
            I am using jboss 4.2.2 GA.

            org.jboss.deployment.DeploymentException: Could not create deployment: file:/D:/Software/jboss/extracted/jboss-4.2.2.GA/server/hermes/deploy/temp.jar; - nested throwable: (org.jboss.ws.WSException: arg0 is not a valid property on class com.test.services.server.MyRequest)
            at org.jboss.deployment.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:53)
            at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1050)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
            at sun.reflect.GeneratedMethodAccessor20.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(ModelMBeanOperationInterceptor.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:634)
            at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
            at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
            at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
            Caused by: org.jboss.ws.WSException: arg0 is not a valid property on class com.test.services.server.MyRequest
            at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getElementPropertyAccessor(JAXBContextImpl.java:926)
            at org.jboss.ws.metadata.acessor.JAXBAccessor$1$1.create(JAXBAccessor.java:75)
            at org.jboss.ws.metadata.umdm.ParameterMetaData.eagerInitialize(ParameterMetaData.java:480)
            at org.jboss.ws.metadata.umdm.OperationMetaData.eagerInitialize(OperationMetaData.java:458)
            at org.jboss.ws.metadata.umdm.EndpointMetaData.eagerInitializeOperations(EndpointMetaData.java:533)
            at org.jboss.ws.metadata.umdm.EndpointMetaData.initializeInternal(EndpointMetaData.java:519)
            at org.jboss.ws.metadata.umdm.EndpointMetaData.eagerInitialize(EndpointMetaData.java:507)
            at org.jboss.ws.metadata.umdm.ServiceMetaData.eagerInitialize(ServiceMetaData.java:429)
            at org.jboss.ws.metadata.umdm.UnifiedMetaData.eagerInitialize(UnifiedMetaData.java:196)
            at org.jboss.wsf.stack.jbws.EagerInitializeDeploymentAspect.create(EagerInitializeDeploymentAspect.java:50)
            at org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl.deploy(DeploymentAspectManagerImpl.java:115)
            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(SubDeployerInterceptorSupport.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)
            ... 20 more

            • 3. Re: org.jboss.ws.WSException
              Silvano Maffeis Newbie

              Hi. I was able to work around this issue by naming all my WSDL request parameters as "arg0", "arg1" etc (instead of "id", "name" in your example), and by naming by response parameter as "result". Probably there is a cleaner solution using JAXB annotation, which allows you to name parameters the way you like.