I have been working with IBM RAD to generate a simple web services client using a WSDL. The client generation goes fine and all the classes get added to the custom package I specified.I was able to write a test program to run the client code and get the response from the service. However my problem is with a class being generated which is part of the package at client.
My service name is MessagePrintService and inside the package at client I see a class which is MessagePrintServiceProxy.java and it is as follows:
However this class is not being used anywhere and when I deleted the class,i was still able to run the client code without any issues.I tried researching on the net but couldn't find an explantion for this class.
Can someone please explain why this class is generated ,what is its use? and why is it in the package even though its not being used.
Which web service client API are you using? JAX-WS or JAX-RPC ?
There are 2 types of web service clients can be developed
1. Static : The static use case for a JAX-WS client assumes that you already have a WSDL contract (stubs are generated in case of JAX-RPC and not generated in case of JAX-WS due to use of annotations)
2. Dynamic : Used when the WSDL is not known.
The "Proxy" class you see is dynamic web service client.
I can not answer without knowing which API are you using.
Regards, Sujeeth Pakala
SCJP, SCWCD, SCBCD, ICAD, XML Master Basic, Certified SOA Professional