Tuesday, July 15, 2014

With the release of Oracle SOA 12c, Oracle introduces many new features for developer as mentioned in my previous post. one of it is SOA Debugger in Jdeveloper which helps developer to test and debug the composite. This makes developer life really easy.

Earlier in 11g we follow below development cycle.
  • Build code in Jdeveloper
  • Deploy it to Server
  • Test it in EM console and debug it using flow traces

If we see any issue with the code then again we have to repeat above steps. But with the introduction of SOA Debugger development cycle got reduced as trouble shooting environment is provided with in Jdeveloper only.  We can add breakpoints in the code and troubleshoot it in debug mode. During debugging you can also change value of the variable or xml element.

In this post, I will show how this SOA Debugger works. We will use HelloWorld sample which we built in previous post.

Follow below steps to debug your composite using SOA Debugger.

First we need to start the debugger if already not started. You can start the debugger in two ways. 

Either by right-clicking composite file and click on Debug or click on red button in menu bar as highlighted in below screen shot.

SOA Debugger



This will open below pop-up window.

Host: This specifies the debugging server. By default it select local server but you can also choose remote server.
Port: debugger port, default value for this is 5004.
Timeout: This specifies how long the client should wait while attempting to establish a debugging session before stopping. Default value for this is 5 minutes.

Oracle SOA 12c


Now we add breakpoints to composite. We can add breakpoints to Service binding component, reference binding component, BPEL activities.

Let’s first add breakpoint to service binding component, to add break point right click on right handle of the service and choose “Create Breakpoint Pair”. Once you add it, you will see two red arrows added to it pointing to different directions, this shows that breakpoints are added for both request and response.

Oracle SOA 12c Breakpoints


Now repeat above step for reference binding component.

Oracle SOA 12c Breakpoints


Now add breakpoint for BPEL activity. To add it right click on receive activity and click on “Toggle Breakpoint”.

Oracle SOA 12c Toggle Breakpoints


With the above step we are done with setting breakpoints for the composite.

In next step we test and debug the composite. To start the debugging of the composite right click on right handle of service reference and choose “Initiate WS Debugging”.

Oracle SOA 12c Start Debugger


This should start HTTP Analyzer. Enter request message and click on send request.

Http Analyzer


You see that service reference component request breakpoint become active. You can check the request message also, to do that go to Data tab and open the soap request message. 

Oracle SOA 12c Test debugger

To move over to next breakpoint press F8. Next break point in BPEL request message, you can see the request message which passed to BPEL.

Oracle SOA 12c Test debugger


Now debugger enter the BPEL and it debug the receive activity.

Oracle SOA 12c Test debugger

  
Then it move over to assign once you press F8.


Oracle SOA 12c Assign debugger


In this way we can debug the composite, there is provision to change the request message content as well.

Once you complete you can close the debugger. To close the debugger click on red box and choose debugger, then pop-up will open, click on Terminate to close the debugger.

Oracle SOA 12c Stop debugger







2 comments :

  1. Hi,
    Do you have any idea how to debug java embedded activity in soa 12c bpel ?. I have a composite which has java embedded activity. When i start debug, the debugger should go to java embedded activity and should go to class that is mentioned in embedded activity. Is it possible ?

    ReplyDelete
  2. Hi,
    i am faceting the problem to connect debug server on my system and below error is coming ..
    Debugger attempting to connect to remote process at localhost 5004.
    .Debugger unable to connect to remote process.

    I am using development mode....

    Please help on it..

    ReplyDelete