0

I found a question that asks the opposite of what I'm trying to do here.

Adding methods to the webservice: do old clients need to update web references?

But, basically I have a web service that I inherited and there were originally grand plans but ultimately only a handful of methods were actually being called. I'd like to remove to clean up the code some.

It is used only internally and I can verify the only methods being used. The problem is that I can't update the client wsdl at the moment. So if I remove the calls from the web service but the clients wsdl isn't updated does that cause problems?

Keep in mind I am completely positive these methods aren't used as it's all internal and we control the programs that use the web service. We can update the wsdl for the clients the next time these programs are updated but that will likely be next year.

Community
  • 1
  • 1

1 Answers1

0

Not sure if you already found an answer to this. Even we had a similar requirement wherein the service provider had shared us a WSDL and later removed some not required @WebMethods from the Web service implementation file.

However, on invocation of the other methods there was an error as below which led to the conclusion that the WSDL file is validated during the web service call.

javax.xml.ws.WebServiceException: Method XXXXX is exposed as WebMethod, but there is no corresponding wsdl operation with name XXXX in the wsdl:portType

We changed the approach to read the WSDL file locally by having an entry in jax-ws-catalog.xml but even then on dynamically binding the end point the WSDL at remote server was validated and gave the same error.

And yes adding a new method does not cause a harm from the client invocation.

Hope the answer helps.

Saurav
  • 118
  • 9
  • So, I ended up just testing it locally and it appears to work even with everything removed. I don't know if what I'm doing is more along the lines of undefined behavior or not and I'll ultimately test it on a web server. I'm hoping that it will work at least until I can fix the client programs next year. – Jarrett Robertson Oct 06 '15 at 16:08