1

I have to invoke several webservices using WS-Addressing. When invoking a webservice, the ReplyTo is set to a callback endpoint implemented by me.

The client is generated from the target WSDL using async with

<enableAsyncMapping>true</enableAsyncMapping>

which generates the Async version for each webservice with the following signature:

javax.xml.ws.Response<SampleWebServiceOutput> sampleWebService(SampleWebServiceInput input)

When invoking sampleWebService like,

Response<SampleWebServiceOutput> response = clientWsPort.sampleWebService(input);

if the request is sucessful, the server will return 202 Accepted however I can't figure out how to get it.

If I use response.get(), it will block forever since the response is sent to my callback url (WSA-Addressing Reply To)

Any clues how to know for sure if the server successfully accepted the request ?

Thank you.

sergiofbsilva
  • 1,606
  • 15
  • 20

1 Answers1

0

Apparently the response returned when you set a different reply-to address results in a null response, which could explain why it is hanging when you call response.get(). The recommended solution is to use something like getResponseContext(), which is called from the binding.

dirn
  • 19,454
  • 5
  • 69
  • 74