You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Valerio Schiavoni <va...@gmail.com> on 2008/04/01 13:34:06 UTC

Problem deserializing pojos (fields not initialized)

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 org.apache.cxf.bus.spring.BusApplicationContext@55d69b:
display name [org.apache.cxf.bus.spring.BusApplicationContext@55d69b];
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 [
org.apache.cxf.bus.spring.BusApplicationContext@55d69b]:
org.springframework.beans.factory.support.DefaultListableBeanFactory@95bf19
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
org.springframework.beans.factory.support.DefaultListableBeanFactory@95bf19:
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 SelectChannelConnector@0.0.0.0:8080

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

RE: Problem with secure connections via https

Posted by "Alpin, Luba" <Lu...@lsi.com>.
The reason that I selected frontend is:
I don't start from the zero point, I have 64 services with hundreds
methods and I didn't use *.wsdl files creation with other frameworks
that I used in past (GLUE(WebMethods) and XFire), so start create 64
wsdls contains hundreds operations description looks me crazy. CXF (at
least frontends) spend much more memory for publishing and so hard for
SSL configuration - that is my first impression. I would like it will be
by my mistake.
Regards,
Luba.
  

-----Original Message-----
From: Glen Mazza [mailto:glen.mazza@verizon.net] 
Sent: Thursday, April 03, 2008 3:13 PM
To: cxf-user@incubator.apache.org
Subject: Re: Problem with secure connections via https

I only know the wsdl2java way of doing this, and Luba in past has not
desired to go this route.  As I've said earlier, I don't think SSL with
the simple front end is a robust design that should be taught to
users.  

[1] shows how to create a wsdl2java-based web service client with a
cxf.xml file (whose contents are not relevant for SSL); the example at
the top of [2] gives a CXF.xml file that can be used at the client
(Although just looking at it, I don't think that cxf.xml is correct
because nowhere is it declaring SSL to be the protocol.  If no one else
does, I'll take a look at it.  Per Olsen's blog entry referenced at the
top of [2] gives a better example of a starter cxf.xml configuration
file for SSL.)

Glen

[1] http://www.jroller.com/gmazza/date/20070817
[2]
http://cwiki.apache.org/CXF20DOC/client-http-transport-including-ssl-sup
port.html
 

Am Donnerstag, den 03.04.2008, 07:35 -0400 schrieb Benson Margulies:
> I'm not very useful, personally, on https, hopefully Glen or someone
will
> wade in now that you've given us a full picture.
> 
> On Thu, Apr 3, 2008 at 5:52 AM, Alpin, Luba <Lu...@lsi.com>
wrote:
> 
> > You are right! I do it right now.
> >
> > I have a problem with secure connections via https,
> >
> > I tried JaxWsServerFactoryBean/JaxWsProxyFactoryBean and
> > ServerFactoryBean/ClientProxyFactoryBean result the same - service
> > publishing succeeded, but client methods call fails.
> > I got different exceptions depends on my configuration. Current my
> > sample for instance used Interceptor action -
> > WSHandlerConstants.USERNAME_TOKEN and failed with following
exception:
> > (application provided null or empty password) Next to the exception
you
> > can see my client configuration code, with password and user name
> > supplied. ('configClientInterceptors' method) and my client creation
> > code ('TestJaxWsProxyFactoryBean' method)
> > I haven't any working sample to start with to use https.
> > Can somebody help me please.
> > Regards,
> > Luba.
> >
> > org.apache.cxf.binding.soap.SoapFault: Security processing failed.
> >        at
> >
org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.handleMessage(WSS4J
> > OutInterceptor.java:184)
> >        at
> >
org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.handleMessage(WSS4J
> > OutInterceptor.java:43)
> >        at
> >
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
> > hain.java:220)
> >        at
> > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
> >        at
> > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
> >        at
> > org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> >        at
> > org.apache.cxf.frontend.ClientProxy.invoke(ClientProxy.java:68)
> >        at $Proxy15.sayHi(Unknown Source)
> >        at
> >
cxf_client.TestClient.TestClientProxyFactoryBean(TestClient.java:557)
> >        at cxf_client.TestClient.main(TestClient.java:104)
> > Caused by: org.apache.ws.security.WSSecurityException: WSHandler:
> > application provided null or empty password
> >        at
> >
org.apache.ws.security.handler.WSHandler.getPassword(WSHandler.java:638)
> >        at
> >
org.apache.ws.security.action.UsernameTokenAction.execute(UsernameTokenA
> > ction.java:31)
> >        at
> >
org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:1
> > 92)
> >        at
> >
org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.handleMessage(WSS4J
> > OutInterceptor.java:169)
> >        ... 9 more
> > Hit uncaught exception org.apache.cxf.binding.soap.SoapFault
> >
> >    private void configClientInterceptors(Client client) {
> >        String name = "myname";
> >        String password = "mypassword";
> >        String passwordKey = "password";
> >        String actions = WSHandlerConstants.USERNAME_TOKEN;
> > //in
> >        WSS4JInInterceptor wsIn = new WSS4JInInterceptor();
> >        wsIn.setProperty(WSHandlerConstants.ACTION, actions);
> >        wsIn.setProperty(WSHandlerConstants.USER, name);
> >        wsIn.setProperty(passwordKey, password);
> >        client.getInInterceptors().add(wsIn);
> >        client.getInInterceptors().add(new SAAJInInterceptor());
> > //out
> >        WSS4JOutInterceptor wsOut = new WSS4JOutInterceptor();
> >        wsOut.setProperty(WSHandlerConstants.ACTION, actions);
> >        wsOut.setProperty(WSHandlerConstants.USER, name);
> >        wsOut.setProperty(passwordKey, password);
> >
> >        client.getOutInterceptors().add(wsOut);
> >        client.getOutInterceptors().add(new SAAJOutInterceptor());
> >    }
> >
> >    public void TestJaxWsProxyFactoryBean() {
> >        JaxWsProxyFactoryBean proxyFac = new JaxWsProxyFactoryBean();
> >        Client client;
> >        proxyFac.setServiceClass(HelloWorld.class);
> >        proxyFac.setAddress(ADDRESS + "/HelloWorld");
> >
> >        HelloWorld echo = (HelloWorld) proxyFac.create();
> >
> >        client = ClientProxy.getClient(echo);
> >        HTTPConduit httpConduit = (HTTPConduit) client.getConduit();
> >        TLSClientParameters tlsParams = new TLSClientParameters();
> >        tlsParams.setSecureSocketProtocol("SSL");
> >        httpConduit.setTlsClientParameters(tlsParams);
> >
> >        HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
> >
> >        httpClientPolicy.setConnectionTimeout(36000);
> >        httpClientPolicy.setAllowChunking(false);
> >        httpConduit.getClient().setAutoRedirect(true);
> >        httpConduit.setClient(httpClientPolicy);
> >        configClientInterceptors(client);
> >        echo.sayHi("Luba");
> >    }
> >
> >
> >
> >
> >
> >
> > -----Original Message-----
> > From: Benson Margulies [mailto:bimargulies@gmail.com]
> > Sent: Wednesday, April 02, 2008 6:55 PM
> > To: cxf-user@incubator.apache.org
> > Subject: Re: Problem deserializing pojos (fields not initialized)
> >
> > Why don't you send in a new email message with a new subject line
that
> > describes exactly what you did and what didn't work. This thread was
> > about
> > the very specific question of the new configuration system for
Aegis.
> >
> > On Wed, Apr 2, 2008 at 10:33 AM, Alpin, Luba <Lu...@lsi.com>
wrote:
> >
> > > I need use secure SOAP.
> > > I succeeded with publish my services on
> > > "https://localhost:8080/ServiceName"
> > > But client methods call fails.
> > > Thanks for your time.
> > > Regards,
> > > Luba.
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: Benson Margulies [mailto:bimargulies@gmail.com]
> > > Sent: Wednesday, April 02, 2008 5:27 PM
> > > To: cxf-user@incubator.apache.org
> > > Subject: Re: Problem deserializing pojos (fields not initialized)
> > >
> > > I don't see what https has to do with this.
> > >
> >


Re: Problem with secure connections via https

Posted by Glen Mazza <gl...@verizon.net>.
I only know the wsdl2java way of doing this, and Luba in past has not
desired to go this route.  As I've said earlier, I don't think SSL with
the simple front end is a robust design that should be taught to
users.  

[1] shows how to create a wsdl2java-based web service client with a
cxf.xml file (whose contents are not relevant for SSL); the example at
the top of [2] gives a CXF.xml file that can be used at the client
(Although just looking at it, I don't think that cxf.xml is correct
because nowhere is it declaring SSL to be the protocol.  If no one else
does, I'll take a look at it.  Per Olsen's blog entry referenced at the
top of [2] gives a better example of a starter cxf.xml configuration
file for SSL.)

Glen

[1] http://www.jroller.com/gmazza/date/20070817
[2]
http://cwiki.apache.org/CXF20DOC/client-http-transport-including-ssl-support.html
 

Am Donnerstag, den 03.04.2008, 07:35 -0400 schrieb Benson Margulies:
> I'm not very useful, personally, on https, hopefully Glen or someone will
> wade in now that you've given us a full picture.
> 
> On Thu, Apr 3, 2008 at 5:52 AM, Alpin, Luba <Lu...@lsi.com> wrote:
> 
> > You are right! I do it right now.
> >
> > I have a problem with secure connections via https,
> >
> > I tried JaxWsServerFactoryBean/JaxWsProxyFactoryBean and
> > ServerFactoryBean/ClientProxyFactoryBean result the same - service
> > publishing succeeded, but client methods call fails.
> > I got different exceptions depends on my configuration. Current my
> > sample for instance used Interceptor action -
> > WSHandlerConstants.USERNAME_TOKEN and failed with following exception:
> > (application provided null or empty password) Next to the exception you
> > can see my client configuration code, with password and user name
> > supplied. ('configClientInterceptors' method) and my client creation
> > code ('TestJaxWsProxyFactoryBean' method)
> > I haven't any working sample to start with to use https.
> > Can somebody help me please.
> > Regards,
> > Luba.
> >
> > org.apache.cxf.binding.soap.SoapFault: Security processing failed.
> >        at
> > org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.handleMessage(WSS4J
> > OutInterceptor.java:184)
> >        at
> > org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.handleMessage(WSS4J
> > OutInterceptor.java:43)
> >        at
> > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
> > hain.java:220)
> >        at
> > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
> >        at
> > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
> >        at
> > org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> >        at
> > org.apache.cxf.frontend.ClientProxy.invoke(ClientProxy.java:68)
> >        at $Proxy15.sayHi(Unknown Source)
> >        at
> > cxf_client.TestClient.TestClientProxyFactoryBean(TestClient.java:557)
> >        at cxf_client.TestClient.main(TestClient.java:104)
> > Caused by: org.apache.ws.security.WSSecurityException: WSHandler:
> > application provided null or empty password
> >        at
> > org.apache.ws.security.handler.WSHandler.getPassword(WSHandler.java:638)
> >        at
> > org.apache.ws.security.action.UsernameTokenAction.execute(UsernameTokenA
> > ction.java:31)
> >        at
> > org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:1
> > 92)
> >        at
> > org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.handleMessage(WSS4J
> > OutInterceptor.java:169)
> >        ... 9 more
> > Hit uncaught exception org.apache.cxf.binding.soap.SoapFault
> >
> >    private void configClientInterceptors(Client client) {
> >        String name = "myname";
> >        String password = "mypassword";
> >        String passwordKey = "password";
> >        String actions = WSHandlerConstants.USERNAME_TOKEN;
> > //in
> >        WSS4JInInterceptor wsIn = new WSS4JInInterceptor();
> >        wsIn.setProperty(WSHandlerConstants.ACTION, actions);
> >        wsIn.setProperty(WSHandlerConstants.USER, name);
> >        wsIn.setProperty(passwordKey, password);
> >        client.getInInterceptors().add(wsIn);
> >        client.getInInterceptors().add(new SAAJInInterceptor());
> > //out
> >        WSS4JOutInterceptor wsOut = new WSS4JOutInterceptor();
> >        wsOut.setProperty(WSHandlerConstants.ACTION, actions);
> >        wsOut.setProperty(WSHandlerConstants.USER, name);
> >        wsOut.setProperty(passwordKey, password);
> >
> >        client.getOutInterceptors().add(wsOut);
> >        client.getOutInterceptors().add(new SAAJOutInterceptor());
> >    }
> >
> >    public void TestJaxWsProxyFactoryBean() {
> >        JaxWsProxyFactoryBean proxyFac = new JaxWsProxyFactoryBean();
> >        Client client;
> >        proxyFac.setServiceClass(HelloWorld.class);
> >        proxyFac.setAddress(ADDRESS + "/HelloWorld");
> >
> >        HelloWorld echo = (HelloWorld) proxyFac.create();
> >
> >        client = ClientProxy.getClient(echo);
> >        HTTPConduit httpConduit = (HTTPConduit) client.getConduit();
> >        TLSClientParameters tlsParams = new TLSClientParameters();
> >        tlsParams.setSecureSocketProtocol("SSL");
> >        httpConduit.setTlsClientParameters(tlsParams);
> >
> >        HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
> >
> >        httpClientPolicy.setConnectionTimeout(36000);
> >        httpClientPolicy.setAllowChunking(false);
> >        httpConduit.getClient().setAutoRedirect(true);
> >        httpConduit.setClient(httpClientPolicy);
> >        configClientInterceptors(client);
> >        echo.sayHi("Luba");
> >    }
> >
> >
> >
> >
> >
> >
> > -----Original Message-----
> > From: Benson Margulies [mailto:bimargulies@gmail.com]
> > Sent: Wednesday, April 02, 2008 6:55 PM
> > To: cxf-user@incubator.apache.org
> > Subject: Re: Problem deserializing pojos (fields not initialized)
> >
> > Why don't you send in a new email message with a new subject line that
> > describes exactly what you did and what didn't work. This thread was
> > about
> > the very specific question of the new configuration system for Aegis.
> >
> > On Wed, Apr 2, 2008 at 10:33 AM, Alpin, Luba <Lu...@lsi.com> wrote:
> >
> > > I need use secure SOAP.
> > > I succeeded with publish my services on
> > > "https://localhost:8080/ServiceName"
> > > But client methods call fails.
> > > Thanks for your time.
> > > Regards,
> > > Luba.
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: Benson Margulies [mailto:bimargulies@gmail.com]
> > > Sent: Wednesday, April 02, 2008 5:27 PM
> > > To: cxf-user@incubator.apache.org
> > > Subject: Re: Problem deserializing pojos (fields not initialized)
> > >
> > > I don't see what https has to do with this.
> > >
> >


Re: Problem with secure connections via https

Posted by Benson Margulies <bi...@gmail.com>.
I'm not very useful, personally, on https, hopefully Glen or someone will
wade in now that you've given us a full picture.

On Thu, Apr 3, 2008 at 5:52 AM, Alpin, Luba <Lu...@lsi.com> wrote:

> You are right! I do it right now.
>
> I have a problem with secure connections via https,
>
> I tried JaxWsServerFactoryBean/JaxWsProxyFactoryBean and
> ServerFactoryBean/ClientProxyFactoryBean result the same - service
> publishing succeeded, but client methods call fails.
> I got different exceptions depends on my configuration. Current my
> sample for instance used Interceptor action -
> WSHandlerConstants.USERNAME_TOKEN and failed with following exception:
> (application provided null or empty password) Next to the exception you
> can see my client configuration code, with password and user name
> supplied. ('configClientInterceptors' method) and my client creation
> code ('TestJaxWsProxyFactoryBean' method)
> I haven't any working sample to start with to use https.
> Can somebody help me please.
> Regards,
> Luba.
>
> org.apache.cxf.binding.soap.SoapFault: Security processing failed.
>        at
> org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.handleMessage(WSS4J
> OutInterceptor.java:184)
>        at
> org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.handleMessage(WSS4J
> OutInterceptor.java:43)
>        at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
> hain.java:220)
>        at
> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
>        at
> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
>        at
> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>        at
> org.apache.cxf.frontend.ClientProxy.invoke(ClientProxy.java:68)
>        at $Proxy15.sayHi(Unknown Source)
>        at
> cxf_client.TestClient.TestClientProxyFactoryBean(TestClient.java:557)
>        at cxf_client.TestClient.main(TestClient.java:104)
> Caused by: org.apache.ws.security.WSSecurityException: WSHandler:
> application provided null or empty password
>        at
> org.apache.ws.security.handler.WSHandler.getPassword(WSHandler.java:638)
>        at
> org.apache.ws.security.action.UsernameTokenAction.execute(UsernameTokenA
> ction.java:31)
>        at
> org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:1
> 92)
>        at
> org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.handleMessage(WSS4J
> OutInterceptor.java:169)
>        ... 9 more
> Hit uncaught exception org.apache.cxf.binding.soap.SoapFault
>
>    private void configClientInterceptors(Client client) {
>        String name = "myname";
>        String password = "mypassword";
>        String passwordKey = "password";
>        String actions = WSHandlerConstants.USERNAME_TOKEN;
> //in
>        WSS4JInInterceptor wsIn = new WSS4JInInterceptor();
>        wsIn.setProperty(WSHandlerConstants.ACTION, actions);
>        wsIn.setProperty(WSHandlerConstants.USER, name);
>        wsIn.setProperty(passwordKey, password);
>        client.getInInterceptors().add(wsIn);
>        client.getInInterceptors().add(new SAAJInInterceptor());
> //out
>        WSS4JOutInterceptor wsOut = new WSS4JOutInterceptor();
>        wsOut.setProperty(WSHandlerConstants.ACTION, actions);
>        wsOut.setProperty(WSHandlerConstants.USER, name);
>        wsOut.setProperty(passwordKey, password);
>
>        client.getOutInterceptors().add(wsOut);
>        client.getOutInterceptors().add(new SAAJOutInterceptor());
>    }
>
>    public void TestJaxWsProxyFactoryBean() {
>        JaxWsProxyFactoryBean proxyFac = new JaxWsProxyFactoryBean();
>        Client client;
>        proxyFac.setServiceClass(HelloWorld.class);
>        proxyFac.setAddress(ADDRESS + "/HelloWorld");
>
>        HelloWorld echo = (HelloWorld) proxyFac.create();
>
>        client = ClientProxy.getClient(echo);
>        HTTPConduit httpConduit = (HTTPConduit) client.getConduit();
>        TLSClientParameters tlsParams = new TLSClientParameters();
>        tlsParams.setSecureSocketProtocol("SSL");
>        httpConduit.setTlsClientParameters(tlsParams);
>
>        HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
>
>        httpClientPolicy.setConnectionTimeout(36000);
>        httpClientPolicy.setAllowChunking(false);
>        httpConduit.getClient().setAutoRedirect(true);
>        httpConduit.setClient(httpClientPolicy);
>        configClientInterceptors(client);
>        echo.sayHi("Luba");
>    }
>
>
>
>
>
>
> -----Original Message-----
> From: Benson Margulies [mailto:bimargulies@gmail.com]
> Sent: Wednesday, April 02, 2008 6:55 PM
> To: cxf-user@incubator.apache.org
> Subject: Re: Problem deserializing pojos (fields not initialized)
>
> Why don't you send in a new email message with a new subject line that
> describes exactly what you did and what didn't work. This thread was
> about
> the very specific question of the new configuration system for Aegis.
>
> On Wed, Apr 2, 2008 at 10:33 AM, Alpin, Luba <Lu...@lsi.com> wrote:
>
> > I need use secure SOAP.
> > I succeeded with publish my services on
> > "https://localhost:8080/ServiceName"
> > But client methods call fails.
> > Thanks for your time.
> > Regards,
> > Luba.
> >
> >
> >
> > -----Original Message-----
> > From: Benson Margulies [mailto:bimargulies@gmail.com]
> > Sent: Wednesday, April 02, 2008 5:27 PM
> > To: cxf-user@incubator.apache.org
> > Subject: Re: Problem deserializing pojos (fields not initialized)
> >
> > I don't see what https has to do with this.
> >
>

Problem with secure connections via https

Posted by "Alpin, Luba" <Lu...@lsi.com>.
You are right! I do it right now.

I have a problem with secure connections via https, 

I tried JaxWsServerFactoryBean/JaxWsProxyFactoryBean and 
ServerFactoryBean/ClientProxyFactoryBean result the same - service
publishing succeeded, but client methods call fails.
I got different exceptions depends on my configuration. Current my
sample for instance used Interceptor action -
WSHandlerConstants.USERNAME_TOKEN and failed with following exception:
(application provided null or empty password) Next to the exception you
can see my client configuration code, with password and user name
supplied. ('configClientInterceptors' method) and my client creation
code ('TestJaxWsProxyFactoryBean' method)
I haven't any working sample to start with to use https.
Can somebody help me please.
Regards,
Luba.

org.apache.cxf.binding.soap.SoapFault: Security processing failed.
	at
org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.handleMessage(WSS4J
OutInterceptor.java:184)
	at
org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.handleMessage(WSS4J
OutInterceptor.java:43)
	at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
hain.java:220)
	at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
	at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
	at
org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
	at
org.apache.cxf.frontend.ClientProxy.invoke(ClientProxy.java:68)
	at $Proxy15.sayHi(Unknown Source)
	at
cxf_client.TestClient.TestClientProxyFactoryBean(TestClient.java:557)
	at cxf_client.TestClient.main(TestClient.java:104)
Caused by: org.apache.ws.security.WSSecurityException: WSHandler:
application provided null or empty password
	at
org.apache.ws.security.handler.WSHandler.getPassword(WSHandler.java:638)
	at
org.apache.ws.security.action.UsernameTokenAction.execute(UsernameTokenA
ction.java:31)
	at
org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:1
92)
	at
org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor.handleMessage(WSS4J
OutInterceptor.java:169)
	... 9 more
Hit uncaught exception org.apache.cxf.binding.soap.SoapFault

    private void configClientInterceptors(Client client) {
        String name = "myname";
        String password = "mypassword";
        String passwordKey = "password";
        String actions = WSHandlerConstants.USERNAME_TOKEN;
//in
        WSS4JInInterceptor wsIn = new WSS4JInInterceptor();
        wsIn.setProperty(WSHandlerConstants.ACTION, actions);
        wsIn.setProperty(WSHandlerConstants.USER, name);
        wsIn.setProperty(passwordKey, password);
        client.getInInterceptors().add(wsIn);
        client.getInInterceptors().add(new SAAJInInterceptor());
//out
        WSS4JOutInterceptor wsOut = new WSS4JOutInterceptor();
        wsOut.setProperty(WSHandlerConstants.ACTION, actions);
        wsOut.setProperty(WSHandlerConstants.USER, name);
        wsOut.setProperty(passwordKey, password);

        client.getOutInterceptors().add(wsOut);
        client.getOutInterceptors().add(new SAAJOutInterceptor());
    }

    public void TestJaxWsProxyFactoryBean() {
        JaxWsProxyFactoryBean proxyFac = new JaxWsProxyFactoryBean();
        Client client;
        proxyFac.setServiceClass(HelloWorld.class);
        proxyFac.setAddress(ADDRESS + "/HelloWorld");
        
        HelloWorld echo = (HelloWorld) proxyFac.create();

        client = ClientProxy.getClient(echo);
        HTTPConduit httpConduit = (HTTPConduit) client.getConduit(); 
        TLSClientParameters tlsParams = new TLSClientParameters();
        tlsParams.setSecureSocketProtocol("SSL"); 
        httpConduit.setTlsClientParameters(tlsParams); 

        HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();

        httpClientPolicy.setConnectionTimeout(36000);
        httpClientPolicy.setAllowChunking(false); 
        httpConduit.getClient().setAutoRedirect(true); 
        httpConduit.setClient(httpClientPolicy); 
        configClientInterceptors(client);
        echo.sayHi("Luba");
    }






-----Original Message-----
From: Benson Margulies [mailto:bimargulies@gmail.com] 
Sent: Wednesday, April 02, 2008 6:55 PM
To: cxf-user@incubator.apache.org
Subject: Re: Problem deserializing pojos (fields not initialized)

Why don't you send in a new email message with a new subject line that
describes exactly what you did and what didn't work. This thread was
about
the very specific question of the new configuration system for Aegis.

On Wed, Apr 2, 2008 at 10:33 AM, Alpin, Luba <Lu...@lsi.com> wrote:

> I need use secure SOAP.
> I succeeded with publish my services on
> "https://localhost:8080/ServiceName"
> But client methods call fails.
> Thanks for your time.
> Regards,
> Luba.
>
>
>
> -----Original Message-----
> From: Benson Margulies [mailto:bimargulies@gmail.com]
> Sent: Wednesday, April 02, 2008 5:27 PM
> To: cxf-user@incubator.apache.org
> Subject: Re: Problem deserializing pojos (fields not initialized)
>
> I don't see what https has to do with this.
>

Re: Problem deserializing pojos (fields not initialized)

Posted by Benson Margulies <bi...@gmail.com>.
Why don't you send in a new email message with a new subject line that
describes exactly what you did and what didn't work. This thread was about
the very specific question of the new configuration system for Aegis.

On Wed, Apr 2, 2008 at 10:33 AM, Alpin, Luba <Lu...@lsi.com> wrote:

> I need use secure SOAP.
> I succeeded with publish my services on
> "https://localhost:8080/ServiceName"
> But client methods call fails.
> Thanks for your time.
> Regards,
> Luba.
>
>
>
> -----Original Message-----
> From: Benson Margulies [mailto:bimargulies@gmail.com]
> Sent: Wednesday, April 02, 2008 5:27 PM
> To: cxf-user@incubator.apache.org
> Subject: Re: Problem deserializing pojos (fields not initialized)
>
> I don't see what https has to do with this.
>

RE: Problem deserializing pojos (fields not initialized)

Posted by "Alpin, Luba" <Lu...@lsi.com>.
I need use secure SOAP.
I succeeded with publish my services on
"https://localhost:8080/ServiceName"
But client methods call fails.
Thanks for your time.
Regards,
Luba.



-----Original Message-----
From: Benson Margulies [mailto:bimargulies@gmail.com] 
Sent: Wednesday, April 02, 2008 5:27 PM
To: cxf-user@incubator.apache.org
Subject: Re: Problem deserializing pojos (fields not initialized)

I don't see what https has to do with this.

Re: Problem deserializing pojos (fields not initialized)

Posted by Benson Margulies <bi...@gmail.com>.
I don't see what https has to do with this.

RE: Problem deserializing pojos (fields not initialized)

Posted by "Alpin, Luba" <Lu...@lsi.com>.
Thanks,
I need help to run it on https.
Regards,
Luba. 

-----Original Message-----
From: Valerio Schiavoni [mailto:valerio.schiavoni@gmail.com] 
Sent: Wednesday, April 02, 2008 5:03 PM
To: cxf-user@incubator.apache.org
Subject: Re: Problem deserializing pojos (fields not initialized)

It works fine

On Wed, Apr 2, 2008 at 3:06 PM, Benson Margulies <bi...@gmail.com>
wrote:

> Create an AegisContext, set the flag in there, push it into the
> AegisDatabinding.
>

For the curious ones, here's the code for the client (server is the
same):

clientProxyfactoryBean = new ClientProxyFactoryBean();
        clientProxyfactoryBean.setServiceClass(clazz);
        clientProxyfactoryBean.setAddress(address);
        final AegisDatabinding aegisDatabinding = new
AegisDatabinding();
        AegisContext aegisCtx = new AegisContext();
        aegisCtx.setReadXsiTypes(true);
        aegisDatabinding.setAegisContext(aegisCtx);
        clientProxyfactoryBean.getServiceFactory().setDataBinding(
                aegisDatabinding);

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

Re: Problem deserializing pojos (fields not initialized)

Posted by Valerio Schiavoni <va...@gmail.com>.
It works fine

On Wed, Apr 2, 2008 at 3:06 PM, Benson Margulies <bi...@gmail.com>
wrote:

> Create an AegisContext, set the flag in there, push it into the
> AegisDatabinding.
>

For the curious ones, here's the code for the client (server is the same):

clientProxyfactoryBean = new ClientProxyFactoryBean();
        clientProxyfactoryBean.setServiceClass(clazz);
        clientProxyfactoryBean.setAddress(address);
        final AegisDatabinding aegisDatabinding = new AegisDatabinding();
        AegisContext aegisCtx = new AegisContext();
        aegisCtx.setReadXsiTypes(true);
        aegisDatabinding.setAegisContext(aegisCtx);
        clientProxyfactoryBean.getServiceFactory().setDataBinding(
                aegisDatabinding);

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

Re: Problem deserializing pojos (fields not initialized)

Posted by Benson Margulies <bi...@gmail.com>.
Create an AegisContext, set the flag in there, push it into the
AegisDatabinding.

RE: Problem deserializing pojos (fields not initialized)

Posted by "Alpin, Luba" <Lu...@lsi.com>.
I really would like to help, but I don't know I don't use it.
Regards,
Luba.


-----Original Message-----
From: Valerio Schiavoni [mailto:valerio.schiavoni@gmail.com] 
Sent: Wednesday, April 02, 2008 4:02 PM
To: cxf-user@incubator.apache.org
Subject: Re: Problem deserializing pojos (fields not initialized)

Hello ,

your code works fine, and infact my tests are now green-like-grass.

The only minor issue is that:

AegisDatabinding.WRITE_XSI_TYPE_KEY

is deprecated in the 2.1-SNAPSHOT release I've been using.

What should I use instead ?

On Tue, Apr 1, 2008 at 2:38 PM, Alpin, Luba <Lu...@lsi.com> wrote:

> Following works good:
>
> Server:
> -------
> ServerFactoryBean  svrFactory = new ServerFactoryBean();
>    HashMap<String, Object> props = new HashMap<String, Object>();
>                props.put(AegisDatabinding.WRITE_XSI_TYPE_KEY, true);
>                ArrayList<String> l = new ArrayList<String>();
>                l.add(YourCustomClassName.class.getName());
>                props.put(AegisDatabinding.OVERRIDE_TYPES_KEY, l);
>
>                svrFactory.setServiceClass(InterfaceClassName.class);
>                svrFactory.setAddress(address);
>                svrFactory.setServiceBean(InterfaceImpl);
>                svrFactory.getServiceFactory().setDataBinding(new
> AegisDatabinding());
>                svrFactory.setProperties(props);
>                svrFactory.getServiceFactory().setProperties(props);
>                svrFactory.create();
>
> Client (not dynamic):
> ---------------------
> Map<String, Object> props = new HashMap<String, Object>();
>                 props.put(AegisDatabinding.WRITE_XSI_TYPE_KEY,
> Boolean.TRUE);
>                 //props.put(AegisDatabinding.READ_XSI_TYPE_KEY,
> "false");
>                 List<String> l = new ArrayList<String>();
>                 l.add(YourCustomClassName.class.getName());
>                 props.put(AegisDatabinding.OVERRIDE_TYPES_KEY, l);
>                ClientProxyFactoryBean factory = new
> ClientProxyFactoryBean();
>                factory.setProperties(props);
>                factory.getServiceFactory().setProperties(props);
>                factory.setServiceClass(InterfaceClassName.class);
>                factory.setAddress(address);
>                factory.getServiceFactory().setDataBinding(new
> AegisDatabinding());
>
>     InterfaceClassName client = factory.create();
>
>        Object o = client.yourMethod();
>
>
>
>
> -----Original Message-----
> From: Valerio Schiavoni [mailto:valerio.schiavoni@gmail.com]
> Sent: Tuesday, April 01, 2008 2:43 PM
> To: cxf-user@incubator.apache.org
> Subject: Re: Problem deserializing pojos (fields not initialized)
>
> ehm..i forgot to had copy/paste this line to the example code
showcasing
> the
> problem:
>
> wsServerFactoryBean.getServiceFactory().setDataBinding(new
> AegisDatabinding());
>
>
> so: same error as before..
>
>
> --
> http://www.linkedin.com/in/vschiavoni
> http://jroller.com/vschiavoni
>



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

Re: Problem deserializing pojos (fields not initialized)

Posted by Valerio Schiavoni <va...@gmail.com>.
Hello ,

your code works fine, and infact my tests are now green-like-grass.

The only minor issue is that:

AegisDatabinding.WRITE_XSI_TYPE_KEY

is deprecated in the 2.1-SNAPSHOT release I've been using.

What should I use instead ?

On Tue, Apr 1, 2008 at 2:38 PM, Alpin, Luba <Lu...@lsi.com> wrote:

> Following works good:
>
> Server:
> -------
> ServerFactoryBean  svrFactory = new ServerFactoryBean();
>    HashMap<String, Object> props = new HashMap<String, Object>();
>                props.put(AegisDatabinding.WRITE_XSI_TYPE_KEY, true);
>                ArrayList<String> l = new ArrayList<String>();
>                l.add(YourCustomClassName.class.getName());
>                props.put(AegisDatabinding.OVERRIDE_TYPES_KEY, l);
>
>                svrFactory.setServiceClass(InterfaceClassName.class);
>                svrFactory.setAddress(address);
>                svrFactory.setServiceBean(InterfaceImpl);
>                svrFactory.getServiceFactory().setDataBinding(new
> AegisDatabinding());
>                svrFactory.setProperties(props);
>                svrFactory.getServiceFactory().setProperties(props);
>                svrFactory.create();
>
> Client (not dynamic):
> ---------------------
> Map<String, Object> props = new HashMap<String, Object>();
>                 props.put(AegisDatabinding.WRITE_XSI_TYPE_KEY,
> Boolean.TRUE);
>                 //props.put(AegisDatabinding.READ_XSI_TYPE_KEY,
> "false");
>                 List<String> l = new ArrayList<String>();
>                 l.add(YourCustomClassName.class.getName());
>                 props.put(AegisDatabinding.OVERRIDE_TYPES_KEY, l);
>                ClientProxyFactoryBean factory = new
> ClientProxyFactoryBean();
>                factory.setProperties(props);
>                factory.getServiceFactory().setProperties(props);
>                factory.setServiceClass(InterfaceClassName.class);
>                factory.setAddress(address);
>                factory.getServiceFactory().setDataBinding(new
> AegisDatabinding());
>
>     InterfaceClassName client = factory.create();
>
>        Object o = client.yourMethod();
>
>
>
>
> -----Original Message-----
> From: Valerio Schiavoni [mailto:valerio.schiavoni@gmail.com]
> Sent: Tuesday, April 01, 2008 2:43 PM
> To: cxf-user@incubator.apache.org
> Subject: Re: Problem deserializing pojos (fields not initialized)
>
> ehm..i forgot to had copy/paste this line to the example code showcasing
> the
> problem:
>
> wsServerFactoryBean.getServiceFactory().setDataBinding(new
> AegisDatabinding());
>
>
> so: same error as before..
>
>
> --
> http://www.linkedin.com/in/vschiavoni
> http://jroller.com/vschiavoni
>



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

RE: Problem deserializing pojos (fields not initialized)

Posted by "Alpin, Luba" <Lu...@lsi.com>.
Following works good:

Server:
-------
ServerFactoryBean  svrFactory = new ServerFactoryBean();
    HashMap<String, Object> props = new HashMap<String, Object>();
                props.put(AegisDatabinding.WRITE_XSI_TYPE_KEY, true);
                ArrayList<String> l = new ArrayList<String>();
                l.add(YourCustomClassName.class.getName());
                props.put(AegisDatabinding.OVERRIDE_TYPES_KEY, l);

                svrFactory.setServiceClass(InterfaceClassName.class);
                svrFactory.setAddress(address);
                svrFactory.setServiceBean(InterfaceImpl);
                svrFactory.getServiceFactory().setDataBinding(new
AegisDatabinding());
                svrFactory.setProperties(props);
                svrFactory.getServiceFactory().setProperties(props);
                svrFactory.create();

Client (not dynamic):
---------------------
Map<String, Object> props = new HashMap<String, Object>();
                 props.put(AegisDatabinding.WRITE_XSI_TYPE_KEY,
Boolean.TRUE);
                 //props.put(AegisDatabinding.READ_XSI_TYPE_KEY,
"false");
                 List<String> l = new ArrayList<String>();
                 l.add(YourCustomClassName.class.getName());
                 props.put(AegisDatabinding.OVERRIDE_TYPES_KEY, l);
                ClientProxyFactoryBean factory = new
ClientProxyFactoryBean();
                factory.setProperties(props);
                factory.getServiceFactory().setProperties(props);
                factory.setServiceClass(InterfaceClassName.class);
                factory.setAddress(address);
                factory.getServiceFactory().setDataBinding(new
AegisDatabinding());

     InterfaceClassName client = factory.create();

	Object o = client.yourMethod();




-----Original Message-----
From: Valerio Schiavoni [mailto:valerio.schiavoni@gmail.com] 
Sent: Tuesday, April 01, 2008 2:43 PM
To: cxf-user@incubator.apache.org
Subject: Re: Problem deserializing pojos (fields not initialized)

ehm..i forgot to had copy/paste this line to the example code showcasing
the
problem:

wsServerFactoryBean.getServiceFactory().setDataBinding(new
AegisDatabinding());


so: same error as before..


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

Re: Problem deserializing pojos (fields not initialized)

Posted by Valerio Schiavoni <va...@gmail.com>.
ehm..i forgot to had copy/paste this line to the example code showcasing the
problem:

wsServerFactoryBean.getServiceFactory().setDataBinding(new
AegisDatabinding());


so: same error as before..


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