Create Mediator Service from an Existing WSDL

In my previous example, I have discussed about the simple example of mediator(Hello World Example) where mediator was exposed as a service.

Now I am going to explain another example of mediator, where mediator service will be created from an existing WSDL and then will be exposed.

  1. Create a new SOA project. Right click on application -> New Gallery -> Projects -> SOA Project.Fahrenheit_Celsius_mediator_service_1
  2. Click on OK and enter project name.Fahrenheit_Celsius_mediator_service_2
  3. Click on Next and select a�?Empty Compositea��.Fahrenheit_Celsius_mediator_service_3
  4. Click on FINISH and empty composite will be created. Select a�?Mediatora�� from SOA Components palate and drag and drop it into the middle swim lane a�?Componentsa�� section of the composite. It will open the a�?Create Mediatora�� window. Enter a proper Mediator name and select template type as a�?Define Interface Latera��.Fahrenheit_Celsius_mediator_service_4
  5. Drag a SOAP service from SOA Technology palate and drop it into a�?Exposed Servicesa�� section. Enter name ‘SOAPAsService’ and select type as ‘Service’.Fahrenheit_Celsius_mediator_service_5
  6. Click on a�?Generate WSDL from schemaa�� cog icon.Fahrenheit_Celsius_mediator_service_6
  7. Below window will appear. Enter File Name and select interface type as a�?Synchronous Interfacea��.Fahrenheit_Celsius_mediator_service_7
  8. Now create input and output message. Click on green plus iconA�in a�?Input Parta��. Enter part name and select schema element as a�?singleStringa��.Fahrenheit_Celsius_mediator_service_8
  9. Create output message same like input message.Click on OK.Fahrenheit_Celsius_mediator_service_9Fahrenheit_Celsius_mediator_service_10
  10. WSDL is created for exposed SOAP service.
  11. Now again drag a SOAP service in a�?External Referencesa�� section.
  12. Enter service name and WSDL URL and then select port type and callback port type as per below screenshot.Fahrenheit_Celsius_mediator_service_11
  13. Click on OK and uncheck the a�?Maintain original directory structurea�� checkbox.Fahrenheit_Celsius_mediator_service_12
  14. The composite will look like the below screenshot.Fahrenheit_Celsius_mediator_service_13
  15. Double click on Mediator and .mplan file will open.Fahrenheit_Celsius_mediator_service_14
  16. Click on mapping icon in request part.Fahrenheit_Celsius_mediator_service_15
  17. Click on green plus icon and create a new request mapper file. Enter the file name and Click on OK.Fahrenheit_Celsius_mediator_service_16 Fahrenheit_Celsius_mediator_service_17
  18. Now map the input parameter from source to target parameter.Fahrenheit_Celsius_mediator_service_18
  19. Create same mapping for reply also.Fahrenheit_Celsius_mediator_service_19 Fahrenheit_Celsius_mediator_service_20
  20. Map the output parameter to the output of the external reference service.Fahrenheit_Celsius_mediator_service_21
  21. Now deploy the project. Refer my previous article on HelloWorld Mediator for deployment process.
  22. The project can be tested in JDeveloper itself. In your application server tab, you can find your project after deploying the project into server.
  23. Right click on project and select a�?Test Web Servicea��Fahrenheit_Celsius_mediator_service_22
  24. Below window will appear. Give input part and click on a�?Send requesta�� and it will show the output.Fahrenheit_Celsius_mediator_service_23
  25. This project can be tested from Enterprise Manager Console also. Follow the steps as mentioned in my previous article to test the project from EM Console.

I hope this article helps in understanding on how to create mediator service from an existing WSDL. Your comment will help me to improvise the content. Thank you.

Leave a Reply

Your email address will not be published. Required fields are marked *

Show my latest post here