Hi all,

I am invoking xfire/spring POJO service methods using the following client code: Service service = new ObjectServiceFactory().create(MyServiceInterface.class);
       XFire xfire = XFireFactory.newInstance().getXFire();
XFireProxyFactory factory = new XFireProxyFactory(xfire);
       MyServiceInterface client = null;
       try {
client = (MyServiceInterface ) factory.create(service , "http://<some_url>");
       }
      ....
      client.setProfile(peer, profile);

where 'peer' is an instance of custom class PeerID, and 'profile' is an instance of custom class
PeerProfile.

The problem is I get the following exception when I run the code:
org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: Illegal argument. interface my.org.proj.PeerID is not visible from class loader org.codehaus.xfire.fault.XFireFault: Illegal argument. interface my.org.proj.PeerID is not visible from class loader at org.codehaus.xfire.fault.Soap11FaultSerializer.readMessage(Soap11FaultSerializer.java:31) at org.codehaus.xfire.fault.SoapFaultSerializer.readMessage(SoapFaultSerializer.java:28) at org.codehaus.xfire.soap.handler.ReadHeadersHandler.checkForFault(ReadHeadersHandler.java:111) at org.codehaus.xfire.soap.handler.ReadHeadersHandler.invoke(ReadHeadersHandler.java:67) at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
   at org.codehaus.xfire.client.Client.onReceive(Client.java:406)
at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:139) at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48) at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26) at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
   at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79)
   at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:114)
   at org.codehaus.xfire.client.Client.invoke(Client.java:336)
at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
   at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
   at $Proxy1.setProfile(Unknown Source)
   at my.org.proj.client.TestClientXfire.main(TestClientXfire.java:72)

So the problem appears to be that the runtime classpath, which contains my custom classes, is not being passed to whatever context is created by the 'class loader'. I am launching my client app from within eclipse. Eclipse reports that the command line it uses includes my classes in its classpath, and it is only when xfire spawns some other kind of thread (presumably) that it can't see/find my classes. So the question is, how can I make my classes visible to the classloader? Or why doesn't the class loader use my runtime classpath? (Could
this possibly be an eclipse problem?)

I have tried replacing the arguments to my POJO with Strings, and that works fine; so everything is working except that org.codehaus.xfire.soap.handler.ReadHeadersHandler
doesn't know about my classes as it attempts to serialize my arguments.

I would greatly appreciate some help with this because google has not been much of a help.

Thanks,
mark

--
Mark McLaughlin
Telecommunications Software & Systems Group,
ArcLabs Research & Innovation Centre,
Waterford Institute of Technology,
Carriganore, Co Waterford,
Ireland.



---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to