Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-320

error with xerces lib of jdk1.5 when I call a web service

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • jboss-ws4ee-4.0.3
    • jboss-ws4ee-4.0.2
    • jbossws-native
    • None

      hi....I use my client to call a web service binding with a my ejb. The client is:

      1 URL url = new URL(
      2 "http://brodo:8080/EsempioJ2EE/EsempioWS/EsempioWebService?wsdl");
      3
      4 QName qname = new QName("http://brodo:8080/", "EsemploWebService");
      5
      6 ServiceFactory factory = ServiceFactory.newInstance();
      7 Service service = factory.createService(url, qname);
      8
      9 EsempioWebService endpoint = (EsempioWebService) service
      10 .getPort(EsempioWebService.class);
      11
      12 System.out.println(endpoint.somma(1, 1));

      until the 12 row it's all ok. When I go in the 12 row I have this error:

      Exception in thread "main" java.rmi.RemoteException: null; nested exception is:
      java.lang.NullPointerException
      at org.jboss.webservice.client.PortProxy.invoke(PortProxy.java:176)
      at $Proxy1.somma(Unknown Source)
      at client.Main.main(Main.java:146)
      Caused by: java.lang.NullPointerException
      at java.util.Hashtable.put(Hashtable.java:396)
      at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.setProperty(SAXParserImpl.java:395)
      at org.jboss.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:262)
      at org.jboss.axis.MessagePart.getAsSOAPEnvelope(MessagePart.java:684)
      at org.jboss.axis.Message.getSOAPEnvelope(Message.java:428)
      at org.jboss.axis.Message.getContentType(Message.java:494)
      at org.jboss.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:386)
      at org.jboss.axis.transport.http.HTTPSender.invoke(HTTPSender.java:126)
      at org.jboss.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:73)
      at org.jboss.axis.SimpleChain.doVisiting(SimpleChain.java:160)
      at org.jboss.axis.SimpleChain.invoke(SimpleChain.java:123)
      at org.jboss.webservice.client.ClientEngine.invoke(ClientEngine.java:128)
      at org.jboss.axis.client.Call.invokeEngine(Call.java:3054)
      at org.jboss.axis.client.Call.invoke(Call.java:3039)
      at org.jboss.axis.client.Call.invoke(Call.java:2629)
      at org.jboss.axis.client.Call.invoke(Call.java:2538)
      at org.jboss.axis.client.Call.invokeInternal(Call.java:1976)
      at org.jboss.axis.client.Call.invoke(Call.java:1914)
      at org.jboss.webservice.client.CallImpl.invoke(CallImpl.java:265)
      at org.jboss.axis.client.AxisClientProxy.invoke(AxisClientProxy.java:381)
      at $Proxy0.somma(Unknown Source)
      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.webservice.client.PortProxy.invoke(PortProxy.java:105)
      ... 2 more

      I've gone into the code and I've seen that the problem is in org.jboss.axis.encoding.DeserializationContextImpl class in the .parse() method:

      /**

      • Create a parser and parse the inputSource
        */
        1 public void parse() throws SAXException
        2 {
        3 if (inputSource != null)
        4 {
        5 SAXParser parser = XMLUtils.getSAXParser();
        6 try
        7
        Unknown macro: {8 parser.setProperty("http}

        21 catch (IOException e)
        22

        { 23 throw new SAXException(e); 24 }

        25 inputSource = null;
        26 }
        27 }

      if I use jdk 1.5 automaticallly I use the jaxp 1.3 implementation by sun. Indeed the "parser" variable in my case is equal to com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl and it cannot to accept a null parameter in the setProperty method because it return a NullPointerException

            tdiesler@redhat.com Thomas Diesler
            luca.stancapiano@vige.it Luca Stancapiano (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: