You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by crmuchin <cm...@initiatesystems.com> on 2009/02/12 19:03:19 UTC

Re: problems with ws-a

Tom,

Would you mind sharing the details of how you did, or plan to, work around
this issue using handlers? I'm running into the same issue and I'm not sure
how to proceed.

To give some background, I need to write a webservice that proxies various
forms of XML data to a legacy process. It seems like a JAX-WS Provider was
the right way to go. The tricky part is that I also have to support WS-A.

Any help would be appreciated!

Craig M.



Tom Howe wrote:
> 
> I should have mentioned that this is a provider service.  So, it appears
> that I'm being affected by https://issues.apache.org/jira/browse/CXF-1591
> 
> I guess I'll need to write my own handlers for this one.
> 
> -Tom
> 
> On Tue, Jan 27, 2009 at 11:18 AM, Tom Howe <tu...@gmail.com> wrote:
> 
>> 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
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/problems-with-ws-a-tp21689910p21981485.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: problems with ws-a

Posted by Tom Howe <tu...@gmail.com>.
Well, at this stage I had the flexibility to change SOAP toolkits and I
moved to Spring-WS.  However, I made my handling abstract enough that
if/when cxf supports addressing for Providers, I will be able to port it
over.
-Tom

On Thu, Feb 12, 2009 at 12:03 PM, crmuchin
<cm...@initiatesystems.com>wrote:

>
> Tom,
>
> Would you mind sharing the details of how you did, or plan to, work around
> this issue using handlers? I'm running into the same issue and I'm not sure
> how to proceed.
>
> To give some background, I need to write a webservice that proxies various
> forms of XML data to a legacy process. It seems like a JAX-WS Provider was
> the right way to go. The tricky part is that I also have to support WS-A.
>
> Any help would be appreciated!
>
> Craig M.
>
>
>
> Tom Howe wrote:
> >
> > I should have mentioned that this is a provider service.  So, it appears
> > that I'm being affected by
> https://issues.apache.org/jira/browse/CXF-1591
> >
> > I guess I'll need to write my own handlers for this one.
> >
> > -Tom
> >
> > On Tue, Jan 27, 2009 at 11:18 AM, Tom Howe <tu...@gmail.com>
> wrote:
> >
> >> 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
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/problems-with-ws-a-tp21689910p21981485.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>


-- 
Tom Howe
Senior Software Engineer
Distributed Systems Lab
University of Chicago/Argonne National Laboratory
Sent from: Chicago Illinois United States.