cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Juan José Vázquez Delgado" <juanjo.vazq...@gmail.com>
Subject CXF Spring client: getting the message´s XML payload
Date Wed, 16 Apr 2008 11:58:47 GMT
Hi all,

I have a CXF Spring client with the next application-context configuration
file:

<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:jaxws="http://cxf.apache.org/jaxws"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
                        http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd
                           http://cxf.apache.org/jaxws
http://cxf.apache.org/schemas/jaxws.xsd">

    <context:annotation-config />

    <jaxws:client id="dummyServiceClient"
        serviceClass="services.DummyService"
        address="http://localhost:9090/DummyService"
        serviceName="s:DummyService" endpointName="e:DummyServicePort"
        xmlns:s="http://services.es/" xmlns:e="http://services.es/">
        <jaxws:features>
            <bean class="org.apache.cxf.feature.LoggingFeature" />
        </jaxws:features>
    </jaxws:client>

</beans>

This bean is injected in other beans as usual:

public class DummyServiceTest extends
AbstractDependencyInjectionSpringContextTests {

    @Autowired
    @Qualifier("services.dummyServiceClient")
    private DummyService dummyServiceClient;

    @Override
    protected String[] getConfigLocations() {
        return new String[] {

"classpath:spring/config/application-context-wsclient-test.xml"};
    }

    @SuppressWarnings("unchecked")
    public void testDummyService () {
        String greetings = dummyServiceClient.getGreetings();
    }
}

This woks for me perfectly, but now, I need to get the response´s raw XML
(soap message´s payload) before the binding. How could I do this?. Any ideas
or comments are welcome.

Thanks in advance,

Juanjo.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message