| 9 January 2007 |
For a web-application I once created a web service proxy to communicate with a web service. In this same application we also communicated with BPEL by using the HumanWorkflow API. Why this is important to know I will explain later.
Creating the proxy was a really simple thing to do with JDeveloper 10.1.3. Just run the wizard and select the corresponding WSDL and voila. I had done this many times with JDev 10.1.2. but this time the generated webservice proxy gave compile errors! And I had done nothing exotic whatsoever!
The error was in the constructor of the class 'MyWebService1SoapHttpPortClient':
-
{
-
ServiceFactory factory = ServiceFactory.newInstance();
-
_port =
-
((test.ws.MyWebService1_Service)factory.loadService(test.ws.MyWebService1_Service.class)).getMyWebService1SoapHttpPort();
-
}
Of course I didn't give the service really that name. This is just an example.
The error said:
Error(22,57): method loadService(java.lang.Class) not found in class javax.xml.rpc.ServiceFactory
After some extensive search I found out the error was caused by the loaded libraries in the project. Apparently the library needed for communication with the BPEL Workflow API 'BPM Workflow' loaded some old classes that were interfering with the generated proxy classes. The issue was solved by moving the 'BPM Workflow' library downwards, so it is loaded after the ' JAX-RPC Client'.

By doing this the generated proxy compiled (and worked) fine.
Later on the development of the web-application I decided to split the functionality in different project so this issue wasn't a problem anymore, but if you are running into the same issue maybe this post will help you.


6 comments to 'Compile error when generating webservice proxies with JDeveloper 10.1.3'
10 September 2007
Hi Pascal , nice article ..! One question ..
Did you try to create a web service proxy (client) using xFire clients or another open source implementation ?
16 September 2007
Hi,
At this project I only used the 'built-in' wizard of JDeveloper to create the service proxy. In other projects at which JDeveloper wasn't used I started to use XFire.
3 October 2007
Thanks for the post! veru useful. U save me some time. .-)
20 February 2008
Thanks a lot, i was breaking my head to resolve this
3 March 2010
Had the same exact problem, this worked perfectly. Thanks!
29 May 2010
I have the same problem, but not get resolved even i did what you mentioned. I their any help...PLEAAASe i'm breaking my heart