2 Replies Latest reply on Mar 30, 2007 3:18 PM by danielmesser

    can't run bank client app

      Hi,
      I have managed to get through most of the bank tutorial but I cannot seem to execute the client application and access the web service. The JBossDukesBank.ear deploys and works fine. The bankws-ejb.jar seems to deploy OK. I am able to enter the URL http://localhost:8080/bankws-ejb/TellerBean?wsdl and I do get the WSDL.

      The problem occurs when I try to execute the ClientWS application. It seems to be failing on the line:

      Service service = factory.createService(url, qname, mapping.toURL());

      The error that I'm getting is:

      run-ws:
      [java] log4j:WARN No appenders could be found for logger (org.jboss.ws.metadata.JSR109ClientMetaDataBuilder).
      [java] log4j:WARN Please initialize the log4j system properly.
      [java] Exception in thread "main" java.lang.NullPointerException
      [java] at java.lang.System.arraycopy(Native Method)
      [java] at org.apache.xerces.impl.xs.XSModelImpl.getAnnotations(Unknown Source)
      [java] at org.jboss.ws.metadata.wsdl.xmlschema.WSSchemaUtils.copyXSModel(WSSchemaUtils.java:737)
      [java] at org.jboss.ws.tools.JavaToXSD.parseSchema(JavaToXSD.java:201)
      [java] at org.jboss.ws.metadata.wsdl.WSDL11Reader.processTypes(WSDL11Reader.java:227)
      [java] at org.jboss.ws.metadata.wsdl.WSDL11Reader.processDefinition(WSDL11Reader.java:118)
      [java] at org.jboss.ws.metadata.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:145)
      [java] at org.jboss.ws.metadata.ServiceMetaData.getWsdlDefinitions(ServiceMetaData.java:273)
      [java] at org.jboss.ws.metadata.JSR109ClientMetaDataBuilder.buildMetaData(JSR109ClientMetaDataBuilder.java:106)
      [java] at org.jboss.ws.metadata.JSR109ClientMetaDataBuilder.buildMetaData(JSR109ClientMetaDataBuilder.java:78)
      [java] at org.jboss.ws.jaxrpc.ServiceImpl.(ServiceImpl.java:96)
      [java] at org.jboss.ws.jaxrpc.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:157)
      [java] at org.jboss.ws.jaxrpc.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:142)
      [java] at com.jboss.ebank.WSClient.main(WSClient.java:36)
      [java] Java Result: 1

      Any help would be appreciated.

      Thanks in advance,
      Nat

        • 1. Re: can't run bank client app
          ppgogo

          Hi, I got the same problem.
          My pure client code is much the same as the testcase of sample: jsr109ejb in jbossws-samples-1.0.3.GA,
          but I always get the NullPointException.
          However, if I run the testcase in the sample, it works fine!!
          I can't figure out what is missing in my pure client.
          Maybe the ServiceFactoryImpl will read some env properties when it try to create the service.

          My code like this:
          wsdlLocation = (new File("C:\\TestService.wsdl")).toURL();
          QName serviceName = new QName(TARGET_NAMESPACE, "TestService"); ServiceImpl service = (ServiceImpl)factory.createService(wsdlLocation, serviceName, javaWsdlMappingFile.toURL());
          ~~~~~~~~~~~~~~~~~~~~~
          Here the exception comes out.

          • 2. Re: can't run bank client app
            danielmesser

            I have the same problem. If you fixed it could you post what you did?
            Thanks,

            Daniel