Java Integration
Transform Anything with Java
Creating a HelloWorld OSB Service
To create a HelloWorld Service, we need to have a webservice running. We will use the WSDL. This is called a BusinessService.
We will also create a ProxyService which will have the actual implementation.
1. Open Eclipse > File > New > Oracle Service Bus Project > Name it as helloworld > Finish.

4. Drag a stage to the request pipeline.
5. Right click on the helloworld project > New Business Service. On the transport page, specify a URI that can result in an XML file.
6. Go back to the proxy service and on the Stage Actions > Communications > Drag a Service callout.
2. As soon as the project is created, it is a good practice to create the following folders that is applicable.
-
BusinessService
-
ProxyService
-
xsd
-
wsdl
-
artifacts
In our case, we will create everything except artifacts
3. Right click on the BusinessService folder and create new Business Service.
4. On the General Tab > Select the wsdl URL and the port type of the endpoint service that is already available. Eclipse will import the wsdl and the xsd into the project.
5. Right click on the Business Service > Oracle Service Bus > Generate Proxy Service. Now Eclipse will automatically generate the proxy service.

The proxy service will have the routing automatically created. Since this is the basic program, we will not change anything.
6. Right click on the project > Export > Oracle Service Bus - Configuration Jar. A jar file will be created containing all the components.
Note : The wsdl and xsd will be created in the project folder, we should move the same to the respective locations and make sure there are no errors. If there are any special characters in the name of the files, that needs to be fixed.
7. Open OSB Console > Create Session.
8. Goto System Administration > Import Resources and choose the jar file that we created.

9. Import the project. Now OSB will tell you the list of files that will be imported.

Still the work is not completed.
10. Activate the session > Give comments and submit.
Now to test the service, goto Project Explorer > Hello World > Proxy Services > There will be a small button to launch test console.

Once you test, you should be able to see the instance created in the SOA Enterprise Manager.

