Hi,

You can use the below code to get the conduit.

Client client = ClientProxy.getClient(soap);
HTTPConduit http = 
            (HTTPConduit) client.getConduit();
        
HTTPClientPolicy httpClientPolicy = http.getClient();


Willem.



Asleson, Ryan wrote:
> 
> 
> Hi Willem,
> 
> 
> The example here:
> 
> http://www.nabble.com/Proxy-settings-tf3669285.html#a10252318
> 
> 
> Is just what I was hoping to see.
> 
> One last question:  In the example it talks about using the Conduit to
> set the proxy server and proxy host.  However, how do I get a reference
> to the conduit?  This is the code I'm using right now:
> 
>         ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
>         factory.setServiceClass(ReceiveSoap.class);
>  
> factory.setAddress("http://www.endpoint.com/webservice.InviteeLink/recei
> ve.asmx");
>         ReceiveSoap soap = (ReceiveSoap) factory.create();
>         soap. .....
> 
> So I have a reference to my client object, but how do I get to the
> conduit?
> 
> Thank you so much for your help, I really appreciate it!!
> 
> -Ryan
> 
> 
> 
> 
> 
> 
> 
> -----Original Message-----
> From: Willem Jiang [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, October 25, 2007 5:23 AM
> To: [email protected]
> Subject: Re: CXF First Time User Questions
> 
> Hi Ryan,
> 
> My comments are in the mail.
> 
> Asleson, Ryan wrote:
>> Hi Willem,
>>
>> Thanks for the pointers.  They were quite helpful.
>>
>> I'm still having trouble understanding how an http proxy host and http
> 
>> proxy port can be specified.  This URL:
>>
>>  
>> http://cwiki.apache.org/CXF20DOC/client-http-transport.html
>>
>>
>> Briefly mentions something about a http-conf:proxyAuthorization tag, 
>> but it doesn't give an example of how to actually specifiy the proxy 
>> host and server.  In addition, there doesn't seem to be a schema 
>> definition available for help.
>>
>>   
> You can find more information here [1]
> [1]http://www.nabble.com/using-HTTP-firewall-proxy-with-CXF-Spring-confi
> g-tf4232625.html#a12042089
>> Could you please be more explicit on how to set up proxy information?
>> I've got to believe that this is a FAQ, especially for those of us in 
>> corporate settings.
>>   
> En, I will update the wiki for it.
>> I would really rather specify the proxy host and server 
>> programmatically via Java rather than declaratively via XML.  Is this 
>> not possible at all?
>>   
> You could configure the conduit through the Java code.
> You can find the sample here[2]
> [2]http://www.nabble.com/Proxy-settings-tf3669285.html#a10252318
> 
> Regards,
> 
> Willem.
>> Thank you!!
>>
>> -Ryan
>>
>>
>>
>> -----Original Message-----
>> From: Jiang, Ning (Willem) [mailto:[EMAIL PROTECTED]
>> Sent: Wednesday, October 24, 2007 9:52 AM
>> To: [email protected]; [email protected]
>> Subject: RE: CXF First Time User Questions
>>
>>
>> Hi
>>
>> Please see my comments in the mail.
>>
>> -----Original Message-----
>> From: Asleson, Ryan [mailto:[EMAIL PROTECTED]
>> Sent: Wed 10/24/2007 21:38
>> To: [email protected]
>> Subject: CXF First Time User Questions
>>  
>>  
>> Hello,
>>  
>> I'm a first time user of CXF.  I've used other web service tools in 
>> the past and am now looking at using CXF.  I have a series of 
>> questions that I hope somebody can answer for me:
>>  
>> 1.  I used the WSDL2Java tool to generate a web service client from a 
>> WSDL.  I noticed that none of the generated code contains the web 
>> service endpoint URL.  Where does this come from?  Am I supposed to 
>> supply it programmatically at runtime?  If so, how?
>>
>> <Willem> For the server side , you can specify the endpoint publish by
> 
>> using the JAXWS API's Endpoint.publish or by ServerFactoryBean's 
>> setAddress method.
>>
>> <Willem>For the client side , it mainly come from the WSDL and you can
> 
>> also changed it by using the ProxyFactoryBean's setAddress method.
>>
>> <Willem>You can find more information about the client side setting 
>> here[1]
>> [1]http://www.nabble.com/Client-question-tf4357978.html#a12419843
>>  
>>  
>> 2.  Related to #1, is there a way to define, programmatically, the web
> 
>> service endpoint URL?  We are a web service consumer, but the web 
>> service provider has a testing and a production environment.  I need 
>> to be able to specify, at runtime, the endpoint to use, rather than 
>> having to specify it at compile time.  Like many organizations, we 
>> promote code through various testing environments to a production 
>> environment, and I'd hate to have to specify a web service endpoint
> URL at compile time.
>>
>> <Willem> I think I already give you the answer.
>>  
>>  
>> 3.  Is there a way, programmatically, to specify a proxy server and 
>> proxy port?  Our environment does not use the standard http.proxyHost 
>> and http.proxyPort system variables (don't ask me why) so I need a way
> 
>> to programmatically set the proxy server and proxy port for a web 
>> service client.
>>
>> <Willem> You can specify it in the configuration file [2] 
>> [2]http://cwiki.apache.org/CXF20DOC/client-http-transport.html
>>
>> 4.  Is there any way that WSDL2Java can generate Java 1.4 compliant 
>> code?  I see the output of WSDL2Java uses annotations.  Unfortunately 
>> we're not yet on Java 1.5 (it should be happening soon) but the 
>> reality is that we're currently still on 1.4.  Do I have any options 
>> here or do I have to use another tool?
>>
>> <Willem> No, CXF do not support JDK1.4, our work is based on the JAXWS
> 
>> API which heavily uses the JDK 1.5's annotations.
>>
>> Willem.
>>  
>>  
>> Thank you!!!
>>  
>> -Ryan
>>  
>>  
>>
>> This e-mail message is being sent solely for use by the intended
>> recipient(s) and may contain confidential information.  Any 
>> unauthorized review, use, disclosure or distribution is prohibited.  
>> If you are not the intended recipient, please contact the sender by 
>> phone or reply by e-mail, delete the original message and destroy all
> copies. Thank you.
>>
>>
>> This e-mail message is being sent solely for use by the intended
> recipient(s) and may contain confidential information.  Any unauthorized
> review, use, disclosure or distribution is prohibited.  If you are not
> the intended recipient, please contact the sender by phone or reply by
> e-mail, delete the original message and destroy all copies. Thank you.
>>
>>   
> 
> This e-mail message is being sent solely for use by the intended
> recipient(s) and may contain confidential information.  Any unauthorized
> review, use, disclosure or distribution is prohibited.  If you are not the
> intended recipient, please contact the sender by phone or reply by e-mail,
> delete the original message and destroy all copies. Thank you.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/CXF-First-Time-User-Questions-tf4684485.html#a13407484
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to