How to use SOAP header in oracle SOA

To depict using SOAP header, let us consider below test case.

Perform below enhancement in the card validation system. Accept vendor name in SOAP envelope section. If vendor name is visa and credit card number is >5000, then status is valid, else if vendor name is not visa and/or credit card number<5000, status is invalid.

Implementation:

  • Modify credit card validation system xsd document to add another xsd as below.

     

  • In the WSDL document create a new message block and use the above data type.
  • Click on + to add a binding on bindings section In the WSDL document (in design mode) and select check box SOAP11. Click ok.

     

  • Expand newly created binding. After expanding click on process. Right click on input and insert inside input. click on SOAP header.


  • Select details as: Message drop down: Select the header message that was created above. Select part as payload and literal for use. Save all.

     


     

  • If you want to see this header in output as well perform the same on output as well.
  • Deploy MDS project using application deployment profile.

     

  • Click variables on BPEL global variables. click on + icon.
  • Select message type from the radio and browse to select. Message type, partner links, credit card validation BPEL process client, credit card validation.WSDL, message types, select the header message, click ok.


  • Double click on receive activity and click on header. Browse and select header variable.


     

  • Inside switch activity modify valid condition as credit card number>5000 and vendor name =’VISA’. Invalid condition as credit card number<5000 and vendor name = ‘VISA’.
  • Deploy and test project.

Leave a Reply

Your e-mail address will not be published. Required fields are marked *