hello,

I have a java program with a WS service interface and I want to write a web
application which connects to it.

I created a jsp file which creates reference to a Client Component (using
implementation.web), and I have in the ClientImpl class a reference to an
interface implemented by WS (binding.ws)
but when I execute the jsp file, when the client tries to call a method from
the interface I get null pointer exception.

The composite I have is:

*    <component name="foo">*

*        <implementation.web web-uri=""/>*

*        <reference name="service" target="MyClientComponent"/>*

*    </component>

*

*    <component name="MyClientComponent">*

*        <implementation.java class="Client.MyClientImpl" />*

*        <reference name="myService">*

*            <interface.java interface="Client.MyService"*

*                    callbackInterface="Client.MyServiceCallback" />*

*            <binding.ws uri="http://localhost:8082/BigMediMash"; />*

*            <callback>*

*                <binding.ws uri="http://localhost:8083/MashCallback"/>*

*            </callback>*

*        </reference>*

*    </component>*



I get null when I call myService.method() from MyClientImpl.




I tried seperating the composite to two composites.
first one for the jsp and the Client Class (without the reference), and then
call another composite using the following code:

*Node node = NodeFactory.newInstance().createNode("client.composite",
MyClientImpl.class.getClassLoader());
node.start();
MyClient myClient = ((Client)node).getService(MyClient.class,
"MyClientComponent");*


But I get the same error (null pointerexception)

How Can I inject MyService interface to the code?

Thanks,

Renana.

Reply via email to