Now I did some small modifcations to my interfaces so I created a sample
service with a method declared like:
@WebMethod(operationName = "doAdd")
String doAdd(
@WebParam(name = "a") String a,
@WebParam(name = "b") String b);

@WebMethod(operationName = "doAdd")
@WebEndpoint(name="doAdd")
Future<?> doAddAsync(
String a,
String b,
AsyncHandler<String> handler);


The server implements this (with an empty stub for the async call) and
publishes simply with:

AdderService service = new AdderService();
Endpoint.publish("http://localhost:8989/adder";, service);

The client simply creates the interface connection with:
AdderInterface adder;

JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
factory.setServiceClass(AdderInterface.class);
factory.setAddress("http://localhost:8989/adder";);
adder = (AdderInterface)factory.create();

Now, STILL, if I call the async method I get:
"javax.xml.ws.WebServiceException: Could not find wsdl:binding operation
info for web method doAddAsync."

It seems to me that CXF thinks that the operation name on the server is
"doAddAsync" despite that I explictly named it as "doAdd" in the annotation?

There should be a way to tell CXF through annotations that "for this method
stub X, call SOAP method Y on the server"?
Or am I missunderstanding what the problem is here?

I have a full sample code of the above if anyone is interested I can send
it, I cannot get this to work and I am a bit stuck right now... :-(


On 18 August 2011 00:48, Kent Närling <kent.narl...@seamless.se> wrote:

>
>
> On 17 August 2011 23:21, Kent Närling <kent.narl...@seamless.se> wrote:
>
>>
>> On 17 August 2011 18:08, Daniel Kulp <dk...@apache.org> wrote:
>>
>>> On Wednesday, August 17, 2011 4:17:58 PM Kent Närling wrote:
>>> > I tried ad-hoc and just wrote the interface myself as:
>>> >
>>> > @WebService
>>> >
>>> > public interface MyService
>>> >
>>> > {
>>> >
>>> > @WebMethod(operationName = "doSomething")
>>> >
>>> > Future<?> doSomething(
>>> >
>>> > @WebParam(name = "someParam") String someParam,
>>> > AsyncHandler<DoSomethingResult> asyncHandler);
>>> >
>>> > }
>>> > But with this I just god the error : "Could not find wsdl:binding
>>> operation
>>> > info for web method doSomething"
>>> >
>>> > So I guess this means I would have to annotate some binding
>>> information? or
>>> > is this impossible to do with annotations?
>>>
>>> You ALWAYS have to have the non-async versions there.   Thus, put your
>>> original method signature in there.   You can then optionally add the
>>> async
>>> versions as needed and only for the methods you need.
>>>
>>> Dan
>>>
>>>
>>>
>>> Does this mean that the server side will have to implement the async
>> version as well?
>> (would be a bit odd if the server has to implement the same method twice?
>>
>> Since it has to implement the same interface then it has to implement the
>> async version...
>>
>> Also, can the method name & SOAP operation name be the same? or should the
>> methods have different names?
>>
>>
>> ie in the above you are saying that I  should declare an interface as:
>>
>> @WebService
>>
>> public interface MyService
>>
>> {
>>
>> @WebMethod(operationName = "doSomething")
>>
>> DoSomethingResult doSomething(
>>
>> @WebParam(name = "someParam") String someParam);
>>
>> @WebMethod(operationName = "doSomething")
>>
>> Future<?> doSomething(
>>
>> @WebParam(name = "someParam") String someParam,
>>
>> AsyncHandler<DoSomethingResult> handler);
>>
>> }
>>
>>
>> Or?
>>
> I tried to declare it as above, still get the same error as before:
> "Could not find wsdl:binding operation info for web method doSomething"
>
> Do I have to
>

Reply via email to