How to extract node value by using xpath in orchestration shape

i want extract the node value by using xpath in expression shape in orch, then assign to variable.
then decide shape in if branch im using check condition based nodevalue .
str = xpath(Message_3, ("string(/*[local-name()='Root' and namespace-uri()='http://BizTalk_Server_ProjectRNd2.Schema3']/*[local-name()='no' and namespace-uri()=''])"));
but i got below error:
xlang/s engine event log entry: Uncaught exception (see the 'inner exception' below) has suspended an instance of service 'BizTalk_Server_ProjectRNd2.BizTalk_Orchestration1(f3c581d3-049f-8a8a-9316-fc1235b03f99)'.
The service instance will remain suspended until administratively resumed or terminated. 
If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception.
InstanceId: 020779be-713d-408c-9ff4-fd1462c2e52c
Shape name: Expression_1
ShapeId: b865a3e1-7ebe-410d-9f60-8ad2139ad234
Exception thrown from: segment 1, progress 10
Inner exception: There is an error in the XML document.
Exception type: InvalidOperationException
Source: System.Xml
Target Site: System.Object Deserialize(System.Xml.XmlReader, System.String, System.Xml.Serialization.XmlDeserializationEvents)
The following is a stack trace that identifies the location where the exception occured
   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
   at Microsoft.XLANGs.Core.Part.XPathLoad(Part sourcePart, String xpath, Type dstType)
   at BizTalk_Server_ProjectRNd2.BizTalk_Orchestration1.segment1(StopConditions stopOn)
   at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception& exp)
Additional error information:
        <no xmlns=''> was not expected.
Exception type: InvalidOperationException
Source: System.Xml
Target Site: System.Object Read_string()
The following is a stack trace that identifies the location where the exception occured
   at System.Xml.Serialization.XmlSerializationPrimitiveReader.Read_string()
   at System.Xml.Serialization.XmlSerializer.DeserializePrimitive(XmlReader xmlReader, XmlDeserializationEvents events)
   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)

Hi,
as per your  code i got below error 
Uncaught exception (see the 'inner exception' below) has suspended an instance of service 'BizTalk_Server_ProjectRNd2.BizTalk_Orchestration1(f3c581d3-049f-8a8a-9316-fc1235b03f99)'.
The service instance will remain suspended until administratively resumed or terminated. 
If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception.
InstanceId: f5fffb05-e6d6-4765-83da-4e6c9696dd8a
Shape name: Expression_1
ShapeId: b865a3e1-7ebe-410d-9f60-8ad2139ad234
Exception thrown from: segment 1, progress 10
Inner exception: There is an error in the XML document.
Exception type: InvalidOperationException
Source: System.Xml
Target Site: System.Object Deserialize(System.Xml.XmlReader, System.String, System.Xml.Serialization.XmlDeserializationEvents)
The following is a stack trace that identifies the location where the exception occured
   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializat
this is my schema:
  <?xml version="1.0" encoding="utf-16"
?>
<xs:schema xmlns="http://BizTalk_Server_ProjectRNd2.Schema3" xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
xmlns:ns0="https://BizTalk_Server_ProjectRNd2.PropertySchema" targetNamespace="http://BizTalk_Server_ProjectRNd2.Schema3" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:annotation>
<xs:appinfo>
<b:imports>
  <b:namespace
prefix="ns0" uri="https://BizTalk_Server_ProjectRNd2.PropertySchema" location=".\PropertySchema.xsd"
/>
  </b:imports>
  </xs:appinfo>
  </xs:annotation>
<xs:element name="Root">
<xs:annotation>
<xs:appinfo>
<b:properties>
  <b:property
name="ns0:no" xpath="/*[local-name()='Root' and namespace-uri()='http://BizTalk_Server_ProjectRNd2.Schema3']/*[local-name()='no' and namespace-uri()='']"
/>
  </b:properties>
  </xs:appinfo>
  </xs:annotation>
<xs:complexType>
<xs:sequence>
  <xs:element
name="no" type="xs:string" />
  <xs:element
name="name" type="xs:string" />
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  </xs:schema>

Similar Messages

  • Can anybody tell me how to extract sales value and cost value for an materi

    dear all,
    Can anybody tell me how to extract sales value and cost value for an material sold .
    All the values of cost value and sale values are getting  stored in bseg-wrbtr field .
    How to identify them uniquely.
    Or there is another way to find the sale and cost values.
    Regards
    Mave

    Hi Mave!
    Normally there is no condition change, when something is sold.
    But sales price depends on sales conditions (not only price, but also surcharges, discounts, taxes - if customized).
    Nevertheless, after selling you have a invoice document, where correct values <i>should</i> be stored (see VBRP fields mentioned above). If here is a problem, then customizing of price determination is in question, not a programming of user-exits with MARD selection for costs (or some other tries to get a price).
    When you specify your requirements more in detail, you might get better answers - but currently only general hints are possible ('see in invioce / G/L accounts').
    Regards,
    Christian

  • How to get default values while using the transaction "BP"

    Hi Group,
    I have a query on how to get default values while using the transaction <b>BP</b>?
    The thing is:
    when I enter into the transaction "BP", I need to see some default values to some of the input fields in the screen.
    how can I achieve this?
    So please kindly let me know the procedure to achieve this.
    Thanks & Regards,
    Vishnu.

    Hi,
    The events of BDT can be used to default some fields on creating a partner.
    For this create a function module for ISDAT. attach that event in BUS7.
    In the ISDAT funtion modulethe following code should be used.
    For example to set the nationality:
    I_BUSDEFAULT-NATIO = 'DE.
    CALL FUNCTION 'BUP_BUPA_FIELDVALUES_SET'
    EXPORTING
    i_busdefault = I_BUSDEFAULT
    Regards, Smita.

  • Extract Node Values using XPATH

    This may be a repeat question.
    No offence meant
    I am using XPATH to extract values from the nodes.
    I need to extract the value of i:RequestedBy Node using XPATH
    <?xml version="1.0" encoding="UTF-8"?>
    <i:Interest>
    <i:Status>0</i:Status>
    <i:Generation>2</i:Generation>
    <i:Details xsi:type="i:vanilla.details.stock">
       <i:RequestedBy>AA.MM</i:RequestedBy>
    The above XML is of type Document
    Document msgDoc;
    XPath xpath = XPathFactory.newInstance().newXPath();
    XPathExpression expr;
    Object result=null;
         try {
                  expr = xpath.compile("i:Interest/i:Details/i:RequestedBy/text()");
                  result = expr.evaluate(msgDoc, XPathConstants.NODESET);
               NodeList nodes = (NodeList) result;
                for (int i = 0; i < nodes.getLength(); i++) {
                 System.out.println(nodes.item(i).getNodeValue());
         } catch (XPathExpressionException e1) {
         e1.printStackTrace();
                             I am getting null/
    Is my XPATH correct?

    I don't know if your XPath is correct or not. Your XML is not well-formed because the namespace declarations are missing. And I don't see where you set the namespace context for your XPath object; that is quite likely why it doesn't do what you want.

  • Extracting node value from XPath Expression in OSB Conditional Branch

    HI All
    While using conditional branch in OSB,i only get an XPath Expression editor to set a variable used to test a condition.
    Now let's say my request is
    <Body>
    <exam:PersonSearchReq xmlns:exam="http://www.example.org">
    <exam:RequestorSSO>James</exam:RequestorSSO>
    </exam:PersonSearchReq>
    </Body>
    I write my XPath expression as :
    ./exam:PersonSearchReq/exam:RequestorSSO/text()
    Now if I test this using the tester application , insted of getting node value 'James' ,i get the entire node element ,i.e
    <exam:RequestorSSO xmlns:exam="http://www.example.org">James</exam:RequestorSSO>
    Please suggest how can i extract the text value.
    Regards,
    Chinmay

    Hi Guys
    Actually it turns out that you need to populate In-Variable to function is correctly.As soon as i entere 'body' in it,it worked fine.
    Thanks
    Chinmay

  • How to extract a tags content using DOMParser in PL/SQL

    The structure of my xml-document is as below:
    <Reply>
    <Errors>
    <Error Number="0">No Error Occured</Error>
    </Errors>
    </Reply>
    Using DOMParser in PL/SQL iam able to extract the value associated with the 'Number' attribute in the <Error> tag, but i am unable to extract the text (error message => "No Error Occured") embedded in the <Error> tag.
    How should i go about? Provide any hints, if possible sample code.
    Thanks in Advance.
    RamPrasad.

    In order to get the text, you need to check the child node, as the text really lives by itself.
    For example I modified the DOMSAMPLE to dislay the text not just the attributes. I have included the code below.
    I hope that this helps you.
    for i in 0..len-1 loop
    n := xmldom.item(nl, i);
    dbms_output.put(xmldom.getNodeName(n) || ' ');
    n := xmldom.getfirstchild(n);
    IF xmldom.getnodetype(n) = xmldom.Text_Node THEN
    v_val := xmldom.getnodevalue(n);
    dbms_output.put_line(v_val);
    END IF;
    end loop;
    I really think that the XML tools in Oracle would be much more useful, is they were accompanied by complete documentation.
    The structure of my xml-document is as below:
    <Reply>
    <Errors>
    <Error Number="0">No Error Occured</Error>
    </Errors>
    </Reply>
    Using DOMParser in PL/SQL iam able to extract the value associated with the 'Number' attribute in the <Error> tag, but i am unable to extract the text (error message => "No Error Occured") embedded in the <Error> tag.
    How should i go about? Provide any hints, if possible sample code.
    Thanks in Advance.
    RamPrasad.

  • Issue with extracting node values of an XMLElement with multiple namespaces

    I have created a Table with XMLType Column
    CREATE TABLE xmlNode
    ( ID numeric(10) primary key,
    DATA XMLType);
    Then inserted one row
    INSERT INTO xmlNode(ID, DATA) VALUES(1, '<lineItemElement orderLineItemID="12323" transactionType="New" xmlns="http://rcss.bell.ca/schema/lineitemmessages">
    <rcss:catalogeID xmlns:rcss="http://rcss.bell.ca/schema/PartnerBatch">3234</rcss:catalogeID>
    <rcss:venueID xmlns:rcss="http://rcss.bell.ca/schema/PartnerBatch">345345</rcss:venueID>
    <rcss:startDate xmlns:rcss="http://rcss.bell.ca/schema/PartnerBatch">2007-09-10T00:00:00Z</rcss:startDate>
    <rcss:endDate xmlns:rcss="http://rcss.bell.ca/schema/PartnerBatch">2007-09-10T00:00:00Z</rcss:endDate>
    <rcss:contact contactID="234234" xmlns:rcss="http://rcss.bell.ca/schema/PartnerBatch">
    <rcss:address>
    <rcss:streetAddress1>?asdsd</rcss:streetAddress1>
    <rcss:streetAddress2>?sdss</rcss:streetAddress2>
    <rcss:city>?ddf</rcss:city>
    <rcss:province>?sdcfsdcf</rcss:province>
    <rcss:country>sds</rcss:country>
    <rcss:postalCode>1121332</rcss:postalCode>
    </rcss:address>
    </rcss:contact>
    </lineItemElement>')
    Then i ran:
    SELECT
    extractValue(data,'/lineItemElement/rcss:catalogeID','xmlns=http://rcss.bell.ca/schema/lineitemmessages, xmlns:rcss=http://rcss.bell.ca/schema/PartnerBatch')
    from xml where id=1
    There is nothing returned.
    Please advise how could I get the node value when there is namespace?
    I know how to extract values if there is one namespace but i'm not able to extract values if there are two namespaces.
    Any help is appreciable!!
    Thanks in Advance.

    I fixed that problem too. What I thought was a singleton was actually a repeating element. I needed to be able to "multiply" the repeating node for the main node, but I couldn't find a concise way of doing this in SQL. So instead I did it in with two loops.
    FOR rec IN (
    SELECT
         extractvalue(value(e), 'surchargeEntry/company',p_namespace) company
         ,extractvalue(value(e), 'surchargeEntry/surchargeType',p_namespace) surcharge_type
         ,extractvalue(value(e), 'surchargeEntry/shortDescription',p_namespace) short_description
         ,extractvalue(value(e), 'surchargeEntry/longDescription',p_namespace) long_description
         ,e.column_value surcharge_entry_xml
         FROM TABLE(xmlsequence(extract(p_xml, 'surchargeInquiryResponse' ||
         '/surchargeAttributes/surchargeEntry'
                                                                                    ,p_namespace))) e
    ) LOOP
    FOR rec_country IN (
    SELECT
         extractvalue(value(c), 'country/originationCountry',p_namespace) origination_country
         ,extractvalue(value(c), 'country/destinationCountry',p_namespace) destination_country
         FROM TABLE(xmlsequence(extract(rec.surcharge_entry_xml, 'surchargeEntry/country',p_namespace))) c
    LOOP
    nafta_fee_obj.append_surcharge_entry_data(
              v_arr
              ,r_surcharge_entry(
              rec.company
              ,rec.surcharge_type
              ,rec.short_description
              ,rec.long_description
              ,rec_country.origination_country
              ,rec_country.destination_country
    END LOOP;
    END LOOP;
    I populate a collection, which is easy to pass around between routines. I can easily convert the collection to a ref cursor, and index-by array, comma-delimited string, etc.
    Apparently, the namespace is required in SQL, but not in staright PL/SQL.
    I've also noticed that the docs say xmltype() has all these member functions, but when I try to use some of them, I get an error that it's undefined. Like getNumVal(). There are some functions I can use in SQL, or PL/SQL, but not vice-versa.
    - Dan Clamage

  • Xml: how to get node value when pasing node name as a parameter

    Hi,
    I've got some xml:
    var xmlData:XML =
    <1stNode>
        <buttonID>first child node value</buttonID>
        <imageID>second child node value</imageID>
        <labelID>third child node value</labelID>
    </1stNode>
    Then I want to read specific node value based on a value passed to a function. .
    var buttonID = new Button;
    var imageID = new Image;
    var labelID = new Label;
    getNodeValue(buttonID); //the value here is set dynamically
    private function getNodeValue (nodeName:String):void {
    trace (xmlData.nodeName)                      //doesn't work
    var str:String = "xmlData." + nodeName;
    var xml:XMLList = str as XMLList             //doesn't work
    I'm don't know how to get the value when node name is dynamically changed.

    use:
    getNodeValue(buttonID); //the value here is set dynamically
    private function getNodeValue (nodeName:String):void {
    trace (xmlData[nodeName])                    

  • Count multiple nodes in XML using xPath

    Hi',
    How to count the CUSTSERIAL node in the below XML using xPath.
    <missingICCRec>
    <MissingField xmlns="http://www.Google.com/MissingFields/v1.0">
    <CUSTSERIAL xmlns="http://Google.com/InboundService">23809002RN</CUSTSERIAL>
    <CUSTSERIAL xmlns="http://Google.com/InboundService">23809003RN</CUSTSERIAL>
    <CUSTSERIAL xmlns="http://Google.com/InboundService">23809004RN</CUSTSERIAL>
    </MissingField>
    </missingICCRec>
    Thanks
    Yatan

    Yatan,
    I created a simple BPEL with assign to count the node. Using ora:countNodes() function is throwing exception but when i tried with count() it works.
    XSD seems to be valid. Only you need to have the function as below.
    count(bpws:getVariableData('inputVariable','payload','/client:process/client:missingICCRec/client:MissingField/client:CUSTSERIAL'))
    XSD Used:
    <?xml version="1.0" encoding="UTF-8"?>
    <schema attributeFormDefault="unqualified" elementFormDefault="qualified"
    targetNamespace="http://xmlns.oracle.com/PIMtoRPASAmendment/BPLENodeCount/BPLENodeCount"
    xmlns="http://www.w3.org/2001/XMLSchema">
    <element name="process">
    <complexType>
    <sequence>
    <element name="missingICCRec">
    <complexType>
    <sequence>
    <element name="MissingField">
    <complexType>
    <sequence>
    <element name="CUSTSERIAL" maxOccurs="unbounded" type="string"/>
    </sequence>
    </complexType>
    </element>
    </sequence>
    </complexType>
    </element>
    </sequence>
    </complexType>
    </element>
    <element name="processResponse">
    <complexType>
    <sequence>
    <element name="result" type="string"/>
    </sequence>
    </complexType>
    </element>
    </schema>
    This works !!!
    Please let me know if this helps.
    Thanks,
    Vijay

  • Best way to extract XML value wiith an xpath

    Hello,
    I wonder what is the best way to extract text value from XmlType with an xpath.
    I need to insert a row inside a table where the row's data come from xpath extractions of an XmlType. I do a lot of (approximative 20) :
    EXTRACTVALUE(var.myxmltype , '/an/xpath/to/extract/elem1').
    EXTRACTVALUE(var.myxmltype , '/an/xpath/to/extract/elemI').
    EXTRACTVALUE(var.myxmltype , '/an/xpath/to/extract/elem20').
    inside the insert statement
    Is this way is the best or is there a more optimal way ?
    For example extracting the node '/an/xpath/to/extract/' and sarting from this node extracting "elem1", ... , "elemI", "elemN" children.
    Thanks for your help,
    Regards,
    Nicolas

    Hi Nicolas,
    The answer depends on your actual storage method (binary, OR, CLOB?), and db version.
    You can try XMLTable, it might be better in this case :
    SELECT x.elem1, x.elem2, ... , x.elem20
    FROM your_table t
       , XMLTable(
          '/an/xpath/to/extract'
          passing t.myxmltype
          columns elem1  varchar2(30) path 'elem1'
                , elem2  varchar2(30) path 'elem2'
                , elem20 varchar2(30) path 'elem20'
         ) x
    ;

  • How do I retrive date field using Xpath

    How do I retrive data,which is in date format in XML file using XPath query.
    If this is not possible, Is there any other alternative?
    Bye

    Hi,
    If suppose my xml file is like this,
    <Xml>
    <DataSet>
         <BirthDate>1-Sep-1980</BirthDate>
         <BirthDate>6-Aug-1982</BirthDate>
         <BirthDate>3-Sep-1981</BirthDate>
         <BirthDate>12-Jan-1985</BirthDate>
         <BirthDate>1-Sep-1979</BirthDate>
    </DataSet>
    </Xml>
    If I want to retrive Data,BirthDate between 1-Jan-1981 and 1-Jan-1984
    How do I do that?
    If it is not possible directly,Is there any other alternative?
    Bye

  • How to change table value set using FND_LOAD

    Hi ,
    I need to change my existing " table valueset " tablename .
    As i know we cont change it from front end if it is created once. but i am trying to create same value set in other instance and uploading it using FND_LOAD .
    Is it Possible ?
    IF yes please guide ?
    I feel greate if any one helps me.
    Regards ,
    Azam.

    Hi,
    You could use FNDLOAD to download the values, and edit the ldt file before uploading it back using FNDLOAD.
    Search My Oracle Support for "FNDLOAD afffload.lct", you should get couple of hits which should be helpful.
    Note: 252853.1 - 11i AOL : How to Load Value Set Values When Using Fndload To Load A Concurrent Program
    Note: 274528.1 - How To Download Single Context Using FNDLOAD For Descriptive Flexfield
    Regards,
    Hussein

  • How to extract the values from WPBP table

    Hi experts,
    We are in preparation of a custom report.
    In the report we want to have a  value from WPBP table.
    We want to extract the value of Capacity utilization level from WPBP table.
    Could you please let me know the way to extract the value.
    Please advice.
    Regards,
    Sairam.

    Hi Sairam,
    Why do you try to get capacity utilization level from WBPB. Even if there is split in payroll capacity utilizatian level in WPBP shows the value in IT0008 basic pay.
    So instead you can get the required information from table PA0008 Field for capacity utilization level is BSGRD
    Regards;
    Okan

  • How to get node value of XML file from XMLTYPE field of databases

    Hi,
    I want to select node value of XML from XMLTYPE field of oracle db into java code.
    Feel free to answer me if you have any idea about it.
    Thanks

    For XMLType refer
    http://www.oracle.com/oramag/oracle/01-nov/o61xml.html
    http://www.lc.leidenuniv.nl/awcourse/oracle/appdev.920/a96620/xdb04cre.htm

  • How to add node value using org.w3c.dom.Document?

    Hi ,
    I'm using org.w3c.dom.Document to deal with xml files. I could successfully add nodes , and their attributes. However I could not add a value of the node. (e.g. <myNode>I couldn't add this value</myNode>)
    does anyone know how to deal with this?
    I tried subNode.setNodeValue("the value i can't add"); whereas the subNode is an instance of org.w3c.dom.Node... i know this is interface i of course used the concrete class
    org.apache.crimson.tree.ElementNode
    but when I used the subNode.getNodeValue() i simply got null?
    can u plz help me?
    thanks in advance

    Reading the API documentation for the Node interface might help. At least you wouldn't be surprised when the results are exactly what the documentation says they will be.
    What would really help would be forgetting the idea that an Element can have a value. Text nodes have values, though, so create a Text node and make it the child of the Element node.

Maybe you are looking for