Hi,

If I create a server with JaxWsServerFactoryBean, is it possible to
configure my endpoint using Spring?   It does not work when I am doing
the following.

JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
 // populate my factory with setXXX() methods.
...
factory.setStart(false);
Server server = factory.create();
configurer.configureBean(server.getEndpoint());
server.start();

I notice that the object returned by server.getEndpoint() is of type
org.apache.cxf.jaxws.support.JaxWsEndpointImpl and bean name is
<PORT_NAME>.endpoint.   In a "working case" in EndpointImpl.java, the
bean instance that gets passed to configureBean is a EndpointImpl and
the bean name is <PORT_NAME>.jaxws-endpoint.

My jaxws endpoint config looks something like this:

    <jaxws:endpoint name="{http://apache.org/hello_world_soap_http}SoapPort";
        wsdlLocation="wsdl/hello_world.wsdl" createdFromAPI="true">
        <jaxws:properties>
            <entry key="schema-validation-enabled" value="true" />
        </jaxws:properties>

        <!-- Endorser is needed in order to allow WS-Security
Credentials sent over unsecure HTTP -->
        <jaxws:features>
            <security:WSSUsernameTokenAuthServerConfig
               enableAuthorization="false" acquireISFToken="false"
               
credentialEndorser="com.iona.cxf.security.rt.NoOpCredentialEndorser"
/>
        </jaxws:features>

        <jaxws:inInterceptors>
           <ref bean="WSS4JInInterceptor"/>
           <bean class="org.apache.cxf.binding.soap.saaj.SAAJInInterceptor"/>
        </jaxws:inInterceptors>
    </jaxws:endpoint>


Thanks,
William

Reply via email to