Skip to main content

JAX_WS exception Undefined operation name OperationName

3 replies [Last post]
Joined: 2007-12-13

We use JAX-WS for our Java client to access the WebService interface of our server-application. Recently we added a new operation to server's WSDL file and recompiled also the JAX-WS based client (we use the option to retrieve the wsdl file from the server during startup). But now we have a problem that the "new" JAX-WS based client doesn't work with the "old" server as we get an exception "undefined operation name" (pointing to the new operation's name) during the service.GetMyPort method call
(the idea was to retrieve WS interface version through one of the "older" operations and thus determine whether the "new" operation is already supported or not).

Is there a way with JAX-WS to say somehow that the particular operation is optional or so ? The only problem seems to be the "old" wsdl file without new operation name, as if I exchange it on the server ("old" wsdl -> "new" wsdl) everything works fine (apparently I could workaround this by using the local wsdl file within our client, but then I would have to deploy also the wsdl file with the client, right ?)

Thanks in advance for any advices

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2010-02-19

I don't suppose any of you guys have managed to solve this issue? I've got a similar one, in the sense that I have to create a client for a service with a lot optional operations. Any clues?

Joined: 2006-07-21

I'm in a similar situation where the WSDL has grown with new operations, but we want the new client to still work with the old server (where we make sure to only call the old operations).
It would be great if JAX-WS did this for us.
I think currently the best way to deal with this is to take a snapshot of the WSDL and carry that around with the client, pointing JAX-WS at the local WSDL when creating the proxy.

Joined: 2007-10-16

I have this very error. Everyone states to put the wsdl in the local project, but I've tried this and it does not solve the problem. All I did was change the name of the web service method on the server. The client returns this error despite there being no reference to the old web service method name in the client.

I have copied the wsdl to the web\WEB-INF\wsdl\[server_name]\folder for each server reference under the web service client, but still get the error. Anyone have any additional tips?