Hello all,

i found a problem with 
http://cwiki.apache.org/CXF20DOC/client-http-transport.html
<http-conf:conduit name=
"{http://apache.org/hello_world_soap_http}SoapPort.http-conduit";>
    <http-conf:client Connection="Keep-Alive"
                      MaxRetransmits="1"
                      AllowChunking="false" />
  </http-conf:conduit>


in combination with 
<bean class=
"org.springframework.context.annotation.CommonAnnotationBeanPostProcessor"
/>

problem is that org.apache.cxf.transport.http.HTTPConduit contains several 
@Resource annotations .. but i don't need (want) to set these properties.

Caused by: 
org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique 
bean of type [org.apache.cxf.configuration.security.AuthorizationPolicy] 
is defined: Unsatisfied dependency of type [class 
org.apache.cxf.configuration.security.AuthorizationPolicy]: expected at 
least 1 matching bean
        at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:614)
        at 
org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:418)
        at 
org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:497)
        at 
org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:193)
        at 
org.springframework.beans.factory.annotation.InjectionMetadata.injectMethods(InjectionMetadata.java:116)
        at 
org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:301)
        ... 90 more


i wanted to use something like this

        <bean name=
"{http://www.deltavista.at/schema/locationsearch}LocationSearchPort.http-conduit";
 
class="org.apache.cxf.transport.http.HTTPConduit">
                <constructor-arg>
                        <ref bean="cxf"/>
                </constructor-arg>
                <property name="client">
                        <bean class=
"org.apache.cxf.transports.http.configuration.HTTPClientPolicy">
                                <property name="allowChunking" value=
"false" />
                        </bean>
                </property>
        </bean>
but i don't have endpointInfo in hand ...because client is create (and 
also recreated in some cases) on the fly using code below.
how can i modify this code to disable http chunking if required?

JAXBDataBinding.clearCaches();

                                JaxWsProxyFactoryBean factory = new 
JaxWsProxyFactoryBean();
                                factory.setServiceClass(serviceInterface);
                                factory.setAddress(address);
                                factory.setWsdlLocation(wsdlLocation);
                                factory.setServiceName(QName.valueOf(
serviceName));
                                factory.setProperties(new HashMap<String, 
Object>());
                                factory.getProperties().put(Message.
SCHEMA_VALIDATION_ENABLED, new Boolean(schemaValidationEnabled));
                                factory.setEndpointName(QName.valueOf(
portName));
                                if (username != null) {
                                        factory.setUsername(username);
                                }
                                if (password != null) { 
                                        factory.setPassword(password);
                                }
                                LoggingFeature f = new LoggingFeature();
                                f.setLimit(1024*1024); // 1MB limit of log 
message ... temp file otherwise
                                List<AbstractFeature> ff = 
factory.getFeatures();
                                if (ff == null) {
                                        ff = new 
ArrayList<AbstractFeature>();
                                        factory.setFeatures(ff);
                                }
                                ff.add(f);
                                T port = (T) factory.create();
 
thanks 


best regards
jano

Reply via email to