fredag, februari 16, 2007

Changed the Connection for a JDeveloper Generated PL/SQL Web Service

Have you ever been annoyed that the JDeveloper PL/SQL Wizard is not able to change the Connection? Once you have created the Web Service, the field for the Connection is not editable. At least I have.

Unfortunately doesn't the Wizard support switching the Connection. However, it is possible to do this in another way, this has not been tested to 100%, but I have used on several occasions and it seems to do the trick. So, if you want a 100% safe solution, you should re-create the Web Services. If you do not want to do that, and want to test this approach, you should ensure to have a backup of your project before progressing. Here is how you do it:

1. Close the JDeveloper project.
2. Open the file myProject\src\mypackage\MyWebService.jaxrpc
3. Edit the entry:

<value n="PT_PLSQL_CONNECTION" v="MyConnectionName"/>

and change that to your new Connection and save the file.

4. Open the Project

5. Double click on the Web Service to open the Wizard. The new connection should now appear in the dialog. Click OK, this will re-generate the service to work towards the new connection.

Inga kommentarer:

Skicka en kommentar