7 Replies Latest reply on Sep 9, 2007 11:56 PM by Peter Johnson

    Mapping problem

    Nicolas Arnaud Newbie

      I have a problem with my web service client :

      try {
       //urn:bsa.ws.test
       ServiceFactory factory = ServiceFactory.newInstance();
       URL wsdlLocation = new URL("http://localhost:8080/DmexWs" + "?wsdl");
       QName serviceName = new QName("urn:bsa.ws.test", "DmexWs");
       Service service = (Service)factory.createService(wsdlLocation, serviceName);
       Call call = service.createCall();
      
       QName operationName = new QName("urn:bsa.ws.test", "getDmex");
       call.setOperationName(operationName);
      
       Integer id = new Integer(274);
       Object retObj = call.invoke(new Object[]{id});
      
       System.out.println(retObj);
       } catch (Exception e) {
       e.printStackTrace();
       }
      


      The return type is "Dmex" and when I run my client I have this error:

      org.jboss.ws.WSException: Cannot obtain java type mapping for: {urn:bsa.ws.test.types}Dmex
      


      I generated the jaxrpc-mapping.xml but it seems that my client doesn't use it.
      What could I do for this problem?

        • 1. Re: Mapping problem
          Nicolas Arnaud Newbie

          With a String return type, it runs

          So, it's a mapping problem but I don't know it exactly is

          • 2. Re: Mapping problem
            Nicolas Arnaud Newbie

            I tried to use the methode

            Service service = (Service)factory.createService(wsdlLocation, serviceName,mappingURL);
            


            as I saw in an example but this method doesn't seem exist...

            • 3. Re: Mapping problem
              Nicolas Arnaud Newbie

              I solved this problem by using ServiceFactoryImpl instead of ServiceFactory

              But now I have some errors to parse my jaxrpc-mapping.xml file at the line

              Service service = (Service)factory.createService(wsdlLocation, serviceName,mappingUrl);
              


              org.jboss.xb.binding.JBossXBRuntimeException: Failed to create a new SAX parser
               at org.jboss.xb.binding.UnmarshallerFactory$UnmarshallerFactoryImpl.newUnmarshaller(UnmarshallerFactory.java:100)
               at org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMappingFactory.parse(JavaWsdlMappingFactory.java:79)
               at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaData(JAXRPCClientMetaDataBuilder.java:77)
               at org.jboss.ws.core.jaxrpc.client.ServiceImpl.<init>(ServiceImpl.java:111)
               at org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:157)
               at org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:142)
               at jbosstest.HelloClient.testDmex(HelloClient.java:95)
              


              Any ideas?

              I need answers quickly plz

              • 4. Re: Mapping problem
                Thomas Diesler Master

                You could start with the samples from the download. There should find enough usecases for jaxrpc DII

                • 5. start JBoss problem
                  li xiaoqiang Newbie

                  I tried to follow jboss-5.0.0.Beta1 installation intructions to install jboss-5.0.0.Beta1on top of jboss-5.0.0.Beta1.

                  After that, I tried to start JBoss, but I saw a lot of exceptions, and http://localhost:8080/jbossws could not be reached. Am I missing anything in the steps? any comments are appreciated.

                  Part of the exception messages are
                  -------------------------------------------------------------------------
                  10:02:24,343 ERROR [BaseModelMBean] Exception invoking method addChild
                  org.jboss.xb.binding.JBossXBRuntimeException: Failed to create a new SAX parser
                  at org.jboss.xb.binding.UnmarshallerFactory$UnmarshallerFactoryImpl.newUnmarshaller(UnmarshallerFactory.java:100)
                  at org.jboss.web.metamodel.descriptor.WebDDObjectFactory.parse(WebDDObjectFactory.java:82)
                  at org.jboss.web.tomcat.tc6.TomcatInjectionContainer.processMetadata(TomcatInjectionContainer.java:256)
                  at org.jboss.web.tomcat.tc6.WebAppLoader.start(WebAppLoader.java:104)
                  at org.apache.catalina.core.StandardContext.start(StandardContext.java:4198)
                  at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
                  at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
                  at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
                  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:585)
                  at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
                  at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
                  at org.apache.catalina.core.StandardContext.init(StandardContext.java:5285)
                  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:585)
                  at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
                  at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
                  at org.jboss.web.tomcat.tc6.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:302)
                  at org.jboss.web.tomcat.tc6.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:129)
                  at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:355)
                  at org.jboss.web.deployers.WebModule.startModule(WebModule.java:88)
                  at org.jboss.web.deployers.WebModule.start(WebModule.java:66)
                  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:585)
                  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
                  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
                  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:668)
                  at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:184)
                  at $Proxy0.start(Unknown Source)
                  at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
                  at org.jboss.system.microcontainer.ServiceControllerContextAction.install(ServiceControllerContextAction.java:46)
                  at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
                  at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:226)
                  at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:198)
                  at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:709)
                  at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:429)
                  at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:538)
                  at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:472)
                  at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:320)
                  at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:190)
                  at org.jboss.system.ServiceController.doChange(ServiceController.java:656)
                  at org.jboss.system.ServiceController.start(ServiceController.java:431)
                  at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:124)
                  at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:85)
                  at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:44)
                  at org.jboss.deployers.plugins.deployers.helpers.AbstractSimpleRealDeployer.deploy(AbstractSimpleRealDeployer.java:53)
                  at org.jboss.deployers.plugins.deployer.AbstractSimpleDeployer.commitDeploy(AbstractSimpleDeployer.java:52)
                  at org.jboss.deployers.plugins.deployer.DeployerWrapper.commitDeploy(DeployerWrapper.java:145)
                  at org.jboss.deployers.plugins.deployment.MainDeployerImpl.commitDeploy(MainDeployerImpl.java:440)
                  at org.jboss.deployers.plugins.deployment.MainDeployerImpl.process(MainDeployerImpl.java:381)
                  at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:366)
                  at org.jboss.system.server.profileservice.ProfileServiceBootstrap.bootstrap(ProfileServiceBootstrap.java:246)
                  at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.run(AbstractBootstrap.java:89)
                  at org.jboss.system.server.profileservice.ServerImpl.doStart(ServerImpl.java:401)
                  at org.jboss.system.server.profileservice.ServerImpl.start(ServerImpl.java:340)
                  at org.jboss.Main.boot(Main.java:210)
                  at org.jboss.Main$1.run(Main.java:508)
                  at java.lang.Thread.run(Thread.java:595)

                  • 6. Re: start JBoss problem
                    li xiaoqiang Newbie

                     

                    "leaderbird" wrote:
                    I tried to follow jboss-5.0.0.Beta1 installation intructions to install jboss-5.0.0.Beta1on top of jboss-5.0.0.Beta1.

                    After that, I tried to start JBoss, but I saw a lot of exceptions, and http://localhost:8080/appName could not be reached. Am I missing anything in the steps? any comments are appreciated.

                    Part of the exception messages are
                    -------------------------------------------------------------------------
                    10:02:24,343 ERROR [BaseModelMBean] Exception invoking method addChild
                    org.jboss.xb.binding.JBossXBRuntimeException: Failed to create a new SAX parser
                    at org.jboss.xb.binding.UnmarshallerFactory$UnmarshallerFactoryImpl.newUnmarshaller(UnmarshallerFactory.java:100)
                    at org.jboss.web.metamodel.descriptor.WebDDObjectFactory.parse(WebDDObjectFactory.java:82)
                    at org.jboss.web.tomcat.tc6.TomcatInjectionContainer.processMetadata(TomcatInjectionContainer.java:256)
                    at org.jboss.web.tomcat.tc6.WebAppLoader.start(WebAppLoader.java:104)
                    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4198)
                    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
                    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
                    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
                    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:585)
                    at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
                    at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
                    at org.apache.catalina.core.StandardContext.init(StandardContext.java:5285)
                    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:585)
                    at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
                    at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
                    at org.jboss.web.tomcat.tc6.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:302)
                    at org.jboss.web.tomcat.tc6.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:129)
                    at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:355)
                    at org.jboss.web.deployers.WebModule.startModule(WebModule.java:88)
                    at org.jboss.web.deployers.WebModule.start(WebModule.java:66)
                    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:585)
                    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
                    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
                    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:668)
                    at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:184)
                    at $Proxy0.start(Unknown Source)
                    at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
                    at org.jboss.system.microcontainer.ServiceControllerContextAction.install(ServiceControllerContextAction.java:46)
                    at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
                    at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:226)
                    at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:198)
                    at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:709)
                    at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:429)
                    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:538)
                    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:472)
                    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:320)
                    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:190)
                    at org.jboss.system.ServiceController.doChange(ServiceController.java:656)
                    at org.jboss.system.ServiceController.start(ServiceController.java:431)
                    at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:124)
                    at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:85)
                    at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:44)
                    at org.jboss.deployers.plugins.deployers.helpers.AbstractSimpleRealDeployer.deploy(AbstractSimpleRealDeployer.java:53)
                    at org.jboss.deployers.plugins.deployer.AbstractSimpleDeployer.commitDeploy(AbstractSimpleDeployer.java:52)
                    at org.jboss.deployers.plugins.deployer.DeployerWrapper.commitDeploy(DeployerWrapper.java:145)
                    at org.jboss.deployers.plugins.deployment.MainDeployerImpl.commitDeploy(MainDeployerImpl.java:440)
                    at org.jboss.deployers.plugins.deployment.MainDeployerImpl.process(MainDeployerImpl.java:381)
                    at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:366)
                    at org.jboss.system.server.profileservice.ProfileServiceBootstrap.bootstrap(ProfileServiceBootstrap.java:246)
                    at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.run(AbstractBootstrap.java:89)
                    at org.jboss.system.server.profileservice.ServerImpl.doStart(ServerImpl.java:401)
                    at org.jboss.system.server.profileservice.ServerImpl.start(ServerImpl.java:340)
                    at org.jboss.Main.boot(Main.java:210)
                    at org.jboss.Main$1.run(Main.java:508)
                    at java.lang.Thread.run(Thread.java:595)


                    • 7. Re: Mapping problem
                      Peter Johnson Master

                      leaderbird, please do not append unrelated questions to the end of someone else's post. I you repeat your question in a new post, I will offer some suggestions. (When you repost, reread your first sentence...)