Hi Saul,

Methods with arguments are supported, see the greeter demo for an
example: http://cxf.apache.org/distributed-osgi-greeter-demo-walkthrough.html.
This uses the following signature for the remote OSGi Service:
  public interface GreeterService {
    Map<GreetingPhrase, String> greetMe(String name) throws GreeterException;
  }

However, there are a couple of things that you need to be aware of:
* the types need to be appropriately visible by both the client and
the server. this is normally done by putting them in a shared bundle.
The 'Greeter Interface' bundle in the greeter example.
* invocation semantics are by-value
* generally you shouldn't make use of very complex types or types with
a lot of behaviour. Simple value types (or arrays/collections of
these) should be fine, or custom types that are built up from simple
value types should also work.

Hope this helps,

David

2009/9/9  <[email protected]>:
> Hi,
> I've got the following problem with DOSGi/CXF.
>
> I've got a Service PassObject exposed by CXF/DOSGi running on the server. 
> This service contains a method passAnObject which receives an object of type 
> MathHelper. MathHelper is an interface known both to the server and client. 
> AFAIU the server transparently creates a proxy for MathHelper when the client 
> passes a MathHelper object.
>
> Calls by the Server to methods of the MathHelper proxy only work on methods 
> without arguments. A Call to a method with arguments raises an exception. The 
> output of the server console is appended to this post.
>
> Is it unsupported to pass objects to a remote service provider? Or is this 
> some kind of bug?
>
> Sample Code is on <https://issues.apache.org/jira/browse/CXF-2420>.
>
> Thanks for your help,
> Saul Goode
>
>
> Output of server console (isGreaterZero is a method of MathHelper with an 
> argument of type int):
>
> 02.09.2009 17:29:10 org.apache.cxf.phase.PhaseInterceptorChain doIntercept
> INFO: Application has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault: isGreaterZero is not delegated.
>        at 
> org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:148)
>  ...
>

Reply via email to