<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=steinwaywhw" rel="nofollow">Steinway Wu</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-8486?redirect=false" rel="nofollow">SPR-8486</a></strong> and commented</p>
<p dir="auto">I found it doesn't work under UTF-8.</p>
<p dir="auto">After going through the source code of StringHttpMessageConverter, I concludes that although StringHttpMessageConverter has a "DEFAULT_CHARSET" public static member (with default 'ISO-8859-1'), it doesn't offer corresponding setter which leads to the embarrassing that I can't configure StringHttpMessageConverter in applicationContext.xml in a common &lt;property&gt; way.</p>
<p dir="auto">I suggest that StringHttpMessageConverter should work like FormHttpMessageConverter which contains a private non-static member Charset, and offers corresponding setter for configuration.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.0.5</p>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398151059" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/14122" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/14122/hovercard" href="https://github.com/spring-projects/spring-framework/issues/14122">#14122</a> Backport constructor accepting Charset in StringHttpMessageConverter, from Spring for Android to Spring Web. (<em><strong>"duplicates"</strong></em>)</li>
</ul>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=dward_alfresco" rel="nofollow">David Ward</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-6412?redirect=false" rel="nofollow">SPR-6412</a></strong> and commented</p>
<p dir="auto">At Alfresco we found that the integration with Apache CXF 2.2.2 that worked with previous snapshots of Spring 3 does not work with RC2.</p>
<p dir="auto">We are using a set up more or less as documented here</p>
<p dir="auto"><a href="http://cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html" rel="nofollow">http://cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html</a></p>
<p dir="auto">It appears to be due to the processing of the <code class="notranslate">@PostConstruct</code> annotation on org.apache.cxf.binding.AbstractBindingFactory or org.apache.cxf.binding.soap.SoapBindingFactory. SoapBindingFactory is declared as follows in cxf-extension-soap.xml. As you can see, it has a lazy-init.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;bean id=&quot;org.apache.cxf.binding.soap.SoapBindingFactory&quot;
  class=&quot;org.apache.cxf.binding.soap.SoapBindingFactory&quot; lazy-init=&quot;true&quot;&gt;
    &lt;property name=&quot;activationNamespaces&quot;&gt;
        &lt;set&gt;
            &lt;value&gt;http://schemas.xmlsoap.org/soap/&lt;/value&gt;
            &lt;value&gt;http://schemas.xmlsoap.org/wsdl/soap/&lt;/value&gt;
            &lt;value&gt;http://schemas.xmlsoap.org/wsdl/soap12/&lt;/value&gt;
            &lt;value&gt;http://www.w3.org/2003/05/soap/bindings/HTTP/&lt;/value&gt;
            &lt;value&gt;http://schemas.xmlsoap.org/wsdl/soap/http&lt;/value&gt;
        &lt;/set&gt;
    &lt;/property&gt;
    &lt;property name=&quot;bus&quot; ref=&quot;cxf&quot;/&gt;
&lt;/bean&gt;"><pre class="notranslate"><code class="notranslate">&lt;bean id="org.apache.cxf.binding.soap.SoapBindingFactory"
  class="org.apache.cxf.binding.soap.SoapBindingFactory" lazy-init="true"&gt;
    &lt;property name="activationNamespaces"&gt;
        &lt;set&gt;
            &lt;value&gt;http://schemas.xmlsoap.org/soap/&lt;/value&gt;
            &lt;value&gt;http://schemas.xmlsoap.org/wsdl/soap/&lt;/value&gt;
            &lt;value&gt;http://schemas.xmlsoap.org/wsdl/soap12/&lt;/value&gt;
            &lt;value&gt;http://www.w3.org/2003/05/soap/bindings/HTTP/&lt;/value&gt;
            &lt;value&gt;http://schemas.xmlsoap.org/wsdl/soap/http&lt;/value&gt;
        &lt;/set&gt;
    &lt;/property&gt;
    &lt;property name="bus" ref="cxf"/&gt;
&lt;/bean&gt;
</code></pre></div>
<p dir="auto">I found that in order to get it to work I had to manually add in CommonAnnotationBeanPostProcessor and override the SoapBindingFactory to not use lazy-init, as follows:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;bean class=&quot;org.springframework.context.annotation.CommonAnnotationBeanPostProcessor&quot;/&gt;

&lt;import resource=&quot;classpath:META-INF/cxf/cxf.xml&quot; /&gt;
&lt;import resource=&quot;classpath:META-INF/cxf/cxf-extension-soap.xml&quot; /&gt;
&lt;import resource=&quot;classpath:META-INF/cxf/cxf-servlet.xml&quot; /&gt;

&lt;bean id=&quot;org.apache.cxf.binding.soap.SoapBindingFactory&quot;
  class=&quot;org.apache.cxf.binding.soap.SoapBindingFactory&quot;&gt;
    &lt;property name=&quot;activationNamespaces&quot;&gt;
        &lt;set&gt;
            &lt;value&gt;http://schemas.xmlsoap.org/soap/&lt;/value&gt;
            &lt;value&gt;http://schemas.xmlsoap.org/wsdl/soap/&lt;/value&gt;
            &lt;value&gt;http://schemas.xmlsoap.org/wsdl/soap12/&lt;/value&gt;
            &lt;value&gt;http://www.w3.org/2003/05/soap/bindings/HTTP/&lt;/value&gt;
            &lt;value&gt;http://schemas.xmlsoap.org/wsdl/soap/http&lt;/value&gt;
        &lt;/set&gt;
    &lt;/property&gt;
    &lt;property name=&quot;bus&quot; ref=&quot;cxf&quot;/&gt;
&lt;/bean&gt;"><pre class="notranslate"><code class="notranslate">&lt;bean class="org.springframework.context.annotation.CommonAnnotationBeanPostProcessor"/&gt;

&lt;import resource="classpath:META-INF/cxf/cxf.xml" /&gt;
&lt;import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" /&gt;
&lt;import resource="classpath:META-INF/cxf/cxf-servlet.xml" /&gt;

&lt;bean id="org.apache.cxf.binding.soap.SoapBindingFactory"
  class="org.apache.cxf.binding.soap.SoapBindingFactory"&gt;
    &lt;property name="activationNamespaces"&gt;
        &lt;set&gt;
            &lt;value&gt;http://schemas.xmlsoap.org/soap/&lt;/value&gt;
            &lt;value&gt;http://schemas.xmlsoap.org/wsdl/soap/&lt;/value&gt;
            &lt;value&gt;http://schemas.xmlsoap.org/wsdl/soap12/&lt;/value&gt;
            &lt;value&gt;http://www.w3.org/2003/05/soap/bindings/HTTP/&lt;/value&gt;
            &lt;value&gt;http://schemas.xmlsoap.org/wsdl/soap/http&lt;/value&gt;
        &lt;/set&gt;
    &lt;/property&gt;
    &lt;property name="bus" ref="cxf"/&gt;
&lt;/bean&gt;
</code></pre></div>
<hr>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398100024" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/11125" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/11125/hovercard" href="https://github.com/spring-projects/spring-framework/issues/11125">#11125</a> Hibernate support does not support Hibernate 3.2 (only 3.3) (<em><strong>"depends on"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398099680" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/11076" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/11076/hovercard" href="https://github.com/spring-projects/spring-framework/issues/11076">#11076</a> Behavior of Bean loading changed in RC2 (Incompatible to Apache CXF) (<em><strong>"is duplicated by"</strong></em>)</li>
</ul>
<p dir="auto">1 votes, 3 watchers</p>