[ 
https://issues.apache.org/jira/browse/CXF-5942?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daniel Kulp resolved CXF-5942.
------------------------------

       Resolution: Not a Problem
    Fix Version/s: Invalid
         Assignee: Daniel Kulp

> Non-blocking WS call with CXF
> -----------------------------
>
>                 Key: CXF-5942
>                 URL: https://issues.apache.org/jira/browse/CXF-5942
>             Project: CXF
>          Issue Type: Wish
>          Components: Transports
>    Affects Versions: 3.0.0-milestone1
>            Reporter: Bence Takács
>            Assignee: Daniel Kulp
>            Priority: Minor
>              Labels: non-blocking
>             Fix For: Invalid
>
>
> It is not clear which are the use cases when one can use asynchronous client 
> calls. The possible use cases would be:
> - server-side implemented callback transport
> - server-side implemented polling transport
> - client-side only callback using non-blocking IO
> However http.asyncclient supports all of them, I see no sign of CXF 
> supporting the last one. Is there a way of calling a server this way?
> Using the configuration below I tried to call a WS this way, but CXF is 
> always looking for async binding on the server side 
> (javax.xml.ws.WebServiceException: Could not find wsdl:binding operation info 
> for web method getDataFromWebService_Async). 
> Client configuration:
> {quote}
> <jaxws:client id="client"
>     serviceClass="my.sample.SampleWebService"
>     address="http://localhost:8080/sample-ws-cxf/SampleWebService";>
>     <jaxws:properties>
>         <entry key="javax.xml.ws.client.connectionTimeout" value="10" />
>         <entry key="javax.xml.ws.client.receiveTimeout" value="11000" />
>         <entry key="org.apache.cxf.transport.http.async.usePolicy" 
> value="ALWAYS" />
>         <entry key="org.apache.cxf.transport.http.async.ioThreadCount" 
> value="2" /> 
>     </jaxws:properties>
> </jaxws:client>
> {quote}
> code:
> {quote}{noformat}
> client.getDataFromWebService_Async("" + id.getAndIncrement(), new 
> AsyncHandler<Person>() {
>     @Override
>     public void handleResponse(Response<Person> resp) {
>         Person person;
>         try {
>             person = resp.get();
>             ...
>         } catch (InterruptedException | ExecutionException e) {
>             ...
>         }
>     }
> });
> {noformat}{quote}
> If I log out the conduit, it tells that it is: 
> org.apache.cxf.transport.http.asyncclient.AsyncHTTPConduit ( 
> log.info(ClientProxy.getClient(client).getConduit().getClass().getName()); )
> I'm using cxf 3.0.1, and httpasyncclient version 4.0.1 with spring 
> 3.2.2.RELEASE



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to