Handing over the payload from BatchFTP eWay to custom OTD possible?

Hi there,
As I have been building a JCAPS interface I have a design question that nobody has been able to answer:
I intend to use BatchFTP eWay to connect to a third-party FTP-server and get a file. Now I want the BatchFTP eWay to hand off the data file to a custom OTD which needs to unmarshall the data. I looked at various examples but only found an example of BatchFTP eWay to BatchLocal (copy payload to payload) but nothing else. So my question is: how do I get my standard BatchFTP eWay adapter to handover the data or payload to my custom OTD ?
I can create a jcd to get the file from the external system and write it off to a local file on the JCAPS-box, but can one JCD then trigger another JCD which takes in the newly created local file and then calls my custom OTD to unmarshall the data? Maybe that is the way things should be done?
Thanks for your advice,
Richard

Sorry, I sent you down the wrong path a little:
try{
     //BatchFTP_Incoming is my batchFTp OTD
     BatchFTP_Incoming.getConfiguration().setTargetFileName( fileName ); //can be set in the batchftp settings page
     BatchFTP_Incoming.getClient().get();
     //Copy the FTP GetPayload to a variable
     String payload = new String( BatchFTP_Incoming.getClient().getPayload() );
     try{
          otdInput.unmarshallFromString(payload);
     }catch(Exception e){
          //unmarshall exception can happen here
}catch(Exception e){
     //Error getting the file
}There are many unmarshall methods (unmarshallFromXML, unmarshallFromBytes, etc.). JCAPS 5.1.3 and JCAPS 6 both have an intellisense if you hit ctrl+space on an object.
One "gotcha" of the BatchFTP is the target filename and the target location must have some value set in the collaboration map. I set them to "[set in jcd]" and then just write over them using code:
inFTP.getConfiguration().getPostTransfer().setPostTransferCommand( "DELETE" );
inFTP.getConfiguration().setTargetDirectoryName( "/apps/caps/pickup/ljs" );
inFTP.getConfiguration().getTargetLocation().setTargetDirectoryNameIsPattern( false );
inFTP.getConfiguration().setTargetFileNameIsPattern( false );
inFTP.getConfiguration().setTargetFileName("testFile.txt");Post if you have any more Q's,
--Adam                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • 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.

  • How can I download a file over the internet from a WebDAV server?

    I am trying to download a file over the internet from a WebDAV server. I've tried doing it with Datasocket as suggested in these articles,
    <a href="http://digital.ni.com/public.nsf/websearch/f3cc5f7e60a75cb2862567e700696abf?opendocument">Retrieving an Unformatted Text File via FTP or HTTP Using DataSocket</a>
    <a href="http://digital.ni.com/public.nsf/websearch/4FA09E7B3674DA34C1256BD400555C41?OpenDocument">Download a Text File from a Password Protected URL Using DataSocket</a>
    but all I get is error 1181 (protocol unrecognized by Datasocket).
    I know I have the URL correct, because I can put it into a web browser and it works fine - I can download the file manually.
    But I want to have a LabVIEW program do the download automatically.
    I have the internet toolkit, but don't have the foggiest clue how to use it, and am using LabVIEW 7.1
    I am a bit out of my depth here, so any advice welcome.
    Regards,
    Mark.

    MIG,
    What is the URL to the website? Is it an FTP site? The articles you referenced are for specific transfer protocols. If the stie you're trying to get to doesn't follow these protocols, then you'll get the error you're seeing. You may have to use ActiveX to control IE and download the files programmatically.
    Chris C
    Chris Cilino
    National Instruments
    LabVIEW Product Marketing Manager
    Certified LabVIEW Architect

  • 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 am trying to create a group in the address book.  When I drag over the contacts from the contact list they duplicate in the address book. I am using "Lion"

    When I try to create a group from the address book, when I drag over the names from the contact list, the names duplicate in the address book.

    Hi cavu10horses,
    Thanks for using Apple Support Communities.  This article has instructions for changing a contact's photo using a photo from iPhoto's Faces feature:
    Contacts: Add or change contact pictures
    http://support.apple.com/kb/PH11580
    Select a contact or your own card, and then double-click the picture well.
    Select a picture:
    Drag an image to the picture well.
    Click Camera to take a picture.
    If you have pictures in iPhoto, click the Faces button to use a face from iPhoto.
    If the contact is linked (it’s in multiple accounts, but displayed only once in Contacts) and has multiple account pictures, click Linked.
    Click Edit to edit the picture.
    To zoom in and out of the picture, drag the slider. Drag the picture to change which part of it is visible.
    To rotate the picture, hold down the Option key while you click and drag the picture.
    To apply special effects, click the Effects Gallery button and choose an effect.
    Click Done.
    Cheers,
    - Ari

  • Why does't apple allow you to read your iBooks library over the web from a browser or me account?

    Why does't Apple allow you to read your iBooks library over the web from a browser or me account? I have time to read during the day via a browser, but not by Ipad or Iphone. I love the features that iBook offers, but I have had to settle for Google books which is slow to upgrade its features. I just want to be able to highlight, copy and past and make notes and also have the option to read a book in a browser like google books.

    Wow.. I'm almost sorry that you spent so much time writing that post.
    Unfortunately, it would have much more impact if it were true.
    Just because you don't know how to do something... that doesn't mean it can't be done.
    I do what you say can't be done every day.
    You just need to put your iPod into manual update mode, and everything will be fine. You songs won't be greyed out, and you can play them with no trouble at all.
    So, next time you need help with something, just ask for help and we'll help you. It'll certainly make yourself look less foolish this way.
    Ranting and bashing Apple for no reason isn't going to win many people over.

  • Bookmarks syncing issue - 'over-the-air from MobileMe'

    Hi,
    Just bought a new iMac running Mountain Lion so I've now got iCloud capability back. My Safari bookmarks on my iPhone 4 are a mess and I can't delete them or get them to sync properly with the iMac Safari bookmarks.
    When I connect my iPhone and look in iTunes>Devices>Info>Other, it says that 'bookmarks are being synced with your iPhone over the air  from MobileMe. Over-the-air sync settings can be changed from your iPhone'. There's no option to change this default and I can't find anything on the iPhone that lets me change over-the-air sync settings. I used to have a MobileMe account but thought that was all dead and buried now.
    What do I need to do to make sure the bookmarks are synced from the iMac and the current ones on the iPhone are deleted?
    Thanks,
    Pete
    iMac running OSX 10.8.2; Safari 6.02; iPhone running iOS 6.1

    abellan wrote:
    Before doing a whole restore, try adding the account again without the on air syncing turned on, then sync. It may not authenticate if you have cancelled the account but if you continue to tap "Save" it will accept it with a message stating that it may not be able to connect to the server.
    After, then sync so that iTunes gets the updated settings.
    Nice, thanks, that did the trick.
    I had to tap "save" twice (first time, then the alert pops up, dismiss the alert and hit "save" again) and accept to add the account although it could not authenticate. Then I synced and afterwards deleted the account again *on the iPhone*. Syncing again and iTunes now lets me sync contacts and calendars again.
    Thank you!
    @Darsarin
    Thanks for the link, didn't find that thread earlier.

  • Your contacts are being synced with your iPad over the air from iCloud

    tl;dr: iPhone works properly with iTunes 11.1 and iPad does not. Can't sync with both iTunes and iCloud to separate, distinct Calendar/Contact/Notes groups.
    Explanation:
    Ever since iTunes 11 was released (I'm on 11.1 now) I'm unable to sync Contacts, Calendars, and Notes via iTunes because I'm using over the air syncing from iCloud. As late as iTunes 10.7, this was okay, because "On My PC" groups would sync perfectly with iTunes, and iCloud groups would sync perfectly with iCloud.
    In fact, this still works, today, but only on my iPhones.
    However on the iPad I get the message "Your contacts are being synced with your iPad over the air from iCloud." (Well, yeah, I know that. My iCloud contacts should continue to sync via iCloud. I don't want to turn off this behavior.)
    The "workaround" used to be sticking to iTunes 10.7, which had correct behavior for both iPad and iPhone. Of course iOS7 nuked that option.
    Is anyone aware of another workaround? (Merging my professional Outlook stuff into my iCloud stuff is not a workaround.)

    I can place a bounty. $20 USD to your Paypal account for a fix.

  • Hello, can i taken over the entries from an old calendar to a new calendar? example entrie from 2013 to 2015?

    hello, can i taken over the entries from an old calendar to a new calendar? example entrie from 2013 to 2015?

    Duplicate the calendar, go to the Calendar Settings and change the year to what you want.  Text entries to individual dates will remain but any photos added to a specific date will not.   Photos added to the photo page for each month will remain so you will need to delete them from the page and calendar if you want new ones.

  • HT1296 I'm trying to sync the calendar from my phone on the my new mac. the "sync calendars" blurb in iTunes says, "your calendars are being synced with your iPhone over the air from iCloud".. not nothing is happening. what to do? what to do?

    I'm trying to sync the calendar from my phone on the my new mac. the "sync calendars" blurb in iTunes says, "your calendars are being synced with your iPhone over the air from iCloud".. not nothing is happening. what to do? what to do?

    or even better on mac sign into icloud with same apple id under system preferences and icloud
    they will merge automatically
    Peace, Clyde

  • Moving of the Infoobjects from Unassigned nodes to Custom Created Nodes

    Hello Experts.
    How to move the infoobjects from unassigned nodes to custom created nodes in RSA1.
    Thanks
    PT

    Hi ,
    Goto RSD1 ->info object catalog -> enter catalog name -> edit -> insert your info objects  under "characteristic" folder.
    Hope this may be the easier way.
    Regards,
    Swarupa.

  • 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

  • Pull over the PO from quotation to sales order

    Hi Gurus!
    Is it possible to do a set up in sucha  way that when a quotation is created with PO number in it , it gets pulled over to the sales order automatically . I would like to set it up in such a way that when a sales order is created the PO from the quotation gets pulled over to the sales order , instead of the user entering the PO again the sales order when its being created.
    Thanks

    Is it possible to do via VOFM ? I mean copy any of the existing routines and adding the PO field to the list of items that can be copied . If I do that what settings needs to be done to have this worked and how to go about it?
    Also is there no customizatioin which can help me accomplish this?
    Thanks

  • Odd character generation in the payload from the R/3 side to PI server

    Dear Experts,
           The scenario is an integration from R/3 -PI- Webserver (Ext CRM server). An ABAP report is executed on the R/3 side which in turn invokes the RFC which is connected to PI server through RFC Adapter. On the receiving side the SOAP Adapter is used for connecting the External web server. Now when ABAP Report is executed on R/3 server it generates a transaction which does not gives error but the payload generated from the R/3 side is incorrect. When we check it on the PI server using the SXMB_MONI transaction, we can clearly see the odd characters like ㄲ㠸㈰㠺㔴㘱㌺ which is defined as string in the inbound message payload.ie In the payload looks like as given below. 
    <ns1:string>??㠸㈰㠺㔴㘱㌺</ns1:string>
    Kindly advice on how to overcome such problem. Is there any setting which needs to be done on the R/3 side or on the PI server side pls let us know.
    Thanking You
    With Kind Regards
    Sylvester

    Hi,
    You can change the encoding in your SOAP Adapter ...
    check SAP Note:
    Note 856597 - FAQ: XI 3.0 / PI 7.0 / PI 7.1 SOAP Adapter
    Rgds,
    Naveen.

  • Capture the file name in the payload from the SOAP payload

    Hi ,
    We have a scenario , a file to RFC , we need the file name which is coming the SOAP payload . This file name needs to be captured in the payload . Please tell me is there  any way capture this .
    Thanks
    Anita

    Anita,
    If SP14 and above , do this,
    Sender File adapter --> Adapter Specific Identifiers -->  Select File name
    Then in your mapping, you can use this piece of code to access / get the file name,
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String FileName = conf.get(key);
    Regards,
    Bhavesh

Maybe you are looking for

  • Iphone 4 ios 7.0.4 does not show in my pc

    just my iphone 4 ios 7.0.4 does not show in my pc, but my friends iphone are showing. I think my iphone has a problem. please help me thank you

  • How to make best videos/audios for Creative Zen/Zen Vision W/Zen Vision M/Z

    4Easysoft Creative Zen Video Converter is an all-in-one Video Converter for Creative Zen software with high output quality and powerful video editing functions, which can help all the zen users to make the best video/audio effect. First of all, let’s

  • My Skype Online Number is not working

    Bought a skype online number in UK last week, it works fine for two days then that's it, now it is telling callers " the person you are trying to reach is not available leave a message after the tone". Is this some kind of fraud or what. I tried call

  • Billing Relevance - Indicator C

    When is this indicator C- Relevant for order rel bill status according to target quantity used?

  • Error in createOUIprocess

    hello friends! please help! I installed jre_1.1.6-v5-gilbc-x86.tar.gz in redhat linux 6.2, and when I use the command: which jre , it reply: /usr/local/jre/bin/jre It seems that I have install the jre right. But when I tar Oracle815EE_Intel.tar.gz an