On Friday, May 27, 2011 11:19:44 AM pablo caballero wrote:
> Hi. I'm creating a WS client programmatically:
> 
> jaxWsProxyFactoryBean = new JaxWsProxyFactoryBean();
> jaxWsProxyFactoryBean.setServiceClass(MyInterface.class);
> jaxWsProxyFactoryBean.setAddress(url);
> 
> MyInterface obj = (MyInterface)jaxWsProxyFactoryBean.create();
> 
> Is there some way to specify the soap version programmatically? (the
> server url "change" and some server understands soap 1.1 and others
> only 1.2)
> 
> Thanks in advance!

I'm not exactly sure on this.   Two options to try:

1) Call:
factory.setBindingId("http://schemas.xmlsoap.org/wsdl/soap12/";);
before the create.    That MAY work.

2) Call:
factory.setBindingConfig(...)
with a SoapBindingConfiguration object configured with whatever things you 
need.

Let us know if either (or neither) work.

-- 
Daniel Kulp
[email protected]
http://dankulp.com/blog
Talend - http://www.talend.com

Reply via email to