Tags
Let us learn to share this Post your MDS and other servers, but for that you must already have created our Commons.jar file pursuant to Part 1: Creating and Configuring MDS
In this example, we will create the above WSDL, the <wsdl: binding>, <wsdl: port> and create an XML file called ConfigPlan.xml, however exists in the Oracle documentation yet another way to do this, however I will speak of this in another post.
Step One: Creation of tags “binding” and “operation” in the WSDL
- “binding” or better, <wsdl:binding> where in we will have a tag called <wsdl:operation> and this tag will be responsible for calling the operation in the <wsdl: portType> your WSDL
- “service” or better, <wsdl:service>, here we will have a tag called <wsdl:port> to be responsible for making reference to the <wsdl: binding> and yet within this tag <wsdl:port> will have the <soap:address> that have the server to which we endPoint reference.
Step Two: We should create a file called ConfigPlan which is an XML file to be sent along our project, and within this file is the reference to the <wsdl:port> to insert the WSDL
Difficult? Nothing, see how it is simple: -)
See the links below to see the other parts:
- Part 1: Creating and Configuring MDS
- Part 2: Referencing existing projects to MDS
- Part 3: Sharing the MDS and other servers
Let’s use our SelectDBAdapter project as an example, but only to show you where we enter our references in the WSDL and then how we can create the file ConfigPlan.xml.
A note here is very important that we use our SelectDBAdapter project as an example, however it does not make reference to an external service, in this case, is not calling any other WSDL another BPEL or some other service exposed in Service BUS, but if you had should enter the other server name in the case is the reference we created <wsdl:port> of your WSDL, as follows:
First we create a folder named binds the term “vincular“ our Portuguese within our apps folder
Upon apps folder click the right button and click New
Click on Folder and click OK
In the screenshot below in Folder Name binds place and click OK
We will then have the following structure
Note: The readme.txt file is created automatically, you can delete it without any problem.
See how simple it is inserting the binds and ports in the WSDL, let’s take our SelectDBAdapter project to make our tests.
Perform normally deploy the project and do the following:
In your browser go to http://localhost:10000/em
Note: The port 10000 is the number that I chose to create my Domain.
Login:
Click on your project: SelectDBAdapter[1.0]
Click Test
Copy the URL in this WSDL as follows:
In the case: http://localhost:10000/soa-infra/services/default/SelecDBAdapter/selecdbadapterbpelprocess_client_ep?WSDL
Now paste the URL into your browser:
Now right click on the screen: Display Source Code
Select all contents of this screen and copy
Now in its JDeveloper, go to the folder you created called binds and right click New …
Select File and click OK
In the screenshot below File Name: Enter a name for your your wsdl:
In my case put: SelecDBAdapterBPELBinding.wsdl (It is your choice to put any name you like)
In the screenshot below click Source of your WSDL
Cole now the file content we put on your browser and save the file
See in line import that he is not locating the SelecDBAdapterBPELProcess.xsd xsd, then change the schemaLocation path as below:
schemaLocation=”../xsd/SelecDBAdapterBPELProcess.xsd”
See above on your WSDL that has been automatically created our <wsdl:biding> and our <wsdl:service>
Note: Actually the <wsdl:biding> and <wsdl:service> were created automatically when we copy the URL in the browser
Note that the tag <soap:address> that endPoint is referencing to http://localhost:8080/..
However, in order to play this design on other servers just you DOUBLE the <wsdl:port> putting the address of endPoint the other server and changing the name of our Port.
See below:
See what changed:
From The: <wsdl:port name=”SelecDBAdapterBPELProcess_pt”
For To: <wsdl:port name=”SelecDBAdapterBPELProcess_pt_OutroServidor”
From The: <soap:address location=”http://localhost:10000/
For To: <soap:address location=”http://200.1.1.0:5200/
So that you understand, this name that changed the <wsdl:port name will be used by our ConfigPlan file to reference the binding of our WSDL ;-)
Note: For each server you want to run our deployment we must create another <wsdl:port
So far our WSDL has been successfully configured.
Now let’s create our ConfigPlan file should reference to our WSDL.
Go to your JDeveloper and within the SelectDBAdapter project, right on top of your composite.xml click Generate Config Plan
In the screenshot below it will now automatically put the SelecDBAdapter_cfgplan.xml name, then just rename the end of the name for the server name that you put into your port there in your WSDL, need not be the same name but something that you know is that server, then click OK
Below the file was successfully generated
As I explained here, our SelectDBAdapter project does not make reference to an external service, in this case, is not calling (Invoke) some other WSDL another BPEL or some other service exposed in Service BUS, but had it you should enter the name of the another server in case the reference is created in the <wsdl:port> of your WSDL, as follows:
ConfigPlan file:
Your WSDL where we create the <wsdl:port>:
See what will be his <wsdl:port> that will make reference to our ConfigPlan, so understand that if we have another server that will have a endPoint (wsdl:address) different, then we also have another ConfigPlan aquivo this other server and not to forget to put that in reference ConfigPlan and WSDL file as above figures:
But once again understand that in the case of our SelectDBAdapter project would not be necessary to put this name <wsdl:port> in our ConfigPlan because our SelectDBAdapter project makes no reference to any other BPEL or BUS as already explained above
Now let’s do the deploy our Commons.jar file and then our SelectDBAdapter project with our file ConfigPlan.xml
Note: If you have not created the Commons.jar file, do the procedure as previous post Part 1: Creating and Configuring MDS
In your browser go to http://localhost:10000/em
Note: The port 10000 is the number that I chose to create my Domain.
Login:
On the left side click on the + sign next to SOA then click the right button below soa-infra (AdminServer), go to Adminstration and click MDS Configuration
In the Import metadata documents from an archive option on the machine where this is web browser running click Browse and choose the location where your Commons.jar file, and then click Import
Click Close after seeing the message “Import Operation – Completed Sucessfully”
Note: In this case in my Commons.jar only had 8 documents to be imported.
Now let’s deploy our SelectDBAdapter project with our ConfigPlan.xml
In his Enterprise Manager (http://localhost:10000/em)
On the left side click the + sign next to SOA then click the right button below soa-infra (AdminServer), go to SOA Deployment and click Deploy
In Archive or Exploded Directory, highlight the Archive option is on the machine where this web browser is running and Browse to select the location where your .jar file (sca_SelectDBAdapter_rev1.0.jar)
In Configuration Plan, highlight the Configuration option plan is on the machine where this web browser is running and Browse to select the location where your .xml file (SelectDBAdapter_cfgplan_OutroServidor.xml) and click Next
In the screenshot below, if not selected in SOA Partition select default and click Next
Let selected the Deploy option the default revision and click Deploy
Below that his deployment was successful and is now pointing to the endPoint corresponding server.
Doubts? Leave your comment
Hugs and to the Next
/:-D