Hi Christian,
thanks a lot.
I added javax.activation, javax.xml.bind, javax.xml.bind.annotation,
javax.xml.bind.attachment and org.apache.cxf.jaxb.attachment to my
Import-Package list and javax.activation to
org.osgi.framework.bootdelegation
and now it (nearly) works. I now can invoke the methods without any
exception
within the server. But something seems to go wrong with
marshalling/unmarshalling. The method 'getCustomersByName' has a String as
parameter and should return a List of Customer (custom data type). In my
dummy
implementation, I fill the list with two customers and return it:
> public java.util.List<com.example.customerservice.Customer>
> getCustomersByName(java.lang.String name) throws NoSuchCustomerException
> {
> LOG.info("Executing operation getCustomersByName");
> System.out.println(name);
> try {
> java.util.List<com.example.customerservice.Customer> _return =
> new java.util.Vector<com.example.customerservice.Customer>();
> com.example.customerservice.Customer customer = new
> com.example.customerservice.Customer();
> customer.setName(name);
> _return.add(customer);
> _return.add(new com.example.customerservice.Customer());
> System.out.println("size: "+_return.size());
> System.out.println("getCustomersByName.return: " +
> _return.get(0).getName());
> return _return;
> } catch (Exception ex) {
> ex.printStackTrace();
> throw new RuntimeException(ex);
> }
> //throw new NoSuchCustomerException("NoSuchCustomerException...");
> }
When I run the server without OSGi, everything is fine and the client
receives
a list of size two and can print the name. But when I run the server within
OSGi, the client receives a list (not null) of size zero.
In the other method, the server gets an object of Customer, that is created
in
and send by the client. In this case, the marshalling/unmarshalling works as
expected.
Maybe someone also has a hint for me on this.
Best Regards,
Markus
--
View this message in context:
http://cxf.547215.n5.nabble.com/WSDL-first-CustomerService-example-as-OSGi-bundle-tp3208411p3209014.html
Sent from the cxf-user mailing list archive at Nabble.com.