Hi all,
I tried to do the proxy server setting with cxf.xml for the client to access
remote webservices. It seems that this configuration file will be ignored. I
attempted to put this file on the classpath or use a url as the
configuration location... Nothing works. I didn't get any error, even
thought I changed this xml file as unwellformed xml!
In our application, we have one webservicClient implementation for each
webservice. They are managed by a webserviceClientProxy. A Client call the
webserviceClientProxy to pick the webserviceClient to invoke remote
webservices.
================================
Here is a snapshot of my serviceClientImpl:
================================
public class SessionWebServiceClientImpl implements SessionWebServiceClient
{

                private String serviceURL;
                private SessionWebService serviceClient;
                private JaxWsProxyFactoryBean clientProxyFactory;

                public SessionWebServiceClientImpl() throws
WebServiceClientInstantiationException {
                        /* Instantiate the service */
                        this.clientProxyFactory = new JaxWsProxyFactoryBean();
                        this.serviceURL =
CXFWebServiceClientProxy.this.databaseConnector.getServiceConnector().getSessionServiceURL().toString();
                        
this.clientProxyFactory.setServiceClass(SessionWebService.class);
                        this.clientProxyFactory.setAddress(this.serviceURL);
                        this.serviceClient = (SessionWebService)
this.clientProxyFactory.create();
                        Client client =
this.clientProxyFactory.getClientFactoryBean().getClient();
                        HTTPConduit conduit = (HTTPConduit) client.getConduit();
                        HTTPClientPolicy clientPolicy = new HTTPClientPolicy();
                        clientPolicy.setReceiveTimeout(
                                
CXFWebServiceClientProxy.this.databaseConnector.getServiceConnector()
                                .getSessionServiceTimeout().getMilliSeconds()
                                );
                        conduit.setClient(clientPolicy);
                }

public SessionServiceResult login(String account, String password, String
actorURI) {....}

public SessionServiceResult logout() {....}
}
========================================
Here is a snapshot of Client to invoke the webservice:
========================================
WebServiceClientProxyFactory proxyFactory = new
WebServiceClientProxyFactory(baseConfigDir);
// generate ClientProxy for the framework cxf
WebServiceClientProxy clientProxy =
proxyFactory.createProxy("CXF",databaseURI);
// generate the ServiceClient
SessionWebServiceClient sessionWebServiceClient =
clientProxy.getSessionWebServiceClient();
SessionServiceResult serviceResult = sessionWebServiceClient.login(account,
password, null);
Here is a snapshot of Client to invoke the webservice:
======================================
cxf.xml is defined like this  http://www.nabble.com/file/p23219526/cxf.xml
cxf.xml 
======================================

Can you tell me what is wrong with it?

Thank u in advance,

Ming

-- 
View this message in context: 
http://www.nabble.com/cxf.xml-doesn%27t-work-with-client-tp23219526p23219526.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to