Need to reterive the payload from SOA-INFRA dehydration tables.

Hi gurus,
I've raised couple of SRs with Oracle and did not got appropriate response. So I think there are a lot of g8 minds also working here.
Requirement:
I need to reterive the payload in the xml format and store in a db table for certain process.
Steps followed:
Created a soa process which accepts the InstanceId and ECID as input and provides them to a java class using Java embed activity. The class that accepts that input and connect to getCompositeInstances() using a locator class. In this process it will make use of another two classes to convert the instance payload to dom and then to display. The mainclass uses the XMLUtil and XPathUtils classes for this requirement.
When I ran the three classes then I'm able to get the payload, but when called using the Javaembed I'm running into trouble. I'm getting a null value, not even any exception. I tried removing the catch in all the classes but no luck. Please find the below code in the Java embed and the java classes also.
Code in Java Embed:
try
setCompositeInstanceTitle("Composite HelloWorld123");
String ecid =(String) getVariableData("Input_java_ecid");
String compInstanceId =(String) getVariableData("Input_Java_instanceid");
addAuditTrailEntry("Payload_ecid is: " + ecid);
addAuditTrailEntry("Payload_insta is: " + compInstanceId);
Blob2String.MainClass mc = new Blob2String.MainClass();
String inputPayload = mc.getCompositeInstancePayload(compInstanceId, ecid);
if(inputPayload == null)
addAuditTrailEntry("inputPayload is*********"+inputPayload+".........");
InsertIntoDB ir = new InsertIntoDB();
ir.InsertMethod1(inputPayload,compInstanceId,ecid) ;
/*//addAuditTrailEntry("Payload is: " + inputPayload);
String StringPayload =(String)inputPayload;
addAuditTrailEntry("StringPayload is: " + StringPayload);
setVariableData("Java_Payload", StringPayload); */
catch(Exception e)
addAuditTrailEntry("Exception is: " + e);
e.printStackTrace();
Code in MainClass:
package Blob2String;
import java.util.*;
import javax.naming.Context;
import oracle.soa.management.facade.ComponentInstance;
import oracle.soa.management.facade.CompositeInstance;
import oracle.soa.management.facade.Locator;
import oracle.soa.management.facade.LocatorFactory;
import org.w3c.dom.*;
import oracle.soa.management.util.*;
import oracle.fabric.common.*;
import oracle.fabric.logging.*;
import oracle.fabric.logging.BaseMessageBundle;
public class MainClass {
/* public MainClass() {
super();
public String getCompositeInstancePayload(String compInstanceId,String ecid)
String compositeName="GetOpenCompositeInstances";
Hashtable jndiProps = new Hashtable();
String inputPayload="";
try
jndiProps.put(Context.PROVIDER_URL,"t3://abc.xyz.com:9102/soa-infra");
jndiProps.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
jndiProps.put(Context.SECURITY_PRINCIPAL,"weblogic");
jndiProps.put(Context.SECURITY_CREDENTIALS,"welcome123");
jndiProps.put("dedicated.connection","true");
Locator locator = LocatorFactory.createLocator(jndiProps);
CompositeInstanceFilter filter = new CompositeInstanceFilter();
filter.setECID(ecid);//Set the composite ECID
filter.setId(compInstanceId);//Set the composite instance id
List<CompositeInstance> compositeInstance = locator.getCompositeInstances(filter);
ComponentInstanceFilter instanceFilter = new ComponentInstanceFilter();
instanceFilter.setCompositeInstanceId (compInstanceId); //Set the composite instance id
List<ComponentInstance> componentInstance = compositeInstance.get(0).getChildComponentInstances(instanceFilter);
if (compositeInstance.size() > 0) {
Document docAudit = XMLUtil.convertToDOM(componentInstance.get(0).getAuditTrail().toString());
String payloadAudit = XPathUtils.executeXPath(docAudit, "//details").toString();
Document docPayload = XMLUtil.convertToDOM(payloadAudit);
Node payloadNode = XPathUtils.executeXPath(docPayload, "//part//*", "NODE");
inputPayload = XMLUtil.nodeToString(payloadNode);
//System.out.println(inputPayload);
catch(Exception e){
// e.printStackTrace();
System.out.println(e);
return inputPayload;
public static void main(String[] args){
MainClass Obj = new MainClass();
String result=Obj.getCompositeInstancePayload("60004" , "d90df5a0fd2bc5c7:4d37316b:13da0ebcf67:-8000-00000000000003ca") ;
//String result=Obj.getCompositeInstancePayload("16952862" , "ef14bd96767c0e08:-152cfeeb:13d2379cff3:-8000-000000000008c968") ;
// System.out.println(result);
Code in XMLUtil:
package Blob2String;
import org.xml.sax.InputSource;
import java.io.*;
import javax.xml.parsers.*;
import javax.xml.transform.*;
import javax.xml.transform.*;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.w3c.dom.*;
import org.xml.sax.InputSource;
import oracle.fabric.logging.*;
public class XMLUtil {
* @param inputXML
* @return
* @throws Exception
public static Document convertToDOM(String inputXML) throws Exception {
Document dom = null;
try {
DocumentBuilderFactory factory =
DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
//DocumentBuilder builder = new org.apache.xerces.jaxp.DocumentBuilderFactoryImpl().newDocumentBuilder();
InputSource is = new InputSource(new StringReader(inputXML));
dom = builder.parse(is);
} catch (Exception ex) {
throw ex;
return dom;
public static String nodeToString(Node node) throws Exception{
StringWriter sw = new StringWriter();
try {
Transformer t = new org.apache.xalan.processor.TransformerFactoryImpl().newTransformer();
t.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
t.setOutputProperty(OutputKeys.INDENT, "yes");
t.transform(new DOMSource(node), new StreamResult(sw));
} catch (TransformerException te) {
System.out.println("nodeToString Transformer Exception");
throw te;
return sw.toString();
Code in XPathUtils :
package Blob2String;
import javax.xml.xpath.*;
import org.w3c.dom.*;
import oracle.fabric.logging.*;
public class XPathUtils {
public static Object executeXPath(Document doc, String xpathStr) throws Exception{
XPath xpath = null;
String value = null;
try {
XPathFactory factory = XPathFactory.newInstance();
XPath xpath1= factory.newXPath();
//xpath = new org.apache.xpath.jaxp.XPathFactoryImpl().newXPath();
XPathExpression expr = xpath1.compile(xpathStr);
value = (String)expr.evaluate(doc, XPathConstants.STRING);
return value;
} catch (Exception e) {
throw e;
public static Node executeXPath(Document doc, String xpathStr,String type) throws Exception{
XPath xpath = null;
Node value = null;
try {
xpath = new org.apache.xpath.jaxp.XPathFactoryImpl().newXPath();
XPathExpression expr = xpath.compile(xpathStr);
value = (Node)expr.evaluate(doc, XPathConstants.NODE);
return value;
} catch (Exception e) {
throw e;
Its an urgent issue and I have the deadline to get on with. I've raised SR with oracle but there was no use. Kindly help me. Help will be greatly appreciated.
Thanks,
Venkatesh.

are you trying to retreive the payload for a completed/closed instance or for an inflight instance? if it is for inflight instance you can retreive the payload using
String [] params = new String[] {"inputVariable"};
String payload = locator.executeComponentInstanceMethod(bpelInstanceId, "getVariableAsString", params);
http://docs.oracle.com/cd/E21043_01/apirefs.1111/e10659/oracle/soa/management/facade/Locator.html#executeComponentInstanceMethod_java_lang_String__java_lang_String__java_lang_Object___
if it is for a completed instance, you need to get the input payload for the instance then you can get it from the audit trail. i think your xpath is not correct. the data in details look like this:
</event><event sid="BpSeq0.3" cat="2" wikey="2020-BpRcv0-BpSeq0.3-1" state="5" n="4" label="receiveInput" date="2013-03-25T13:14:05.428-07:00" type="2"><message><![CDATA[Received "process" call from partner "client"]]></message><details><![CDATA[
<input><part name="payload" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><ns1:input xmlns:ns1="http://samples.otn.com/bpel2.0/ch10.7">7</ns1:input></part></input>]]></details>
you need extract the CDATA content and parse again. this query needs to be changed, there could be many details in the audit trail, you need to pick the right one.
XPathUtils.executeXPath(docAudit, "//details").toString();
this audit xml is namespace aware so you need to use this, choose the first details.
public static NodeList selectNodes( org.w3c.dom.Element pElement,
String xpathExpression,
Map prefixNamespaceMapping ) throws Exception
Edited by: murugac on Apr 1, 2013 10:00 AM

Similar Messages

  • Getting the payload from a faulted process

    I'm using the fault framework and I need to know how to get the payload from the faulted process. I have a custom java logger that uses the locator API, but I'm finding out that this will only work if the process has been persisted to the dehydration store. Is there another way to get the payload? I know I can use checkpoint/wait within the bpel process to force dehydration but I'm looking for another alternative

    The problem is the cube instance table has not been populated yet for the instance. So from a faulted instance that has NOT been dehydrated to cube instance, how will I get to the invoke_message table, or how will I get the payload from the faulted instance.
    I'm able to get the document fine when the cube_instance table is populated, my problem is sometimes the instance has not been dehydrated and cube_instance is not available. So from a faulted instance how will I get to the invoke_message table without using the cube_instance table

  • I have the djay app on my ipad and i want to record the set i'm playing on my iphone through garageband. i need to take the sound from the headphone jack of the ipad, as the 30pin connector will be used to connect to the DJLive accessory. Is this possibl?

    i have the djay app on my ipad and i want to record the set i'm playing on my iphone through garageband. i need to take the sound from the headphone jack of the ipad, as the 30pin connector will be used to connect to the DJLive accessory. Is this possibl?reco

    You may get a better response in this community:
    https://discussions.apple.com/community/app_store/garageband_for_ios

  • How to copy the payload from onMessage Activity in BPEL interface

    Hi All,
    how to copy the payload from onMessage Activity in BPEL interface when it is there at the starting of the process and when clicking on the OnMessage Activity
    i'm able to see the View XML Document link. By Clicking on View XML Document Payload is getting opened for me but at this point i'm not able to copy the payload and more over the scroll bar is also not there.
    When i'm saving it as .xml i'm able to see the payload but not in an xml format.
    When trying the payload in SOAPUI it's not getting reformatted.
    How can we solve the issue.
    Regards,
    CH

    The input payload can be seen from "Audit Trail" tab and "Flow" tab of any BPEL instance. The XML shown in "Flow" tab are not rightly formatted XMLs and you may not able to copy them "as is" to a text editor. But, the XML shown in "Audit Trail" should be in the right XML format and you should be able to click on any audit trail entry and copy the XML payload to a text editor. soapUI should also be able to format such XMLs without any issue. Just make sure that you don't overwrite soap header/body section when pasting to soapUI request.

  • Needed to copy the share from one server to share in another server

    Hi ,
    Needed to copy the data from one share named as xyz in the server 1 to the another share abc in another server 2.
    Share xyz data should be copied to the share abc which has already different data in it .We need to copy all the data from the share xyz to the share abc  without deleting any existing data in the destination share.
    I know that /MIR option will replace the destination same as source
    Can anybody help us in the Robocopy command & switches for this activity?
    Any help is greatly appreciated!
    Thanks & Regards S.Swaminathan Live & let others live!!!

    Hi Mandy,
    Thanks for your reply.
    I have done many robocopy for the share movements from the one server joined in a domain to another server joined in the same domain.In that instances, the destination server will not be having any share of the old server name and just I robocopy the share
    from the old server to the new server after creating a new share .The usual command is as follows:
    "\\server1\oldshare" \\server2\newshare" *.* *.* *.* /ZB /E /COPY:DATO /XJ /R:0 /W:0 /TEE /dcopy:T /NP /log:c:\robocopy.txt
    And after the copy , during the cutover of the standalone DFS pointing to the new share , the domain users in the corresponding access groups (name of the groups based on the old server name) of Full,Modify,Read will be appropriately copied to the respective
    new  groups (name of the groups based on the new server name) of the new share and the access is ensured by the users.
    But in this case , the destination server is already having a share with existing data in it and to be added with the old share data
    My question is shall I use the same command as before by copying all the data to the newly created subfolder inside the existiing destination share through the following command
    "\\server1\oldshare" \\server2\newshare\new sub-folder" *.* *.* *.* /ZB /E /COPY:DATO /XJ /R:0 /W:0 /TEE /dcopy:T /NP /log:c:\robocopy.txt
    You have already mentioned /E without purge options will do.
    Just asking one more time for the safer side
    Thanks & Regards S.Swaminathan Live & let others live!!!

  • Need to pass the value from UI

    Hi!!
    I am using jdeveloper 11.1.1.5
    I had dragged and dropped Three Input Text Boxes in my UI
    I need to pass the values from the UI to my AMImpl Methods
    i.e. In my AMImpl Methods
    vo2.setNamedWhereClauseParam("year",[af:ImputTextBox1]);
    vo2.setNamedWhereClauseParam("period",[af:ImputTextBox2]);
    vo2.setNamedWhereClauseParam("bu",[af:InputTextBox3]);
    vo2.executeQuery();

    The links given by Vinoth and jabr is very usefull for me!!
    Still i m receiving an while i clicked the button
    Cannot convert MEL of type class java.lang.String to class oracle.adf.view.rich.component.rich.input.RichInputText
    Cannot convert 201011 of type class java.lang.String to class oracle.adf.view.rich.component.rich.input.RichInputText
    Cannot convert 5 of type class java.lang.String to class oracle.adf.view.rich.component.rich.input.RichInputTextEdited by: wilhelm wundt on Dec 18, 2011 10:00 PM

  • Do we need to buy the license from SAP for EACH 'Z'form

    Hello
    I heard that, we (company) have to take license for the development of EACH adobe interactive form (even though its totally custom brand-new interactive form created from scratch), on individual form basis, is it true? (i know, its free of cost to play around with interactive forms in DEV and QA, but, if we want to move them to PROD, in that case do we need to buy the license from SAP for EACH form individually?)
    Thank you

    Thats true...license based on end user usage is required for SAP interactive forms. For more information read SAP note number 750784. The license comes in package like per 1000 users one time payment.
    Regards,
    Vaibhav

  • Need to fetch the plant from route and country

    Hi all,
    I need to fetch the "plant" from "route" and "country".
    is there any table having all the 3 fields, or any way to link these 3 fields ??
    thanks
    Sri

    Hi Sri,
         Try the COPA docs table CE1*
    Regards,
    Sandeep

  • I'm trying to buy CC Photoshop/Lightroom packages. In order to complete payment, I need to change the country from the default options (United States) to Brazil, But I'm not allowed to do it. I've already changed my origin country in my account informatio

    I'm trying to buy CC Photoshop/Lightroom packages. In order to complete payment, I need to change the country from the default options (United States) to Brazil, But I'm not allowed to do it. I've already changed my origin country in my account information.How do I change the country in order to complete payment?

    These are the two links I have
    Change/Verify Account https://forums.adobe.com/thread/1465499 may help
    -http://helpx.adobe.com/x-productkb/policy-pricing/change-country-associated-with-adobe-id. html
    If the above doesn't help, you will have to contact Adobe (this is an open forum, not Adobe support)
    Adobe contact information - http://helpx.adobe.com/contact.html
    -Select your product and what you need help with
    -Click on the blue box "Still need help? Contact us"

  • HT1349 i need to put the documents from the mac onto the mac book air

    i need to put the documents from the mac onto the mac book air.  How to I transfer my mac documents and music information to my macBook air?

    You have many options.
    Network the two Macs
    Use a Thunderbolt or FireWire cable and use FireWire Target Disk Mode
    Use Setup Assistant when you first set up a new Mac, or Migration Assistant at any time thereafter
    Use an inexpensive USB flash drive
    Email documents and files to yourself
    Use Dropbox or similar service
    Those are just a few. If you explain further or reply with the model of your "older" Mac and which OS version it is using, more specific information can be provided.
    You may find Apple Support Communities contributor Pondini's OS X tip useful: Setting-up a new Mac from an old one, its Backups, or a PC

  • How can I see website data from itouch 4th generation?  My 8 yr old may have been on inappropriate sites and I need to see the data from website data stored on the itouch.

    How can I see website data from itouch 4th generation?  My 8 yr old may have been on inappropriate sites and I need to see the data from website data stored on the itouch.

    There is no way to see where he has been.
    Go into Settings > General > Restrictions > Safari and turn it off. Then add the MacGruff browser from the app store. After that go back to Restrictions and turn off the ability to add apps.

  • I am selling my sons ipod and i need to reset the ipod from the itunes account because there is a password that no one remembers

    I am selling my sons ipod and i need to reset the ipod from the itunes account because there is a password and no one remembers it.  I am not an expert ( or even close) on the itunes stuff so I have tried everything I can see. 

    If you have a passcode to the screen lock that you've forgotten and your device is running iOS 6 or earlier, restore the device from the computer to which the device is synced. For information and instructions, see:
    http://support.apple.com/kb/ht1212
    If that will not work, you'll need to put the device into Recovery Mode and then try the Restore again:
    http://support.apple.com/kb/ht1808
    If that still doesn't work, as a last resort try DFU mode:
    http://www.iclarified.com/entry/index.php?enid=1034
    If your device is running iOS 7 and you set up Find My iPhone (iPad/iPod),  however, then it has the Activation Lock on it and you'll need to enter in your Apple ID and password after erasing to be able to restore the device:
    http://support.apple.com/kb/HT5818
    Regards.
    Forum Tip: Since you're new here, you've probably not discovered the Search feature available on every Communities page, but next time, it might save you time (and everyone else from having to answer the same question multiple times) if you search a couple of ways for a topic, both in the relevant forums and in the Apple Knowledge Base, before you post a question.

  • Need to grab the data from Web Page and send it to SAP using PI

    Hello Experts,
    I need to grab the exchanges rates from the below link.
    http://www.cbr.ru/scripts/XML_daily.asp?date_req=09-06-2011.
    This link returns an XML . I need to get the data from this XML page and post it to SAP ECC using PI.
    My requirement is that, process should start from the ECC and grabs the data from the web page which gives you the XML and post this data into ECC using PI. We have a RFC written in ECC side to post the data in ECC.
    Please help me to identify the adaptor's needed and what should I need to do to initiate the process from ECC.
    Would it be a Async or Sync process ?
    I would really appreciate the inputs.
    Thanks.
    Gaurav.

    Hi,
         Any particular reason that you want to go for a sync process as then you would need to either use a BPM (RFC to BPM where you use sync/async bridge to get the xml file from the specified link and then send the response back to ECC) or go for a synchronous Java proxy on the receiver side which will grab the exchange rates and then map back to the RFC response structure. In this case, you can avoid the BPM.
    Else, as mentioned in Michal's blog, you can break it up into 2 seperate scenarios. RFC/Proxy to File and then File to IDoc/RFC/Proxy which will get the exchange rates into ECC.
    Another option can be Proxy --> PI --> ECC(IDoc/Proxy/RFC). Here you can grab the exchange rates from the link in your message mapping through a UDF.
    Regards

  • Need to Extract the Data From "0BBP_TD_CONTR_2"

    Hi,
    I need to extract the data from SRM extractor "0BBP_TD_CONTR_2". I do not have much knowledge in SRM. Can any one give me the steps how can i check the extractor its not like R3. All kind of help will be appreciated.
    Thanks

    Never mind guys i figured it out. Thnaks

  • What hardware do I need to monitor the signal from an incremental encoder?

    We are trying to implement a feeding
    solution for one of our cutting machines and I’m not quite sure how to proceed. 
    I have attached a document from the NI website that outlines exactly what we are
    trying to do but does not go into detail on any of the concepts like programming
    and implementation.
    1.) We have a NI DAQPad-6015
    connected to a SC-2345 which has one SCC-CTR01 module installed.  Which this
    configuration can we read the incremental encoder signal and use to setup our
    cutting machine as outlined in the attached document?  If not what is the
    minimum amount of hardware we need to sample the signal from the incremental
    encoder and obtain both the direction and magnitude of the
    movement?
    2.) If we wanted to use the
    information obtained from the encoder and subsequently send a signal to a
    stepper motor controller or perhaps a PLC what additional hardware would be
    needed.
    Thanks,
    Chris  
    Attachments:
    Incremental Encoder Example.pdf ‏94 KB

    Hi Chris,
    For quadrature encoder measurements your
    hardware is not the ideal equipment. The 6015 doesn't provide X4
    decoding. That means, that the board counts only one raising edge of
    one phase. Still, if you connect phase A and B to the counter inputs,
    it will count up and down, depending on the direction of the axis, but
    as already mentioned, you will loose 75% of the available resolution. Here is some more information about this topic.
    The document that you are referring to recommends a PCI-6624
    and this is in fact a much better option. This board provides X4
    decoding and isolated inputs not only for phase A and B but also for
    the Z-index (not available for the 6015).
    If you need a USB-solution and if you can work with TTL voltages, you might have a look at the USB-6218, that provides isolated I/Os.
    For motion control there are various options. E. g. you could use an NI motion control device like the PCI-7332,
    but there are also options to communicate with external motion
    controllers through CANopen, RS232 or various fieldbusses. Depending on
    the solution that you choose, you may need a bus interface that
    provides support for your programming software.
    I hope that helps,
    Jochen KlierNational Instruments
    Message Edited by Jochen on 09-24-2008 09:24 AM

Maybe you are looking for

  • Set $PATH for current session in Terminal

    Hello, I want to modify the environment variable $PATH for the current terminal session. To modify it in $HOME/.profile (etc) is no option. So I created a shell script called envsetup.sh which contains ATLAS_HOME=/Applications/Development/atl-plugin-

  • Cant print on my Lexmark X4550 after Apple print Sw update

    Hi, I recently had an update of the Lexmark printer drivers via Apple's SW update. After that my Lexmark X4550 does not work any longer. I get an error message "Color table is missing. You must uninstall and reinstall the printer software" I have tri

  • What are the log files created while running a mapping?

    Hi Sasi , I have a doubt who actually generates the " Log Events ". Is it the Log Manager or Application services ?

  • Modification history field

    We are building forms in designer that were formerly in Lotus Notes. Our clients have become accustomed to having "routing history" and "modification history" fields as a document goes through its workflow. Is this information best being populated as

  • Problem with 10.5.3

    Hi, Does anyone know why 10.5.3 is only 198MB when downloaded with software update, while is measures up at 420MB on the Support/Download page?