As far as I understand you, you get and need your XML payloads in an
"untyped" format, e.g. as a Stream or DOM. In this case you should set
up the Dispatch and AsyncRespnseHandler accordingly, e.g. for
javax.transform.Source (I'm showing it for StreamSource, other Sources
accordingly):
Dispatch<StreamSource> myDispatch = myService.createDispatch(
myServiceName, StreamSource.class, Service.Mode.PAYLOAD);
StreamSource payload = getPayloadAsStreamSource();
AsyncHandler<StreamSource> myAsyncHandler = new
AsyncHandler<StreamSource>() {
public void handleResponse(Response<StreamSource> response) {
...
}
};
myDispatch.invokeAsync(payload, myAsyncHandler);
Regards,
Andreas Mattes
Talend Germany
Am 10.02.2014 12:01, schrieb Mulpuri, Krishna Sai:
> I want to make asynchronous client request to a webservice using dispatch
> api. I tried both polling and callback methods but in both cases i need to
> generate stubs and create a async handler and pass it.
>
> For Ex :
>
> I have to create AsyncHandler by passing the generated response type
>
> public class TestAsyncHandler implements
> AsyncHandler<GreetMeSometimeResponse> {
>
> private GreetMeSometimeResponse reply;
>
> ................
> ................
>
> }
>
> And in client I have to pass the async handler as an extra argument to
> invokeAsync method
> dispatch.invokeAsync(msg, asynchandler)
>
>
>
> but my requirement is to call the web service asynchronously without
> generating stubs and it is just one-way call(no need for client to wait for
> response), i didn't find any api in cxf for this requirement.
> it would be great help if someone can help me out !
>
>
> Thanks
> Sai
>
>