Hi, I'm trying to work with ws-addressing, but I'm receiving warnings on the
server side.  I have a service defined by the following (truncated) wsdl:

<wsdl:service name="SOAPService">
        <wsdl:port binding="tns:Greeter_SOAPBinding" name="SoapOverHttp">
            <wswa:UsingAddressing xmlns:wswa="
http://www.w3.org/2005/02/addressing/wsdl"/>
        </wsdl:port>
</wsdl:service>

My service is run in this way:

EndpointImpl ep = (EndpointImpl) Endpoint.create(implementor);
ep.setWsdlLocation("src/main/resources/wsdl/hello_world.wsdl");
ep.setServiceName(new QName("http://apache.org/hello_world_soap_http";,
"SOAPService"));
ep.setEndpointName(new QName("http://apache.org/hello_world_soap_http";,
"SoapOverHttp"));
ep.getFeatures().add(new WSAddressingFeature());
ep.publish("http://localhost:9000/HelloWorld";);

and my client is run in this manner:

ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
factory.setServiceClass(Greeter.class);
factory.setAddress(endpointAddress);
factory.getFeatures().add(new WSAddressingFeature());
Greeter client = (Greeter) factory.create();
System.out.println(client.greetMe("hello"));

The soap message does contain the Addressing headers and the client produces
the following output:

Jan 27, 2009 10:33:14 AM org.apache.cxf.ws.addressing.ContextUtils storeMAPs
INFO: associating MAPs with context property
javax.xml.ws.addressing.context.outbound
Jan 27, 2009 10:33:14 AM org.apache.cxf.ws.addressing.ContextUtils
retrieveMAPs
INFO: retrieving MAPs from context property
javax.xml.ws.addressing.context.outbound
Jan 27, 2009 10:33:14 AM org.apache.cxf.ws.addressing.ContextUtils
retrieveMAPs
INFO: current MAPs [MessageId:
urn:uuid:2a1b5f9f-4f85-44b1-ad27-8a5b402cfec1, Action:
http://apache.org/hello_world_soap_http/types/Greeter/greetMe, To:
http://localhost:9000/HelloWorld, ReplyTo:
http://www.w3.org/2005/08/addressing/anonymous, FaultTo:
http://www.w3.org/2005/08/addressing/anonymous]
Jan 27, 2009 10:33:14 AM org.apache.cxf.ws.addressing.ContextUtils
retrieveMAPs
INFO: retrieving MAPs from context property
javax.xml.ws.addressing.context.outbound
Jan 27, 2009 10:33:14 AM org.apache.cxf.ws.addressing.ContextUtils
retrieveMAPs
INFO: current MAPs [MessageId:
urn:uuid:2a1b5f9f-4f85-44b1-ad27-8a5b402cfec1, Action:
http://apache.org/hello_world_soap_http/types/Greeter/greetMe, To:
http://localhost:9000/HelloWorld, ReplyTo:
http://www.w3.org/2005/08/addressing/anonymous, FaultTo:
http://www.w3.org/2005/08/addressing/anonymous]
Jan 27, 2009 10:33:14 AM org.apache.cxf.ws.addressing.soap.MAPCodec encode
INFO: Outbound WS-Addressing headers
Jan 27, 2009 10:33:14 AM org.apache.cxf.ws.addressing.soap.MAPCodec
encodeAsExposed
INFO: MessageID : urn:uuid:2a1b5f9f-4f85-44b1-ad27-8a5b402cfec1
Jan 27, 2009 10:33:14 AM org.apache.cxf.ws.addressing.soap.MAPCodec
encodeAsExposed
INFO: To : http://localhost:9000/HelloWorld
Jan 27, 2009 10:33:14 AM org.apache.cxf.ws.addressing.soap.MAPCodec
encodeAsExposed
INFO: ReplyTo : http://www.w3.org/2005/08/addressing/anonymous
Jan 27, 2009 10:33:14 AM org.apache.cxf.ws.addressing.soap.MAPCodec
encodeAsExposed
INFO: FaultTo : http://www.w3.org/2005/08/addressing/anonymous
Jan 27, 2009 10:33:14 AM org.apache.cxf.ws.addressing.soap.MAPCodec
encodeAsExposed
INFO: Action : http://apache.org/hello_world_soap_http/types/Greeter/greetMe
Jan 27, 2009 10:33:14 AM org.apache.cxf.phase.PhaseInterceptorChain
doIntercept


This certainly implies that addressing is setup properly.

However, the server produces the following output:

Jan 27, 2009 10:33:14 AM org.apache.cxf.ws.addressing.ContextUtils
retrieveMAPs
INFO: retrieving MAPs from context property
javax.xml.ws.addressing.context.inbound
Jan 27, 2009 10:33:14 AM org.apache.cxf.ws.addressing.ContextUtils
retrieveMAPs
INFO: WS-Addressing - failed to retrieve Message Addressing Properties from
context
Jan 27, 2009 10:33:14 AM org.apache.cxf.ws.addressing.soap.MAPCodec
unmarshalMAPs
INFO: Inbound WS-Addressing headers
Jan 27, 2009 10:33:14 AM org.apache.cxf.ws.addressing.ContextUtils
retrieveMAPs
INFO: retrieving MAPs from context property
javax.xml.ws.addressing.context.inbound
Jan 27, 2009 10:33:14 AM org.apache.cxf.ws.addressing.ContextUtils
retrieveMAPs
WARNING: WS-Addressing - failed to retrieve Message Addressing Properties
from context
Jan 27, 2009 10:33:14 AM org.apache.cxf.ws.addressing.MAPAggregator getMAPs


Which implies to me that server is not able to process the addressing
handlers.  So, am I misinterpreting the output or have I done something
wrong?

Thank you very much.

Tom Howe

Reply via email to