cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: Set Soap version to 1.2 programmatically
Date Fri, 27 May 2011 18:44:22 GMT
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
dkulp@apache.org
http://dankulp.com/blog
Talend - http://www.talend.com

Mime
View raw message