Hi,

Sorry, did not find enough time to analyse that.

See my comments below:

> -----Original Message-----
> From: Guzmán Llambías [mailto:[email protected]]
> Sent: Freitag, 14. Februar 2014 18:30
> To: [email protected]
> Subject: Re: wsa-action missing in decoupled responses
> 
> Hi Andrei,
> 
> first of all, thanks for the quick answer!
> 
> >>Just checked that wsa:Action is set for decoupled response in my test
> >>case.
> 
> sorry, but maybe I didn't express correctly, but is the response to the 
> client that
> doesn't have the wsa:Action and not the docoupled response to the decoupled
> endpoint

I am a bit confused here: is the problem that the client does not receive 
response to decoupled endpoint at all or some wsa properties are missing in 
response?

> >>How you activate decoupled response, by setting wsa:ReplyTo endpoint
> >>or via conduit? Could you post me the client code as well?
> 
> I don't use the conduit, I use the wsa:replyTo
> 

ok

> >>Just as the test, could you try to set SOAP action on the service side
> >>and see if wsa:Action changed accordingly:
> >>@Resource
> >>private WebServiceContext wsContext;
> >>...
> >>wsContext.getMessageContext().put(SoapBindingConstants.SOAP_ACTION,
> >>"myTestOperation");
> 
> I test your suggestion and the client's response didn't change. What changed
> here was the wsa:Action of the response to the decoupled endpoint.
> 
> here's my client's code:
> 
> String wsaAction = "http://abitab.com.uy/servicios/addressing/add";;
> String wsaReplyTo =
> "http://localhost:8080/AddressingEndpoint/AddressingEndpointServlet";;
> String wsaTo = "http://localhost:8080/service";;
> 
> URL wsdlURL = new
> URL("file:/F:/workspace/switchyard/AbitabClient/src/AddressingSampleImpl.xm
> l");
> AddressingSampleImplService service = new
> AddressingSampleImplService(wsdlURL);
> AddressingSample port = service.getAddressingSampleImplPort(new
> AddressingFeature(true, true));
> BindingProvider bp = (BindingProvider)port;
> 
> configureAddressingProperties(bp, wsaTo, wsaAction, wsaReplyTo); port.add(1,
> 2);
> 
> private static void configureAddressingProperties(BindingProvider bp, String
> wsaTo, String wsaAction, String replyTo) throws URISyntaxException
>        {
>           AddressingProperties props = new AddressingPropertiesImpl();
> 
>           AttributedURIType wsaActionUri = new AttributedURIType();
>           wsaActionUri.setValue(wsaAction);
>           props.setAction(wsaActionUri);
> 
>           EndpointReferenceType ref = new EndpointReferenceType();
>           AttributedURIType wsaReplyToURI = new AttributedURIType();
>           wsaReplyToURI.setValue(replyTo);
>           ref.setAddress(wsaReplyToURI);
>           props.setReplyTo(ref);
> 
>           AttributedURIType messageID = new AttributedURIType();
>           messageID.setValue("urn:uuid:"+UUIDGenerator.getUUID());
>           props.setMessageID(messageID);
> 
> 
> bp.getRequestContext().put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTI
> ES,
> props);
> }

Basically it is enough just to set ReplyTo property. Message ID and wsaAction 
will be set automatically by CXF.
You can take as a sample following system test: 
https://svn.apache.org/repos/asf/cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java
testEchoProviderAsyncDecoupledEndpoints(). It shows using of decoupled 
endpoints with asynchronous API.

It will be helpful if you provide a small project to illustrate the problem.

Regards,
Andrei.

> 
> Regards
> Guzmán
> 
> -----Mensaje original-----
> From: Andrei Shakirin
> Sent: Friday, February 14, 2014 2:41 PM
> To: [email protected]
> Subject: RE: wsa-action missing in decoupled responses
> 
> Hi,
> 
> Just checked that wsa:Action is set for decoupled response in my test case.
> How you activate decoupled response, by setting wsa:ReplyTo endpoint or via
> conduit? Could you post me the client code as well?
> 
> Just as the test, could you try to set SOAP action on the service side and 
> see if
> wsa:Action changed accordingly:
> @Resource
> private WebServiceContext wsContext;
> ...
> wsContext.getMessageContext().put(SoapBindingConstants.SOAP_ACTION,
> "myTestOperation");
> 
> Regards,
> Andrei.
> 
> > -----Original Message-----
> > From: Guzmán Llambías [mailto:[email protected]]
> > Sent: Freitag, 14. Februar 2014 15:54
> > To: [email protected]
> > Subject: wsa-action missing in decoupled responses
> >
> > Hi guys!
> >
> > I’m working with ws-addressing with decoupled responses and I’m having
> > some trouble. My client calls the WS, the WS responds to the client
> > and to the decoupled endpoint, but the answer is never processed by
> > the client.
> > Looking at
> > the answer, I found that the wsa:Action is missing and that’s the
> > reason the client cannot understand the answer is from the service.
> >
> > Here’s the WS response to the client:
> >
> > <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
> > <soap:Header>
> > <MessageID
> > xmlns="http://www.w3.org/2005/08/addressing";>urn:uuid:d133fb60-70c7-
> > 4a93-a293-7f8c89e6896c</MessageID>
> > <To
> >
> xmlns="http://www.w3.org/2005/08/addressing";>http://www.w3.org/2005/08
> > /
> > addressing/anonymous</To>
> > <ReplyTo xmlns="http://www.w3.org/2005/08/addressing";>
> > <Address>http://www.w3.org/2005/08/addressing/none</Address>
> > </ReplyTo>
> > </soap:Header>
> > <soap:Body/>
> > </soap:Envelope>
> >
> > Here’s my Service config:
> >
> > @WebService(targetNamespace="http://abitab.com.uy/servicios/addressing
> > ")
> > @Stateless
> > @SecurityDomain("JBossWS")
> > @Addressing(enabled=true,required=true)
> > @Features(features = "org.apache.cxf.feature.LoggingFeature")
> > public class AddressingSampleImpl implements AddressingSample {
> >
> >     @WebMethod(action="http://abitab.com.uy/servicios/addressing/add";)
> >     public int add(@WebParam(name="num1")  int a,
> > @WebParam(name="num2")  int b) throws NegativeNumberException {
> >         if (a < 0 || b <0)
> >             throw new NegativeNumberException("Input data has negative
> > numbers");
> >         try {
> >             Thread.sleep(25000);
> >         } catch (InterruptedException e) {
> >             e.printStackTrace();
> >         }
> >         return a+b;
> >     }
> >
> > any idea what I’m missing?
> >
> > Thanks in advance
> > Guzmán

Reply via email to