On Wednesday 13 February 2008, yulinxp wrote:
> User's guide shows how to configure HTTPConduit for client using java
> code
>
> http://cwiki.apache.org/CXF20DOC/client-http-transport-including-ssl-s
>upport.html
>
>   import org.apache.cxf.endpoint.Client;
>   import org.apache.cxf.frontend.ClientProxy;
>   import org.apache.cxf.transport.http.HTTPConduit;
>   import
> org.apache.cxf.transports.http.configuration.HTTPClientPolicy; ...
>
>   Client client = ClientProxy.getClient(poltim);
>   HTTPConduit http = (HTTPConduit) client.getConduit();
>
> Here the example uses org.apache.cxf.frontend.ClientProxy.
>
> 1) Do JAX-WS FrontEnd & Simple FrontEnd have anything to do with
> client? 

Nope.  Shouldn't make any difference.   The ClientProxy class is actually 
in the simple frontend.

> 2) how to configure HTTPConduit for client if client needs to 
> set AegisDatabinding using ClientProxyFactoryBean?
> (Or how to set HTTPConduit & AegisDatabinding for client at the same
> time?)

Same was as with jax-ws I would guess.   

>
>   ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
>   factory.setServiceClass(HelloWorld.class);
>  
> factory.setAddress("http://localhost:9090/spring_http/ServerEndPoint";)
>; factory.getServiceFactory().setDataBinding(new AegisDatabinding());
> HelloWorld hw = (HelloWorld)factory.create();
>
>     .....                                        <---- how to set
> HTTPConduit ???

Client client = ClientProxy.getClient(hw);
HTTPConduit http = (HTTPConduit) client.getConduit();


>   String response = hw.sayHi("hello");
>   System.out.println("Response: " + response);


-- 
J. Daniel Kulp
Principal Engineer, IONA
[EMAIL PROTECTED]
http://www.dankulp.com/blog

Reply via email to