Hello,

short version:

before sending a pojo object over the network as a service invocation
result:
  Pojo[id:2,name:pojo-2,date:2008-04-01T13:24:34.655+02:00]
after receiving the object and having it deserialized:
  Pojo[id:0,name:null,date:null]

longer version:

i'm using the ServerFactoryBean to expose a java interface, by doing
something like:

wsServerFactoryBean = new ServerFactoryBean();
wsServerFactoryBean.setAddress(address);
wsServerFactoryBean.setServiceClass(serviceClass);
wsServerFactoryBean.setServiceBean(myDelegate);

Now, consider the case where the interface to be exposed is the following:
package org.objectweb.fractal.bf.connectors;
public interface Service {
    void print();

    String printAndAnswer();

    javax.xml.datatype.XMLGregorianCalendar getCurrentDate();

    Pojo getPojo();
}

and Pojo is:
public class Pojo {
    int id;

    String name;

    Pojo parent;

    XMLGregorianCalendar date;

   //all getter/setter heres have been commented
}

So, no rocket science. The interface is correctly exported, as the logs
confirm [1].

Then, this service is invoked: to do so, i build the client using the
DynamicClientFactory:
 DynamicClientFactory dcf = DynamicClientFactory.newInstance();
Client client = dcf.createClient(this.address);

I do see the following in the logs:
1-apr-2008 13.24.30
org.apache.cxf.endpoint.dynamic.DynamicClientFactoryoutputDebug
INFO: Created classes: org.objectweb.fractal.bf.connectors.GetCurrentDate,
org.objectweb.fractal.bf.connectors.GetCurrentDateResponse,
org.objectweb.fractal.bf.connectors.GetPojo,
org.objectweb.fractal.bf.connectors.GetPojoResponse,
org.objectweb.fractal.bf.connectors.ObjectFactory,
org.objectweb.fractal.bf.connectors.Pojo,
org.objectweb.fractal.bf.connectors.Print,
org.objectweb.fractal.bf.connectors.PrintAndAnswer,
org.objectweb.fractal.bf.connectors.PrintAndAnswerResponse,
org.objectweb.fractal.bf.connectors.PrintResponse

Finally, the service is invoked by the client: here I'm interested in the
getPojo() method on the Service interface. For convenience, i print the
object before marshalling the response and after the client has received it.
Here's the result:
//this is on the server-side
Before serializing the response:
Pojo[id:2,name:pojo-2,date:2008-04-01T13:24:34.655+02:00]

//this is on the client side
After object deserialization: Pojo[id:0,name:null,date:null]


I'm using the latest 2.1-incubator-SNAPSHOT versions of the CXF artifacts.

Let me know how I can be more helpful to help solving this bug.


[1]:
1-apr-2008 13.24.27
org.springframework.context.support.AbstractApplicationContextprepareRefresh
INFO: Refreshing [EMAIL PROTECTED]:
display name [EMAIL PROTECTED];
startup date [Tue Apr 01 13:24:27 CEST 2008]; root of context hierarchy
1-apr-2008 13.24.27
org.apache.cxf.bus.spring.BusApplicationContextgetConfigResources
INFO: No cxf.xml configuration file detected, relying on defaults.
1-apr-2008 13.24.27
org.springframework.beans.factory.support.DefaultListableBeanFactoryregisterBeanDefinition
INFO: Overriding bean definition for bean '
org.apache.cxf.transport.http.policy.HTTPClientAssertionBuilder': replacing
[Root bean: class [
org.apache.cxf.transport.http.policy.HTTPClientAssertionBuilder];
scope=singleton; abstract=false; lazyInit=false; autowireCandidate=true;
autowireMode=0; dependencyCheck=0; factoryBeanName=null;
factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined
in URL
[jar:file:/Users/veleno/.m2/repository/org/apache/cxf/cxf-rt-transports-http/2.1-incubator-SNAPSHOT/cxf-
rt-transports-http-2.1-incubator-SNAPSHOT.jar!/META-INF/cxf/cxf-extension-http.fixml]]
with [Root bean: class [
org.apache.cxf.transport.http.policy.HTTPClientAssertionBuilder];
scope=singleton; abstract=false; lazyInit=false; autowireCandidate=true;
autowireMode=0; dependencyCheck=0; factoryBeanName=null;
factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined
in URL
[jar:file:/Users/veleno/.m2/repository/org/apache/cxf/cxf-rt-transports-http/2.1-incubator-SNAPSHOT/cxf-
rt-transports-http-2.1-incubator-SNAPSHOT.jar!/META-INF/cxf/cxf-extension-http.fixml
]]
1-apr-2008 13.24.27
org.springframework.beans.factory.support.DefaultListableBeanFactoryregisterBeanDefinition
INFO: Overriding bean definition for bean '
org.apache.cxf.transport.http.policy.HTTPServerAssertionBuilder': replacing
[Root bean: class [
org.apache.cxf.transport.http.policy.HTTPServerAssertionBuilder];
scope=singleton; abstract=false; lazyInit=false; autowireCandidate=true;
autowireMode=0; dependencyCheck=0; factoryBeanName=null;
factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined
in URL
[jar:file:/Users/veleno/.m2/repository/org/apache/cxf/cxf-rt-transports-http/2.1-incubator-SNAPSHOT/cxf-
rt-transports-http-2.1-incubator-SNAPSHOT.jar!/META-INF/cxf/cxf-extension-http.fixml]]
with [Root bean: class [
org.apache.cxf.transport.http.policy.HTTPServerAssertionBuilder];
scope=singleton; abstract=false; lazyInit=false; autowireCandidate=true;
autowireMode=0; dependencyCheck=0; factoryBeanName=null;
factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined
in URL
[jar:file:/Users/veleno/.m2/repository/org/apache/cxf/cxf-rt-transports-http/2.1-incubator-SNAPSHOT/cxf-
rt-transports-http-2.1-incubator-SNAPSHOT.jar!/META-INF/cxf/cxf-extension-http.fixml
]]
1-apr-2008 13.24.27
org.springframework.beans.factory.support.DefaultListableBeanFactoryregisterBeanDefinition
INFO: Overriding bean definition for bean '
org.apache.cxf.transport.http.ClientOnlyHTTPTransportFactory': replacing
[Root bean: class [
org.apache.cxf.transport.http.ClientOnlyHTTPTransportFactory];
scope=singleton; abstract=false; lazyInit=true; autowireCandidate=true;
autowireMode=0; dependencyCheck=0; factoryBeanName=null;
factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined
in URL
[jar:file:/Users/veleno/.m2/repository/org/apache/cxf/cxf-rt-transports-http/2.1-incubator-SNAPSHOT/cxf-
rt-transports-http-2.1-incubator-SNAPSHOT.jar!/META-INF/cxf/cxf-extension-http.fixml]]
with [Root bean: class [
org.apache.cxf.transport.http.ClientOnlyHTTPTransportFactory];
scope=singleton; abstract=false; lazyInit=true; autowireCandidate=true;
autowireMode=0; dependencyCheck=0; factoryBeanName=null;
factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined
in URL
[jar:file:/Users/veleno/.m2/repository/org/apache/cxf/cxf-rt-transports-http/2.1-incubator-SNAPSHOT/cxf-
rt-transports-http-2.1-incubator-SNAPSHOT.jar!/META-INF/cxf/cxf-extension-http.fixml
]]
1-apr-2008 13.24.27
org.springframework.context.support.AbstractApplicationContextobtainFreshBeanFactory
INFO: Bean factory for application context [
[EMAIL PROTECTED]:
[EMAIL PROTECTED]
1-apr-2008 13.24.27
org.springframework.context.support.AbstractApplicationContext$BeanPostProcessorCheckerpostProcessAfterInitialization
INFO: Bean 'org.apache.cxf.bus.spring.Jsr250BeanPostProcessor' is not
eligible for getting processed by all BeanPostProcessors (for example: not
eligible for auto-proxying)
1-apr-2008 13.24.27
org.springframework.context.support.AbstractApplicationContext$BeanPostProcessorCheckerpostProcessAfterInitialization
INFO: Bean 'org.apache.cxf.bus.spring.BusExtensionPostProcessor' is not
eligible for getting processed by all BeanPostProcessors (for example: not
eligible for auto-proxying)
1-apr-2008 13.24.27
org.springframework.beans.factory.support.DefaultListableBeanFactorypreInstantiateSingletons
INFO: Pre-instantiating singletons in
[EMAIL PROTECTED]:
defining beans [cxf,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,
org.apache.cxf.bus.spring.BusExtensionPostProcessor,
org.apache.cxf.resource.ResourceManager,
org.apache.cxf.configuration.Configurer,
org.apache.cxf.binding.BindingFactoryManager,
org.apache.cxf.transport.DestinationFactoryManager,
org.apache.cxf.transport.ConduitInitiatorManager,
org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,
org.apache.cxf.workqueue.WorkQueueManager,
org.apache.cxf.buslifecycle.BusLifeCycleManager,
org.apache.cxf.endpoint.ServerRegistry,
org.apache.cxf.endpoint.ServerLifeCycleManager,
org.apache.cxf.endpoint.ClientLifeCycleManager,
org.apache.cxf.transports.http.QueryHandlerRegistry,
org.apache.cxf.endpoint.EndpointResolverRegistry,
org.apache.cxf.headers.HeaderManager,
org.apache.cxf.catalog.OASISCatalogManager,
org.apache.cxf.endpoint.ServiceContractResolverRegistry,
org.apache.cxf.jaxws.context.WebServiceContextResourceResolver,
org.apache.cxf.jaxws.context.WebServiceContextImpl,
org.apache.cxf.binding.soap.SoapBindingFactory,
org.apache.cxf.binding.soap.SoapTransportFactory,
org.apache.cxf.binding.soap.customEditorConfigurer,
org.apache.cxf.binding.xml.XMLBindingFactory,
org.apache.cxf.ws.addressing.policy.AddressingAssertionBuilder,
org.apache.cxf.ws.addressing.policy.AddressingPolicyInterceptorProvider,
org.apache.cxf.ws.addressing.policy.UsingAddressingAssertionBuilder,
org.apache.cxf.transport.http.policy.HTTPClientAssertionBuilder,
org.apache.cxf.transport.http.policy.HTTPServerAssertionBuilder,
org.apache.cxf.transport.http.ClientOnlyHTTPTransportFactory,
org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory]; root of
factory hierarchy
1-apr-2008 13.24.28
org.apache.cxf.service.factory.ReflectionServiceFactoryBeanbuildServiceFromClass
INFO: Creating Service
{http://connectors.bf.fractal.objectweb.org/}Servicefrom class
org.objectweb.fractal.bf.connectors.Service
1-apr-2008 13.24.28 org.apache.cxf.endpoint.ServerImpl initDestination
INFO: Setting the server's publish address to be
http://localhost:8080/Service
1 [main] INFO org.mortbay.log - Logging to org.slf4j.impl.SimpleLogger(
org.mortbay.log) via org.mortbay.log.Slf4jLog
13 [main] INFO org.mortbay.log - jetty-6.1.8
54 [main] INFO org.mortbay.log - Started [EMAIL PROTECTED]:8080

-- 
http://www.linkedin.com/in/vschiavoni
http://jroller.com/vschiavoni

Reply via email to