3 Replies Latest reply on Oct 22, 2008 7:03 AM by Alessio Soldano

    WSRM interop .NET error

    Guzman Llambi­as Novice

      Hi, I'm using JBoss 4.2.2 with Metro 3.0.3 and I've a WS-RM service and a WCF .NET 3.0 client. I've tried this with Glassfish and run ok, but when I try it on JBoss the following exception occurs:

      15:34:23,062 ERROR [EndpointMethodHandler]
      java.lang.NullPointerException
       at org.jboss.wsf.stack.metro.InvokerJSE.invoke(InvokerJSE.java:81)
       at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:146)
       at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethod
      Handler.java:257)
       at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTub
      e.java:93)
       at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
       at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
       at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
       at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
       at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeI
      mpl.java:106)
       at org.jboss.wsf.stack.metro.log.DumpPipe.process(DumpPipe.java:94)
       at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter
      .java:115)
       at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
       at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
       at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
       at com.sun.xml.ws.api.pipe.Fiber.run(Fiber.java:388)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
      utor.java:650)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
      .java:675)
       at java.lang.Thread.run(Thread.java:595)
      


      Any idea?

      Thanks!
      Guzman

        • 1. Re: WSRM interop .NET error
          Alessio Soldano Master

          Hi,
          could you please provide more information on the endpoint you deploy and how it is packaged?
          The exception you get is caused by the org.jboss.wsf.spi.deployment.Endpoint not being set into the threadlocal in EndpointAssociation, so I'd like to understand how are you deploying and running your app.

          • 2. Re: WSRM interop .NET error
            Guzman Llambi­as Novice

             

            "alessio.soldano@jboss.com" wrote:
            Hi,
            could you please provide more information on the endpoint you deploy and how it is packaged?
            The exception you get is caused by the org.jboss.wsf.spi.deployment.Endpoint not being set into the threadlocal in EndpointAssociation, so I'd like to understand how are you deploying and running your app.


            Here's the endpoint

            @WebService()
            public class CalculatorWS {
            
             @WebMethod(operationName = "add", action="http://uy.fing.lins/wsrm/actions/add")
             public int add(
             @WebParam(name = "i") int i,
             @WebParam(name = "j") int j) {
            
             return i + j;
             }
             @WebMethod(operationName = "substract", action="http://uy.fing.lins/wsrm/actions/substract")
             public int substract(
             @WebParam(name = "i") int i,
             @WebParam(name = "j") int j) {
             return i - j;
             }
            }
            


            Here's the web.xml

            <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
             <servlet>
             <servlet-name>CalculatorServlet</servlet-name>
             <servlet-class>uy.edu.fing.lins.wsrm.services.CalculatorWS</servlet-class>
             </servlet>
             <servlet-mapping>
             <servlet-name>CalculatorServlet</servlet-name>
             <url-pattern>/services</url-pattern>
             </servlet-mapping>
             <session-config>
             <session-timeout>
             30
             </session-timeout>
             </session-config>
             <welcome-file-list>
             <welcome-file>index.jsp</welcome-file>
             </welcome-file-list>
            </web-app>
            


            Here's the wsit config file:

            <definitions
             xmlns="http://schemas.xmlsoap.org/wsdl/"
             xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
             xmlns:xsd="http://www.w3.org/2001/XMLSchema"
             xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name="CalculatorWSService" targetNamespace="http://services.wsrm.lins.fing.edu.uy/" xmlns:tns="http://services.wsrm.lins.fing.edu.uy/" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsaws="http://www.w3.org/2005/08/addressing" xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm/policy" xmlns:sunrm="http://sun.com/2006/03/rm"
            >
             <message name="add"/>
             <message name="addResponse"/>
             <message name="substract"/>
             <message name="substractResponse"/>
             <portType name="CalculatorWS">
             <operation name="add">
             <input message="tns:add"/>
             <output message="tns:addResponse"/>
             </operation>
             <operation name="substract">
             <input message="tns:substract"/>
             <output message="tns:substractResponse"/>
             </operation>
             </portType>
             <binding name="CalculatorWSPortBinding" type="tns:CalculatorWS">
             <wsp:PolicyReference URI="#CalculatorWSPortBindingPolicy"/>
             <operation name="add">
             <input/>
             <output/>
             </operation>
             <operation name="substract">
             <input/>
             <output/>
             </operation>
             </binding>
             <service name="CalculatorWSService">
             <port name="CalculatorWSPort" binding="tns:CalculatorWSPortBinding"/>
             </service>
             <wsp:Policy wsu:Id="CalculatorWSPortBindingPolicy">
             <wsp:ExactlyOne>
             <wsp:All>
             <wsaws:UsingAddressing xmlns:wsaws="http://www.w3.org/2006/05/addressing/wsdl"/>
             <wsrm:RMAssertion/>
             <sunrm:Ordered/>
             </wsp:All>
             </wsp:ExactlyOne>
             </wsp:Policy>
            </definitions>
            


            I tested on glassfish and worked fine, but when I redeploy it on JBoss, the above exception occurs.

            If you need something else, please tell me

            Thanks
            Guzman

            • 3. Re: WSRM interop .NET error
              Alessio Soldano Master

              OK, this is almost the same as the sample provided in the jbossws-metro testsuite, see: package org.jboss.test.ws.wsit.rm, so I can't see what could be the cause of your problem right now.
              Could you please create a jira issue and attach a simple application reproducing the error? This way we can analyze it and solve the issue, perhaps in the next release.