java - How to Configure JaxWsPortProxyFactoryBean to consume SOAP 1.2 webservice -
i need consume soap1.2 (.net hosted) webservice using jaxwsportproxyfactorybean
the following snippet of spring configuration file:
<bean id="documentuploadservicejaxwsclient"     class="org.springframework.remoting.jaxws.jaxwsportproxyfactorybean"     lazy-init="true">     <property name="serviceinterface" value="org.tempuri.idocumentuploadservice" />     <property name="namespaceuri" value="http://tempuri.org/" />     <property name="servicename" value="documentuploadservice" />     <property name="portname" value="securebinding" />     <property name="endpointaddress" ref="documentuploadserviceendpointstring" />     <property name="customproperties" ref="internetproxyproperties"  />     <property name="handlerresolver" ref="handlerresolver"/> </bean> i using spring 3.0.0. dont want go thru cxf related configuration short term solution.
i have tried (dirty solution) using soaphandlerbut server not allows me change soapenvelope @ runtime. sample code used:
soapmessage sm = messagefactory.newinstance(soapconstants.soap_1_2_protocol).createmessage(mimeheaders, new bytearrayinputstream(stream.tobytearray()));
context.setmessage(sm);
websphere gives me following:
caused by: java.lang.illegalargumentexception: wsws4117e: attempt made add soapenvelope protocol of soap 1.1 protocol soapmessage protocol of soap 1.2 protocol.
i tried setting customproperties did not helped.
i need equivalent of
<jaxws:binding>     <soap:soapbinding version="1.2" mtomenabled="true" /> </jaxws:binding>
but using jaxwsportproxyfactorybean ideally working thru simple configuration. 
any in regard highly appreciated.
many thanks
 
 
  
Comments
Post a Comment