0 Replies Latest reply on Apr 25, 2013 10:49 PM by Gayatri G

    nullpointer exception while querying simpleType in Dynamicclient

    Gayatri G Newbie

      I have a WSDLService  with two ports in it .if i try with single port for the service i am able to generate an dynamic client successfully ,where as if try with 2 ports in it its getting a Nullpointer at an element which is simpleType.

       

      Why i am not able to load my service client with two ports in it ? where i am able to load with a single port.

       

      Below is the details about the issue of service with two ports in it

       

      I am trying to Query the docuement elements which are having simpleType in it  and resulting NullPointerException on call MessagePartInfo.getTypeClass()

      below is the snippets of the definitions
      <xs:element name="Get">
        <xs:complexType>
         <xs:sequence>
         <xs:element name="MOType" type="MoType" fixed="Subscription@http://schemas.ericsson.com/ema/UserProvisioning/BcsSub/1.0/" />
      ...
      ...
      ...



      'Get' contains an element 'MoType' which is derived as an simpleType like below in the same schema definitions

        <xs:simpleType name="MoType">
        <xs:restriction base="xs:string">
        <xs:pattern value="[A-Za-z][_A-Za-z0-9]*@.*" />
        </xs:restriction>
        </xs:simpleType>
      My client code :
      Class :SoapCxfClientBrowser

      public void processMessageParts(OperationData od, List<MessagePartInfo> parts) {
        if(logger.isDebugEnabled()) {
        logger.debug("Number of message parts: " + parts.size());
      }
      for (MessagePartInfo messagePartInfo : parts) {
        if(logger.isDebugEnabled()) {
        logger.debug("MessagePartInfo: " + messagePartInfo);
        logger.debug("TypeClass: " + messagePartInfo.getTypeClass());
        logger.debug("PartClass: "
         + messagePartInfo.getTypeClass().getCanonicalName());

        }
        processTypeInfo(od, messagePartInfo.getTypeClass());
      }
      }


      Error i am seeying :

      2013-04-23 15:33:13,976 DEBUG [com.hp.opencall.seeconnector.soapcxf.impl.SoapCxfClientBrowser] (HDScanner) MessagePartInfo: [MessagePartInfo name={http://schemas.ericsson.com/cai3g1.2/}parameters, ConcreteName={http://schemas.ericsson.com/cai3g1.2/}Get
      2013-04-23 15:33:13,976 DEBUG [com.hp.opencall.seeconnector.soapcxf.impl.SoapCxfClientBrowser] (HDScanner) TypeClass: null
      2013-04-23 15:33:13,976 DEBUG [com.hp.opencall.seeconnector.soapcxf.impl.SoapCxfDynamicProxyClientImpl] (HDScanner) Error processing WSDL: java.lang.NullPointerException
      java.lang.NullPointerException
      at com.hp.opencall.seeconnector.soapcxf.impl.SoapCxfClientBrowser.processMessageParts(SoapCxfClientBrowser.java:157)
      at com.hp.opencall.seeconnector.soapcxf.impl.SoapCxfClientBrowser.processOperations(SoapCxfClientBrowser.java:139)
      at com.hp.opencall.seeconnector.soapcxf.impl.SoapCxfClientBrowser.processBindingInfos(SoapCxfClientBrowser.java:112)
      at com.hp.opencall.seeconnector.soapcxf.impl.SoapCxfClientBrowser.processServiceInfos(SoapCxfClientBrowser.java:99)
      at com.hp.opencall.seeconnector.soapcxf.impl.SoapCxfClientBrowser.processClient(SoapCxfClientBrowser.java:87)
      at com.hp.opencall.seeconnector.soapcxf.impl.SoapCxfClientBrowser.init(SoapCxfClientBrowser.java:65)
      at com.hp.opencall.seeconnector.soapcxf.impl.SoapCxfDynamicProxyClientImpl.init(SoapCxfDynamicProxyClientImpl.java:130)
      at com.hp.opencall.seeconnector.soapcxf.impl.CSImslet.init(CSImslet.java:130)
      at javax.servlet.GenericServlet.init(GenericServlet.java:212)
      at com.hp.opencall.imsc.coreimpl.ImsletWrapper.initImslet(ImsletWrapper.java:181)
      at com.hp.opencall.imsc.coreimpl.ImsAppImpl.initImslet(ImsAppImpl.java:216)
      at com.hp.opencall.imsc.startup.loaders.ImscLoaderBase.registerImslet(ImscLoaderBase.java:132)
      at com.hp.opencall.imsc.startup.JBossImsletService.startService(JBossImsletService.java:59)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:376)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:322)
      at sun.reflect.GeneratedMethodAccessor82.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:616)
      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:189)
      at $Proxy38.start(Unknown Source)
      at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
      at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
      at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
      at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
      at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
      at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
      at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
      at org.jboss.system.ServiceController.start(ServiceController.java:460)
      at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)
      at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)
      at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
      at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
      at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
      at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
      at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
      at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
      at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:362)
      at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)
      at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:165)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      at java.lang.Thread.run(Thread.java:679)

       
      Could somebody help me to resolve this issue and by letting me know the route cause for this.

      Thanks in Advance