Extract an identifier in a string to define a correlation.

Hi,
I would like to extract an identifier of a string to define a correlation. I have tried with the BPEL xpath function 'substring'. It doesn't work...
Then, I have created a Java function which makes a substring. I would like to use my function in my wsdl, but it doesn't work :
xmlns:omm_recupId="http://www.oracle.com/XSL/Transform/java/com.omm.xsl.ObtenirIdTransaction"
<bpws:propertyAlias propertyName="ns1:idTransaction" messageType="omm:MessageReponseStringFFLINT2214"
part="donnees"
query="omm_recupId:obtenirIdTransaction(bpws:getVariableData('messageReponseStringFFLINT2214','donnees'))"/>
I can't enter in my Java function
Do you know what is the problem ?
Do you have an other solutions ?
Thanks,
Tania

you could do something like this:
String str[] = new String[10];
then you could get the value of a string from a user and place it in a String variable.
TextField text1 = new TextField ();
String nameofObject = text1.getText();
now you can do something like:
create a button to submit the new name and then check to see if the button was pressed. If the button was pressed, iterate through the loop and set the str array object equal to the value of nameofObject string. Do it something like:
str[0] = nameofObject;
now you should be able to refer to the newly created object as the string name entered into the TextField you retrieved.
That is just off the top of my head. I am sure what you are trying to do can be done.
Hope that helps,
Kent

Similar Messages

  • Extracting a  a piece of string starting with a number

    Hi,
    I am new to SQL, so I could use some help with the following issue. I need to extract contract number from a string, but the position of the contract number and the text inside of the string might vary, which means it is important to tie the SELECT statement to the number. Extracting only numbers wouldn't help too, because contract number contains letters and other characters. For example, if there was a string "Payment to a contract nr 1100/70HE", the SELECT statement should be able to extract only "1100/70HE" from that string.
    Thank you in advance,
    Keit

    Hi,
    welcome to the forum.
    Please read SQL and PL/SQL FAQ
    When you put some code or output please enclose it between two lines starting with {noformat}{noformat}
    i.e.:
    {noformat}{noformat}
    SELECT ...
    {noformat}{noformat}
    Coming to your question, I would say that extracting the contract number from a string it is not the ideal solution for a data model.
    Beside that, you may be able to reach your goal by using regular expression but you should provide more example and explain if the contract number could be identified with a specific pattern.
    I suggest you to post some sample data (CREATE TABLE and INSERT statement or a WITH statement) and try to identify a rule that can apply to extract your data.
    I.e.: if contract number always is one or more characters, followed by a slash (/) and followed by one or more characters then maybe you can use regular expression to identify it. I suggest you to post some cases and try to find the logic to apply.
    Regards.
    Al                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • -01157 cannot identify/lock datafile string - see DBWR trace file

    HI,
    -01157 cannot identify/lock datafile string - see DBWR trace file
    ora -1110 errors are throwing when iam going to startup

    872565 wrote:
    HI,
    -01157 cannot identify/lock datafile string - see DBWR trace file
    ora -1110 errors are throwing when iam going to startupDid you lookup this error on the Internet ??
    What does the alert_log tell you??
    The Google answer on this is:
    ORA-01157:cannot identify/lock data file string - see DBWR trace file
    Cause:     The background process was either unable to find one of the data files or failed to lock it because the file was already in use. The database will prohibit access to this file but other files will be unaffected. However the first instance to open the database will need to access all online data files. Accompanying error from the operating system describes why the file could not be identified.
    Action:     Have operating system make file available to database. Then either open the database or do ALTER SYSTEM CHECK DATAFILES.
    Edit: It is recommended to post database version and OS version also, including more information.
    This post of you looks like:
    Hi
    My Car is not starting. It is smoking from behind and making the weirdest sounds
    Please adviceCheers
    FJFranken
    Edited by: fjfranken on 19-jul-2011 5:33

  • Error in defining a correlation in netbeans for a BPEL

    hallo,
    would anybdy be kind enough to tell me where i've done somthing wrong?
    there are two receive activities in a BPEL, recieve1 and recieve2. on the latter i have defined a correlation whose initiator is recieve1. the related source code from correlationWSDL is :
    <vprop:property name="wzrd_prop_ContactNo_ContactNo" type="xsd:int"/>
        <vprop:propertyAlias propertyName="tns:wzrd_prop_ContactNo_ContactNo" messageType="ns:checkLeadDuplicationStatusRequest" part="part1">
            <vprop:query>/ns0:LeadCoreInfo/ns0:ContactNo</vprop:query>
        </vprop:propertyAlias>
        <vprop:propertyAlias propertyName="tns:wzrd_prop_ContactNo_ContactNo" messageType="ns:leadWSOperationRequest" part="part1">
            <vprop:query>/ns0:LeadDetailedInfo/ns0:LeadCoreInfo/ns0:ContactNo</vprop:query>
        </vprop:propertyAlias>error that i'm getting is:
    ERROR: The first step has to be "ns0:LeadCoreInfo", if an absolute path is used for query. Expression: "/ns0:LeadCoreInfo/ns0:ContactNo"
    regards

    thanks, mr. bhasin.
    i have used the same wizard for correlation.i haven't solved the problem, but have found an alternative instead. lemme tell you what i have done. if i replace
    <vprop:query>/ns0:LeadDetailedInfo/ns0:LeadCoreInfo/ns0:ContactNo</vprop:query>with the following code line then it works:
       <vprop:query>/ns0:LeadCoreInfo/ns0:ContactNo</vprop:query>the problem is that the element that is correlated on the two recieve activities has to be on the same level of hierarchy, otherwise it does give error. it seems quite ridiculous to me, coz inputs might be different at any two activities, and is the case most of the times.
    part of the schema is:
    <xsd:element name="LeadCoreInfo" type="tns:leadCoreInfoType"/>
        <xsd:element name="LeadDetailedInfo" type="tns:leadDetailedInfoType"></xsd:element>
        <xsd:element name="LeadDuplicationStatus" type="xsd:string"/>
        <xsd:element name="LeadCreated" type="xsd:integer"/>
        <xsd:element name="AgentAssigned" type="tns:agentType"/>
        <xsd:element name="AutoID" type="xsd:int"/>
        <xsd:element name="Result" type="xsd:string"/>
        <xsd:complexType name="leadCoreInfoType">
            <xsd:sequence>
                <xsd:element name="FirstName" type="xsd:string"/>
                <xsd:element name="LastName" type="xsd:string"/>
                <xsd:element name="ContactNo" type="xsd:int"/>
                <xsd:element name="Email" type="xsd:string"/>
                <xsd:element name="AutoID" type="xsd:int"/>
            </xsd:sequence>
        </xsd:complexType>
        <xsd:complexType name="leadDetailedInfoType">
            <xsd:sequence>
                <xsd:element name="LeadCoreInfo" type="tns:leadCoreInfoType"/>
                <xsd:element name="LeadOwner" type="xsd:string"/>
                <xsd:element name="Title" type="xsd:string"/>
                <xsd:element name="LeadSource">
                    <xsd:complexType>
                        <xsd:choice>
                            <xsd:element name="ColdCall" type="xsd:string"/>
                            <xsd:element name="ExistingCustomer" type="xsd:string"/>
                            <xsd:element name="IncomingCall" type="xsd:string"/>
                            <xsd:element name="EmailLead" type="xsd:string"/>
                            <xsd:element name="CustomerReferral" type="xsd:string"/>
                            <xsd:element name="Web" type="xsd:string"/>
                            <xsd:element name="WordOfMouth" type="xsd:string"/>
                        </xsd:choice>
                    </xsd:complexType>
                </xsd:element>
    in leadBPEL  i have defined a correlation on recieve2 whose initiator is recieve1. in correlation wizard, i mapped AutoID (of message sent to recieve1) to AutoID (of message sent to recieve2). the source code of leadBPEL is:
    <?xml version="1.0" encoding="UTF-8"?>
    <process
        name="leadBPEL"
        targetNamespace="http://enterprise.netbeans.org/bpel/LeadWebService/leadBPEL"
        xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:tns="http://enterprise.netbeans.org/bpel/LeadWebService/leadBPEL" xmlns:sxt="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/Trace" xmlns:sxed="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/Editor" xmlns:ns0="http://enterprise.netbeans.org/bpel/WizardCorrelationProperties" xmlns:ns1="http://xml.netbeans.org/schema/LeadSchema">
        <import namespace="http://j2ee.netbeans.org/wsdl/leadWS" location="leadWS.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
        <import namespace="http://j2ee.netbeans.org/wsdl/checkLeadDuplicationWS" location="checkLeadDuplicationWS.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
        <import namespace="http://j2ee.netbeans.org/wsdl/createLeadWS" location="createLeadWS.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
        <import namespace="http://enterprise.netbeans.org/bpel/WizardCorrelationProperties" location="WizardCorrelationProperties.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
        <partnerLinks>
            <partnerLink name="checkLeadDuplicationWSpartner" xmlns:tns="http://j2ee.netbeans.org/wsdl/checkLeadDuplicationWS" partnerLinkType="tns:checkLeadDuplicationWS" partnerRole="checkLeadDuplicationWSPortTypeRole"/>
            <partnerLink name="createLeadWSpartner" xmlns:tns="http://j2ee.netbeans.org/wsdl/createLeadWS" partnerLinkType="tns:createLeadWS" partnerRole="createLeadWSPortTypeRole"/>
            <partnerLink name="leadWSpartner" xmlns:tns="http://j2ee.netbeans.org/wsdl/leadWS" partnerLinkType="tns:leadWS" myRole="leadWSPortTypeRole"/>
        </partnerLinks>
        <variables>
            <variable name="CreateLeadOperationOut" xmlns:tns="http://j2ee.netbeans.org/wsdl/leadWS" messageType="tns:leadWSOperationResponse"/>
            <variable name="AutoAssignLeadOperationOut" xmlns:tns="http://j2ee.netbeans.org/wsdl/createLeadWS" messageType="tns:createLeadWSOperationResponse"/>
            <variable name="AutoAssignLeadOperationIn" xmlns:tns="http://j2ee.netbeans.org/wsdl/createLeadWS" messageType="tns:createLeadWSOperationRequest"/>
            <variable name="CreateNewLeadOperationOut" xmlns:tns="http://j2ee.netbeans.org/wsdl/createLeadWS" messageType="tns:createNewLeadOperationResponse"/>
            <variable name="CreateNewLeadOperationIn" xmlns:tns="http://j2ee.netbeans.org/wsdl/createLeadWS" messageType="tns:createNewLeadOperationRequest"/>
            <variable name="CreateLeadOperationIn" xmlns:tns="http://j2ee.netbeans.org/wsdl/leadWS" messageType="tns:leadWSOperationRequest"/>
            <variable name="CheckLeadDuplicationStatusIn1" xmlns:tns="http://j2ee.netbeans.org/wsdl/leadWS" messageType="tns:checkLeadDuplicationStatusRequest"/>
            <variable name="CheckLeadDuplicationStatusOut" xmlns:tns="http://j2ee.netbeans.org/wsdl/leadWS" messageType="tns:checkLeadDuplicationStatusResponse"/>
            <variable name="CheckLeadDuplicationWSOperationOut" xmlns:tns="http://j2ee.netbeans.org/wsdl/checkLeadDuplicationWS" messageType="tns:checkLeadDuplicationWSOperationResponse"/>
            <variable name="CheckLeadDuplicationWSOperationIn" xmlns:tns="http://j2ee.netbeans.org/wsdl/checkLeadDuplicationWS" messageType="tns:checkLeadDuplicationWSOperationRequest"/>
            <variable name="CheckLeadDuplicationStatusIn" xmlns:tns="http://j2ee.netbeans.org/wsdl/leadWS" messageType="tns:checkLeadDuplicationStatusRequest"/>
        </variables>
        <correlationSets>
            <correlationSet name="wzrd_set_Receive1_Receive2" properties="ns0:wzrd_prop_AutoID_AutoID"/>
            <correlationSet name="wzrd_set_Receive1_Receive2_1" properties="ns0:wzrd_prop_AutoID_AutoID"/>
        </correlationSets>
        <sequence>
            <receive name="Receive1" createInstance="yes" partnerLink="leadWSpartner" operation="checkLeadDuplicationStatus" xmlns:tns="http://j2ee.netbeans.org/wsdl/leadWS" portType="tns:leadWSPortType" variable="CheckLeadDuplicationStatusIn">
                <correlations>
                    <correlation set="wzrd_set_Receive1_Receive2_1" initiate="yes"/>
                </correlations>
            </receive>
            <assign name="Assign1">
                <copy>
                    <from variable="CheckLeadDuplicationStatusIn" part="part1"/>
                    <to variable="CheckLeadDuplicationWSOperationIn" part="part1leadCoreInfo"/>
                </copy>
            </assign>
            <invoke name="Invoke1" partnerLink="checkLeadDuplicationWSpartner" operation="checkLeadDuplicationWSOperation" xmlns:tns="http://j2ee.netbeans.org/wsdl/checkLeadDuplicationWS" portType="tns:checkLeadDuplicationWSPortType" inputVariable="CheckLeadDuplicationWSOperationIn" outputVariable="CheckLeadDuplicationWSOperationOut"></invoke>
            <assign name="Assign2">
                <copy>
                    <from variable="CheckLeadDuplicationWSOperationOut" part="leadDuplicationStatus"/>
                    <to variable="CheckLeadDuplicationStatusOut" part="leadDuplicationStatus"/>
                </copy>
            </assign>
            <reply name="Reply1" partnerLink="leadWSpartner" operation="checkLeadDuplicationStatus" xmlns:tns="http://j2ee.netbeans.org/wsdl/leadWS" portType="tns:leadWSPortType" variable="CheckLeadDuplicationStatusOut"></reply>
            <receive name="Receive2" createInstance="no" partnerLink="leadWSpartner" operation="createLeadOperation" xmlns:tns="http://j2ee.netbeans.org/wsdl/leadWS" portType="tns:leadWSPortType" variable="CreateLeadOperationIn">
                <correlations>
                    <correlation set="wzrd_set_Receive1_Receive2_1" initiate="no"/>
                </correlations>
            </receive>
            <assign name="Assign3">
                <copy>
                    <from variable="CreateLeadOperationIn" part="part1"/>
                    <to variable="CreateNewLeadOperationIn" part="leadDetailedInfo"/>
                </copy>
            </assign>
            <invoke name="Invoke2" partnerLink="createLeadWSpartner" operation="createNewLeadOperation" xmlns:tns="http://j2ee.netbeans.org/wsdl/createLeadWS" portType="tns:createLeadWSPortType" inputVariable="CreateNewLeadOperationIn" outputVariable="CreateNewLeadOperationOut"/>
            <if name="If1">
                <condition>$CreateNewLeadOperationOut.leadCreated = 1</condition>
                <sequence name="Sequence1">
                    <assign name="Assign4">
                        <copy>
                            <from variable="CreateNewLeadOperationIn" part="leadDetailedInfo"/>
                                <to variable="AutoAssignLeadOperationIn" part="leaddetailedInfo"/>
                        </copy>
                    </assign>
                    <invoke name="Invoke3" partnerLink="createLeadWSpartner" operation="autoAssignLeadOperation" xmlns:tns="http://j2ee.netbeans.org/wsdl/createLeadWS" portType="tns:createLeadWSPortType" inputVariable="AutoAssignLeadOperationIn" outputVariable="AutoAssignLeadOperationOut"/>
                    <assign name="Assign6">
                        <copy>
                            <from>1</from>
                            <to variable="CreateLeadOperationOut" part="leadCreated"/>
                        </copy>
                        <copy>
                            <from variable="AutoAssignLeadOperationOut" part="agentAssigned"/>
                            <to variable="CreateLeadOperationOut" part="agentAssigned"/>
                        </copy>
                    </assign>
                </sequence>
                <else>
                    <assign name="Assign5">
                        <copy>
                            <from>0</from>
                            <to variable="CreateLeadOperationOut" part="leadCreated"/>
                        </copy>
                        <copy>
                            <from>'NULL'</from>
                            <to>$CreateLeadOperationOut.agentAssigned/ns1:FirstName</to>
                        </copy>
                        <copy>
                            <from>'NULL'</from>
                            <to>$CreateLeadOperationOut.agentAssigned/ns1:Lastname</to>
                        </copy>
                        <copy>
                            <from>0</from>
                            <to>$CreateLeadOperationOut.agentAssigned/ns1:agentID</to>
                        </copy>
                    </assign>
                </else>
            </if>
            <reply name="Reply2" partnerLink="leadWSpartner" operation="createLeadOperation" xmlns:tns="http://j2ee.netbeans.org/wsdl/leadWS" portType="tns:leadWSPortType" variable="CreateLeadOperationOut"/>
        </sequence>
    </process>
    the generated source code of correlation wizard is:
    <vprop:property name="wzrd_prop_AutoID_AutoID" type="xsd:int"/><vprop:propertyAlias propertyName="tns:wzrd_prop_AutoID_AutoID" messageType="ns:checkLeadDuplicationStatusRequest" part="part1">
            *<vprop:query>/ns0:LeadCoreInfo/ns0:AutoID</vprop:query>*
        </vprop:propertyAlias>
        <vprop:propertyAlias propertyName="tns:wzrd_prop_AutoID_AutoID" messageType="ns:leadWSOperationRequest" part="part1">
            <vprop:query>/ns0:LeadDetailedInfo/ns0:LeadCoreInfo/ns0:AutoID</vprop:query>
        </vprop:propertyAlias>
    the error that i get is:C:/Documents and Settings/bushra/My Documents/NetBeansProjects/LeadWebService/src/WizardCorrelationProperties.wsdl:28,8
    ERROR: The first step has to be "ns0:LeadCoreInfo", if an absolute path is used for query. Expression: "/ns0:LeadCoreInfo/ns0:AutoID"
    if this AutoIDs in both queries are in same level of hierarchy (if  for example i send LeadDetailedInfo to recieve2, instead of LeadCoreInfo), then there is no error. Why is that?

  • Extracting elements from an xml string - org.apache.xerces.dom.DeferredText

    Hello all,
    I am new to xml, and I thought I had a handle on things until I got this problem...I am getting an xml string from the body of an e-mail message, and then I am trying to extract elements out of it. Here is an example xml string:
    <?xml version="1.0" encoding="UTF-8"?>
    <filterRoot>
       <filter action="MOVE" bool="AND" name="My Saved Filter" target="Deleted Items">
          <condition attribute="TO" bool="AND" contains="CONTAINS">
             <value>[email protected]</value>
             <value>[email protected]</value>
             <value>[email protected]</value>
             <value>[email protected]</value>
             <value>[email protected]</value>
          </condition>
       </filter>
    </filterRoot>I am trying to extract the <filter> element out and store it into a Vector of Elements (called, not surprisingly, filters). However, I am getting a class cast exception:
    java.lang.ClassCastException: org.apache.xerces.dom.DeferredTextImplIt is being called from where I trying to extract the <filter> in this way:
            filterRoot = doc.getDocumentElement(); // get topmost element
            NodeList list = filterRoot.getChildNodes();
            Vector newFilters = new Vector();
            debug("There are "+list.getLength()+" filters in document");
            for(int i=0; i<list.getLength(); i++) {
                Node n = list.item(i);
                debug("Node "+i+" getNodeValue() is "+n.getNodeValue());
                Element temp = (Element)n;
                newFilters.add(temp);
            }Perhaps my question is, how do I correctly get hold of the <filter> node so that I may cast it as an Element?
    thanks,
    Riz

    Yes, I already knew that it is not a bug.
    But, I got next step problem.
    I put "false" to "include-ignorable-whitespace" feature in xerces parser.
    But, I still found unnecessary TextNodes in my parser object.
    Feature link : http://xerces.apache.org/xerces-j/features.html.
    I use xerces-2_8_0.
    DOMParser parser = new DOMParser();
    parser.setFeature("http://apache.org/xml/features/dom/include-ignorable-whitespace", false);
    parser.parse(inputSource);
    document = ps.getDocument();
    System.out.println(document.getDocumentElement().getChildNodes().length()); // still wrong lengthIs tehre any example of usage this feature?
    What is default defination of white-space "\n "(enter with one space) or " "(juz white space) or something else?
    Thanks,

  • How to Extract particular field from a string ( Mapping)

    how to exteract the particular field from the given string:
    ProcessEmp this element has a below string subfields.
    <ProcessEmp>&lt;?xml version="1.0" encoding="utf-8" standalone="no"?&gt;
    &lt;Employee PersonnelNumber="11111" FirstName="String" MiddleName="String" LastName="String" Department="String" Group="" SapUserID="10flname" EmailAddress="[email protected]" DefaultPassword="*" Status="Success" /&gt;</ProcessEmp>
    how to extract only PersonalNumber, department, EmailAddress from above ProcessEmp into 3 diff fields.
    Thanks
    dhanush.

    Hi,
    You are receiving XML message within a field. To access a particular field from that XML message, you could create a User Defined Function, as suggested by many already.
    You could write UDF using some of the String operation functions. This could include following:
    1. If you need to access field Employee PersonnelNumber, you could get last index of that within string using function lastIndexOf(String str). Pass string "Employee PersonnelNumber="" for this function.
    2. This function would return an index of rightmost occurance of this string.
    3. after this you could get the index of next occurance of ", as the value of field is within quotes. You could use function indexOf(int ch, int fromIndex) for getting the same. You would pass Character as " and index as the one received by previous function.
    4. Now you have index for starting and ending point of value string for desired field.
    5. After this you could use substring(int beginIndex, int endIndex) function by passing first and second index values to retrieve the needed string, which contains value of field.
    Hope this would be helful.
    Thanks,
    Bhavish
    Reward points if comments found helpful:-)

  • How to extract specific line from a string

    Hi guys.
    I?m starting to work with java...
    i have the following data inside a string variable:
    0 rows inserted.
    0 rows updated.
    0 rows ignored.
    98 rows marked as deleted.
    0 rows have no country.
    3345 rows have no geo.
    0 rows are invalid.
    what i want to do i to extract the number of rows marked as delete.
    I think that i figured out how to extract the number from this line :"98 rows marked as deleted."
    but how do i get to that line?
    I hope you can Help me. Thanks.

    the string is the result from a Function... this function gets the info from a store procedure...
                   rta = "Results for " + dh.getSource() + " source:\n" +
    dh.getInsertedCount() + " rows inserted.\n" +
    dh.getUpdatedCount() + " rows updated.\n" +
    dh.getIgnoredCount() + " rows ignored.\n" +
                   dh.getDeletedCount() + " rows marked as deleted.\n" +
                   dh.getNoCtryCnt() + " rows have no country.\n" +
                   dh.getNoGeoCnt() + " rows have no geo.\n" +
                   dh.getInvalidCnt() + " rows are invalid.\n";
    i can?t change this function...
    so i need to work with the returned value...
    i what thinking to use the following method to extract te number...
    private int GetNumericValue(string sVal)
    int iFirst, iCharVal, iEnd;
    int iMult = 1, iRet = 0;
    char[] aNumbers = "1234567890".ToCharArray();
    iFirst = sVal.IndexOfAny(aNumbers);
    iEnd = sVal.LastIndexOfAny(aNumbers);
    if (iEnd < 0)
    return 0;
    string subStr = sVal.Substring(iFirst, iEnd - iFirst + 1);
    iEnd = subStr.Length - 1;
    while (subStr.Length > 0)
    iCharVal = int.Parse(subStr[subStr.Length-1].ToString());
    iRet += iMult * iCharVal;
    iMult *= 10;
    if (iEnd <= 0)
    break;
    subStr = subStr.Substring(0, subStr.Length - 1);
    iEnd = subStr.LastIndexOfAny(aNumbers);
    subStr = sVal.Substring(iFirst, iEnd + 1);
    return iRet;
    but i still need the 4rd line to extract the number

  • Xpath in BPEL: How to extract from message type to string

    Hi all,
    I am currently trying to extract all content from a special message type to a string. The special message is really just simple XML.
    However, I wish to convert the special domain specific message to a string to send to another partnerlink.
    I figured that it would be a simple matter of using an assign / copy operation using the special message and the ora:getContentAsString function.
    This does not work :-(
    I get the following error in the domain log:
    ORABPEL-05002
    Message handle error.
    An exception occurred while attempting to process the message "com.collaxa.cube.engine.dispatch.message.invoke.InvokeInstanceMessage"; the exception is: XPath expression failed to execute.
    Error while processing xpath expression, the expression is "ora:getContentAsString(bpws:getVariableData('businessEventBody'))", the reason is FOTY0001: type error.
    Please verify the xpath query.
    Does anyone have any ideas on how to solve this?
    Regards,
    Aagaard

    <p>
    Hi,
    </p>
    <p>
    Let me explain the scenerio:
    </p>
    <p>
    I XSD I have is:
    </p>
    <p>
    &lt;xs:schema xmlns:xs="<a href="http://www.w3.org/2001/XMLSchema">http://www.w3.org/2001/XMLSchema</a>"
    targetNamespace="**************"
    &lt;xs:element name="OrdDesc"&gt;
    &lt;xs:complexType&gt;
    &lt;xs:sequence&gt;
    &lt;xs:element name="ord" type="number10" /&gt;
    &lt;xs:element name="ord_name" type="varchar2150" /&gt;
    &lt;xs:element name=ord_add1" type="varchar2240" minOccurs="0" /&gt;<br /><br /> &lt;xs:element name="ord_add2" type="varchar2240" minOccurs="0" /&gt;<br /><br /> &lt;xs:element name="ord_city" type="varchar2120" minOccurs="0" /&gt;<br /><br /> &lt;xs:element name="county" type="varchar2250" minOccurs="0" /&gt;<br /><br /> &lt;/xs:sequence&gt;<br /><br /> &lt;/xs:complexType&gt;<br /><br /> &lt;/xs:element&gt;<br /><br />&lt;/xs:schema&gt;<br /></p><br /><p><br /><br /><br />The runtime XML I would get:<br /></p><br /><p><br /><br /><br />&lt;?xml version="1.0" encoding="UTF-8" ?&gt;<br /><br />&lt;Messages&gt;<br /><br /> &lt;Message&gt;<br /><br /> &lt;family&gt;New&lt;/family&gt;<br /><br /> &lt;type&gt;OrderCreate&lt;/type&gt;<br /><br /> &lt;id&gt;22&lt;/id&gt;<br /><br /> &lt;messageID/&gt;<br /><br /> &lt;routingInfo/&gt;<br /><br /> &lt;messageData&gt;&lt;![CDATA[&lt;!DOCTYPE *************"&gt;<br /><br /> &lt;OrdDesc&gt;<br /><br />  &lt;ord&gt;22&lt;/wh&gt;<br /><br />  &lt;ord_name&gt;Ord1&lt;/wh_name&gt;<br /><br />  &lt;ord_add1&gt;Park Avenue&lt;/wh_add1&gt;<br /><br />  &lt;ord_add2/&gt;<br /><br />  &lt;ord_city&gt;XYZ&lt;/wh_city&gt;<br /><br />  &lt;county/&gt;<br /><br /> &lt;/OrdDesc&gt;]]&gt;&lt;/messageData&gt;<br /><br /> &lt;/Message&gt;<br /><br /> &lt;Message&gt;<br /><br /> &lt;family&gt;New&lt;/family&gt;<br /><br /> &lt;type&gt;OrderMod&lt;/type&gt;<br /><br /> &lt;id&gt;22&lt;/id&gt;<br /><br /> &lt;messageID/&gt;<br /><br /> &lt;routingInfo/&gt;<br /><br /> &lt;messageData&gt;&lt;![CDATA[&lt;!DOCTYPE *************"&gt;<br /><br /> &lt;OrdDesc&gt;<br /><br />  &lt;ord&gt;22&lt;/wh&gt;<br /><br />  &lt;ord_name&gt;Ord1&lt;/wh_name&gt;<br /><br />  &lt;ord_add1&gt;Park Avenue&lt;/wh_add1&gt;<br /><br />  &lt;ord_add2/&gt;<br /><br />  &lt;ord_city&gt;XYZ&lt;/wh_city&gt;<br /><br />  &lt;county/&gt;<br /><br /> &lt;/OrdDesc&gt;]]&gt;&lt;/messageData&gt;<br /><br /> &lt;/Message&gt;<br /><br />&lt;/Messages&gt;<br /></p><br /><p><br /><br /><br />Now, the Msg type(&lt;type&gt;OrderCreate&lt;/type&gt;) I am referring to is not the part of XSD, it gets generated at the time message is created. That's why I don't see that tag in the payload. Payload shows the elements of XSD. <br /></p><br /><p><br /><br /><br /><br /><br />Please help.<br /></p>

  • How to extract data from user agent-string

    Hello,
    I'm searching for a PL/SQL package or function to extract the browser and operating system information from a http_user_agent-string.
    Something like:
    Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6
    should output Firefox and windows xp.
    Thanks,
    Jan

    Hi,
    Check this document on FI:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a7f2f294-0501-0010-11bb-80e0d67c3e4a
    FI datasources are delta enable, here delta records are directly selected from the R/3 tables using a timestamp mechanism and these records are directly transferred to BW. No record is written to the BW delta queue unlike Lo extraction where we have to fill the setup table and run the job control in LBWE.
    The FI Extractors are typically function module extractors. The function module for the extractors are as follows:
    0FI_TX_4 - BWFID_GET_FITAX_ITEM
    0FI_GL_4 - BWFID_GET_FIGL_ITEM
    0FI_GL_2 - FBIW_DATA_TRANSFER_GL_2
    0FI_GL_1 - FBIW_DATA_TRANSFER_GL_1
    0FI_AR_3 - FBW4_DATA_TRANSFER_AR_3
    0FI_AP_4 - BWFID_GET_FIAP_ITEM
    0FI_AP_3 - FBW4_DATA_TRANSFER_AP_3
    Check this link on Extraction Procedure in FI
    http://help.sap.com/saphelp_nw04/helpdata/en/af/16533bbb15b762e10000000a114084/frameset.htm
    http://help.sap.com/bp_biv335/BI_EN/html/BW/FinancialAccounting.htm
    Re: R/3 data (FICO, PS)  into BW
    Re: Functional Information in FI/CO, LO...
    Hope this helps.
    Bye
    Dinesh

  • Extract IP Address from a string

    Hello All,
    I have a string which i get from a snmp trap, looks like this.
    "SArobot/"10.16.87.243"".
    This string can also be like "adadafas".
    How can i check if ipaddress is there in the string and if present, extract only the IP address?

    Pattern p = Pattern.compile("\\d+(?:\\.\\d+){3}");
    Matcher m = p.matcher(str);
    if (m.find())
      String ipAddr = m.group();
    }

  • Use a string to define data

    Hello experts
    Is there a way to do this: get a table name as a string  from a query and use it to define another variable
    For example:
    data: line TYPE RSDSSEG.
    select * from RSDSSEG into line where DATASOURCE = '/CW1/MMD01'.
    ENDSELECT.
    psatablename = line-psa.
    *now psatablename contains the name of the abap table i would like to read
    the following two lines do not work
    data: psaline type psatablename.
    select * from psatablename into psaline.
    Thanks a lot for your help
    Thibault

    Yes it is possible.
    Pl. check this sample code.
    DATA:
          dy_table TYPE REF TO data,
          dy_line TYPE REF TO data.
    FIELD-SYMBOLS                                                       *
    FIELD-SYMBOLS: <dyn_table> TYPE STANDARD TABLE,
                   <dyn_wa> TYPE ANY.
    Create internal table dynamically with the stucture of table name
      CREATE DATA dy_table TYPE STANDARD TABLE OF (psatablename).
      ASSIGN dy_table->* TO <dyn_table>.
      IF sy-subrc = 0.
    Create workarea for the table
      CREATE DATA dy_line LIKE LINE OF <dyn_table>.
      ASSIGN dy_line->* TO <dyn_wa>.
    Select data from table
      SELECT * FROM (psatablename)
      INTO TABLE <dyn_table>.
      ENDIF.
    Regards,
    Joy.

  • Extracting unique identifier for illustrator layers

    Hi All,
    Multiple layers in an illustrator file can have the same name. So the layer name cannot be a unique identifier for layers. Is there a way to extract a unique identifier for layers through scripting? I saw that if the 'Identify Objects by' property (inside Preferences -> Units) is set to XML ID, all layer names, even identical ones are replaced by some unique ids. Can we extract these ids via scripting without manually changing the 'Identify Objects by' property. Basically, extraction of any unique identifier for illustrator layers would serve the purpose. I am really stuck with this and need help urgently. Any help would be highly appreciated.
    Thanks in advance.

    When I found this I noticed it changed the name of the layers in the layers pallet.
    I had not had a chance to test this with code.
    If "use XML ID" is turned on then you are not able to name layers the same thing.
    this in turn would follow through to your script using layer.name
    for existing files you would need to fix names manually or...
    I am sure it would be possible to Script.
    eg. export SVG file and pull the layer ID's from that and rename the document layers accordingly. (may be a little tricky for sublayers, but top level layers should be straight forward)
    Then as long as "use XML ID" is left on the files would not need this run again as you cannot use duplicate layer names.

  • Extract specific letters from a string of text

    Hello,
    I have an idea that I would like to implement into Numbers but I'm not quite sure how to do it, or even if it is possible. What I would like to do is replace a multitude of checkboxes with one cell. In that one cell I will have a string of text, with a letter representing a condition. From this one cell, I would like to be able to extract a certain letter into its own cell and then hide the multitude of cells.
    My idea is to eventually just be able to type the conditions into a single cell, extract the letter of the certain condition into another cell, and then extract that information into another table, all the while hiding all of the auxiliary columns in the original table. Because it would be much easier and prettier to simply type a bunch of letters into one box instead of having to check a bunch of boxes, no?
    For example Left Header Row 1 would contain the letters BMRT. Column A would return a "FALSE" value, while Column B would return "B" or "TRUE." Columns C through L return "FALSE," etc.
    In Left Header Row 2 we would have the string AJQTVZ, for instance. Column A would return "A" (or "TRUE"), and Columns B through I would return "FALSE."
    Is it possible to write such a formula? Or is there an easier way to be thinking about this problem?

    Let's start with the easy part.
    Cells on a Numbers table can contain data entered directly, or can contain a formula. They can't contain both. That means you cannot 'type the conditions into a single cell' in column A ("the left header" cell) AND have a formula which sets that cell to TRUE if the typed in data contains an "A".
    There's no problem doing this using column A as the key holder and columns B:Z to hold the TRUE/FALSE results, staring in both cases on row 2.
    Here's an example
    The column header cells (row 1) contain the letter corresponding to that column.
    The row header cells (starting at row 2) contain the 'bunch of letters' you describe. Note (A4) that the letters do not have to be entered in any particular order, and that extraneous characters (eg. a space) are ignored.
    The formula shown is entered B2, and filled down and right from there.
    =IFERROR(FIND(B$1,$A2)>0,FALSE)
    FIND returns the position of the first occurrence of the target string (in this case, the single letter at the top of the column) in the search string, then compares that with the value zero. For any letter that is included in the search string, the find value will be at least 1, so the comparison will return TRUE. If the target letter is not found, FIND returns an error. IFERROR traps this and returns FALSE.
    Since the target depends on the letter at the top of the column, all that's needed to extend the range of possible letters to the full alphabet is to enter an A in cell B1, then run through the alphabet A to Z, with Z in cell AA1.
    Depending what you want to do with the TRUE or FALSE values in these 26 columns, it may be possible to skip the auxiliary column step and use a formula similar to the one above as the condition argument of an IF(condition,do-if-true,do-if-false) statement.
    Regards,
    Barry

  • Extract multiple data from long string

    I am working in Crystal Reports XI looking at an SQL database. How can I pick up several different data bits from a realy long string? Each element I want is preceded by "Old Value =" or "New Value =". The problem is that there are up to 4 different sets of these "Old Value =", "New Value =" so I can only get the first set if I use "InStr" to find "Old Value =" or "New Value =".
    Since they are preceded by unique headings like "RuntimeMinutes", I thought I could use "InStr" to find that "RuntimeMinutes" or whichever and then use that value as the location number nested in another "InStr" to find "New Value =" and nest it all in a "Mid" expression. But however I did it I got an error highlighting that "InStr" nested in "InStr" saying it was not an integer or the value was less than 1.
    Any ideas?

    The way that I'd deal with this is by creating formula fields for each value that you want to extract.  In the sample below, I'm assuming your string looks something like this:
    RuntimeMinutes OldValue=123 NewValue=234 DbReads OldValue=12345 NewValue=34567
    The formula for {@Runtime Minutes Old Value} would then look like (basic syntax):
    dim pos as number
    ' Find where RuntimeMunutes old and new values start:
    pos = InStr({really long string}, "RuntimeMinutes")
    ' Find first OldValue after RuntimeMinutes:
    pos = InStr(pos + 14, {really long string}, "OldValue")  ' 14 = Len("RuntimeMinutes")
    ' Pull out the value:
    formula = val(mid({really long string}, pos + 9,
                        Instr(pos + 9, {really long string}, " ") - pos - 9)) ' 9=Len("OldValue=")
    And do the same for all of the other values you need. 
    HTH,
    Carl

  • Extract URL from a href string

    Greetings,
    I am trying to solve a problem (in a specific way) that will lead to the solution for another problem (which is similar).
    I am trying to extract a URL from an HTML <a> tag like this:
    <a href="www.someurl.com">Go to www.someurl.com</a>Can anyone help with the best solution? I've tried it using String.split() and StringTokenizer (which might work for this example), but, for my real problem, they seem quite inadequate. I'm guessing the solution involves some regex but I don't know where to look (and am quite unfamiliar with regex to know how).
    Thank you in advance.

    Actually, I am trying to break down many sections of the URL.
    The URL I am trying to breakdown has a lot of data that I need.
    I guess a better example would be:
    <a href="www.someurl.com" id="url-id-43612">Link Text - data here</a>In my program, I need to grab three things: the href URL, the id, and "Link Text - data here."
    Here is an SSCCE of how I am currently dealing with this:
    import java.util.StringTokenizer;
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    * @author Ryan
    public class htmlparser {
        public static void main(String[] args) {
            String str = "<a href=\"www.someurl.com\" id=\"url-id-43612\">Link Text - data here</a>";
            str = str.replaceAll("<a href=\"", "\n")
                .replaceAll("\" id=\"url-id-", "\n")
                .replaceAll("\">", "\n")
                .replaceAll("</a>", "\n");
            StringTokenizer tokenizer = new StringTokenizer(str, "\n");
            String url = tokenizer.nextToken();
            String id = tokenizer.nextToken();
            String text = tokenizer.nextToken();
            System.out.println(url);
            System.out.println(id);
            System.out.println(text);
    }But I am looking for a more elegant solution to the problem, is there one?

Maybe you are looking for

  • Problem replacing black with a color

    I am having difficulty replacing black with a specific color (any color). I have a black and white image which is in PSD format and has RGB enabled. I have followed the instructions to replace a color via the following method: Enhance | Adjust Color

  • What is the best moving company? ;)

    Here's the deal. I would like to buy new (bigger) HDD for my laptop. What i want to do is; move all of the partition from my old disk (/, /home, /boot etc.) to the new disk (i want to avoid plain copying). This ofcourse is not a big problem, but i wo

  • Having trouble implementing Captivate simulation in an iFrame

    Hi all, hoping you can give me some pointers. I'm trying to implement Captivate scalable html5 simulations in a proprietary LMS that requires that I place it in an iFrame.  It works, but the scaling is not working properly.  Immediately upon loading,

  • Does anyone know how to get LG mobile 3GP files to open in Quicktime?

    Been trying to find a way to view the files, only player that shows the videos is VLC controller but it won't play the audio. Any help is greatly appreciated.

  • Fill series of vertical cells

    How do you fill a series of cells in increasing numerical order in Number 3.5?