Using XPATH to extract value.

I need some help to extract the LatestFillQuantity element value using XPATH.
in Java.
I am unable to extract the value of 10000.
Please help as to what have I done wrong.?
The Document configNode contains the flwg:
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<i:Interest >
     <i:Generation>3</i:Generation>
     <i:Extension>
        <i:Active.From/>
        <i:Order>
          <i:Status>Confirm</i:Status>
          <i:LatestFillQuantity>100</i:LatestFillQuantity>
        </i:Order>
</i:Extension>
</i:Interest>
My Java Code
private void extractValue(Document configNode)
     XPathFactory factory = XPathFactory.newInstance();
        XPath xpath = factory.newXPath();
          try{
         XPathExpression expr
          = xpath.compile("//i:Order/i:LatestFillQuantity/text()");
         Object result = expr.evaluate(configNode, XPathConstants.NODESET);
         NodeList nodes = (NodeList) result;
         for (int i = 0; i < nodes.getLength(); i++) {
             System.out.println(nodes.item(i).getNodeValue());
         }catch(Exception e){
              System.out.println("Sorry,this aint working");
     }

The nodes being parsed are namespace prefixed.
To parse a namespace node with the JDK 5.0 javax.xml.xpath package, set the NamespaceContext on the XPath object.
An implementation of NamespaceContext with a single prefix corresponding to a namespace uri:
public class NamespaceContextImpl implements NamespaceContext{
public String uri;
public String prefix;
public NamespaceContextImpl(){}
public NamespaceContextImpl(String prefix, String uri){
     this.uri=uri;
     this.prefix=prefix;
public String getNamespaceURI(String prefix){
   return uri;
public void setNamespaceURI(String uri){
   this.uri=uri;
public String getPrefix(String uri){
   return prefix;
public void setPrefix(String prefix){
   this.prefix=prefix;
public Iterator getPrefixes(String uri){return null;}
}

Similar Messages

  • Using XSLT to extract value of a XML node with namespace

    I have a XML source code here.
    <?xml version="1.0" encoding="utf-8" ?>
    <rss version="2.0" xmlns:job="http://www.pageuppeople.com">
      <channel>
        <title>SMH Jobs</title>
        <link>internalrecruitment.smhgroup.com.au/jobsrss.ashx?stp=di</link>
        <description>A listing of jobs available here</description>
        <item>
          <title>eCommerce Optimisation Advisor</title>
          <description>A new and exciting opportunity exists for an experienced eCommerce Advisor to join</description>
          <job:location PUReferenceID="3711">Sydney - Inner Suburbs & CBD</job:location>
        </item>
      </channel>
    </rss>
    I want to use XSLT to extract value of a XML node with namespace <job:location>, and the returned value should be string 'Sydney - Inner Suburbs & CBD'. I tried a few XSL code below, but failed with error or nothing was returned.
    <xsl:value-of select="job:location" disable-output-escaping="yes"/>
    <xsl:value-of select="job/location" disable-output-escaping="yes"/>
    <xsl:value-of select="job\location" disable-output-escaping="yes"/>
    <xsl:value-of select="location" disable-output-escaping="yes"/>
    This might be an easy question for you, but I would appreciate if anyone can help.

    Hi Suncorp IT Learner,
    We need to tell the XSLT that some elements are in another namespace. Copy the xmls declarations for the prefixes you need to use. Then use the xsl format as:
    <xsl: value-of select=”job:location/@PUReferenceID”/>
    In following issue, Chriztian has a good explanation:
    http://our.umbraco.org/forum/developers/xslt/33353-XSLT-reading-XML-attribute-value
    Thanks,
    Qiao Wei
    TechNet Community Support

  • How to use xPath to extract a element from a xml stringin BPEL workflow?

    I have a xml string passed into the BPEL workflow, and I need to extract the value of "serviceOrderGuid" (see the xml string below), how I can use BPEL mapper to do this? I am using NetBeans 6.0/M10.
    Thanks
    Kebin
    <Parameters xmlns="http://www.sunmicrosoft.com/TrueOMF/WorkflowInformation.xsd">
    <Parameter isIn="false" isOut="true" name="serviceOrderGuid">
    <Value>5e8c9de9-f9b9-4815-bc06-e1572ff122f2</Value>
    </Parameter>
    <Parameter isIn="false" isOut="true" name="elementOfferGuid">
    <Value>4f7c9de2-f9b9-4815-bc06-e1572ee122e2</Value>
    </Parameter>
    </Parameters>

    Thank you for your help so far, but I still have issues to be resolved.
    I developed couple of workflows, in assign activity, I used query to retrieve some value from xml string, e.g.
    <copy>
    <from variable="OriginalEventMessage">
    <query>/node()/*[ ( local-name() = 'Request' ) ]/*[ ( local-name() = 'Parameters' ) ]/*[ (  ( local-name() = 'Parameter' )  and  ( @name = 'serviceOrderGuid' )  ) ]/*[ ( local-name() = 'Value' ) ]</query>
    </from>
    <to variable="CallMefIn" part="EventMessage">
    <query>//*[local-name()='Request']/*[local-name()='Parameters']/*[local-name()='Parameter' and @name='serviceOrderGuid']/*[local-name()='Value']</query>
    </to>
    </copy>
    at deployment, I got messages like "Starting BPELSE deploy process
    FromXmlParser.endElement(): Found unrecognized end element </query>, namespace=http://docs.oasis-open.org/wsbpel/2.0/process/executable
    ToXmlParser.endElement(): Found unrecognized end element </query>, namespace=http://docs.oasis-open.org/wsbpel/2.0/process/executable
    ToXmlParser.endElement(): Found unrecognized end element </query>, namespace=http://docs.oasis-open.org/wsbpel/2.0/process/executable
    What is the problem?
    I attach the whole deployment log for your review.
    Thanks
    Kebin
    Stopping service assembly MefWorkflowCompositeApp on target server.
    Stopping suId : MefWorkflowCompositeApp-sun-http-binding
    Stopped suId : MefWorkflowCompositeApp-sun-http-binding
    Shutting down service assembly MefWorkflowCompositeApp on target server.
    Shutdown : MefWorkflowCompositeApp-sun-http-binding
    Shutdown : MefWorkflowCompositeApp-sun-http-binding completed
    Undeploying service assembly MefWorkflowCompositeApp from target server.
    Shutdown : MefWorkflowCompositeApp-sun-http-binding
    Shutdown : MefWorkflowCompositeApp-sun-http-binding completed
    JBIMA0412: Service Assembly with ID : MefWorkflowCompositeApp has been undeployed.
    Deploying service assembly MefWorkflowCompositeApp to target server.
    Deploying service unit : MefWorkflowCompositeApp-sun-http-binding from C:\Program Files\glassfish-v2-b53\domains\domain1\jbi\service-assemblies\MefWorkflowCompositeApp\MefWorkflowCompositeApp-sun-http-binding\sun-http-binding
    Retrieving document at 'C:\Program Files\glassfish-v2-b53\domains\domain1\jbi\service-assemblies\MefWorkflowCompositeApp\MefWorkflowCompositeApp-sun-http-binding\sun-http-binding\MefWorkflow\AlertMefBpel.wsdl'.
    Retrieving document at 'MEFWEBService.wsdl', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/AlertMefBpel.wsdl'.
    Retrieving schema at 'WorkflowInformation.xsd', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/MEFWEBService.wsdl'.
    Retrieving document at 'C:\Program Files\glassfish-v2-b53\domains\domain1\jbi\service-assemblies\MefWorkflowCompositeApp\MefWorkflowCompositeApp-sun-http-binding\sun-http-binding\MefWorkflow\AlertMefWeb.wsdl'.
    Retrieving document at 'MEFWEBService.wsdl', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/AlertMefWeb.wsdl'.
    Retrieving schema at 'WorkflowInformation.xsd', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/MEFWEBService.wsdl'.
    Retrieving document at 'C:\Program Files\glassfish-v2-b53\domains\domain1\jbi\service-assemblies\MefWorkflowCompositeApp\MefWorkflowCompositeApp-sun-http-binding\sun-http-binding\MefWorkflow\ArchitectMefBpel.wsdl'.
    Retrieving document at 'MEFWEBService.wsdl', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/ArchitectMefBpel.wsdl'.
    Retrieving schema at 'WorkflowInformation.xsd', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/MEFWEBService.wsdl'.
    Retrieving document at 'C:\Program Files\glassfish-v2-b53\domains\domain1\jbi\service-assemblies\MefWorkflowCompositeApp\MefWorkflowCompositeApp-sun-http-binding\sun-http-binding\MefWorkflow\ArchitectMefWeb.wsdl'.
    Retrieving document at 'MEFWEBService.wsdl', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/ArchitectMefWeb.wsdl'.
    Retrieving schema at 'WorkflowInformation.xsd', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/MEFWEBService.wsdl'.
    Retrieving document at 'C:\Program Files\glassfish-v2-b53\domains\domain1\jbi\service-assemblies\MefWorkflowCompositeApp\MefWorkflowCompositeApp-sun-http-binding\sun-http-binding\MefWorkflow\CallMef.wsdl'.
    Retrieving schema at 'WorkflowInformation.xsd', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/CallMef.wsdl'.
    Retrieving document at 'C:\Program Files\glassfish-v2-b53\domains\domain1\jbi\service-assemblies\MefWorkflowCompositeApp\MefWorkflowCompositeApp-sun-http-binding\sun-http-binding\MefWorkflow\CallSD.wsdl'.
    Retrieving schema at 'WorkflowInformation.xsd', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/CallSD.wsdl'.
    Retrieving document at 'C:\Program Files\glassfish-v2-b53\domains\domain1\jbi\service-assemblies\MefWorkflowCompositeApp\MefWorkflowCompositeApp-sun-http-binding\sun-http-binding\MefWorkflow\FeatureBuilderMefBpel.wsdl'.
    Retrieving document at 'MEFWEBService.wsdl', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/FeatureBuilderMefBpel.wsdl'.
    Retrieving schema at 'WorkflowInformation.xsd', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/MEFWEBService.wsdl'.
    Retrieving document at 'C:\Program Files\glassfish-v2-b53\domains\domain1\jbi\service-assemblies\MefWorkflowCompositeApp\MefWorkflowCompositeApp-sun-http-binding\sun-http-binding\MefWorkflow\FeatureBuilderMefWeb.wsdl'.
    Retrieving document at 'MEFWEBService.wsdl', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/FeatureBuilderMefWeb.wsdl'.
    Retrieving schema at 'WorkflowInformation.xsd', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/MEFWEBService.wsdl'.
    Retrieving document at 'C:\Program Files\glassfish-v2-b53\domains\domain1\jbi\service-assemblies\MefWorkflowCompositeApp\MefWorkflowCompositeApp-sun-http-binding\sun-http-binding\MefWorkflow\GlobalStoreMefBpel.wsdl'.
    Retrieving document at 'MEFWEBService.wsdl', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/GlobalStoreMefBpel.wsdl'.
    Retrieving schema at 'WorkflowInformation.xsd', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/MEFWEBService.wsdl'.
    Retrieving document at 'C:\Program Files\glassfish-v2-b53\domains\domain1\jbi\service-assemblies\MefWorkflowCompositeApp\MefWorkflowCompositeApp-sun-http-binding\sun-http-binding\MefWorkflow\GlobalStoreMefWeb.wsdl'.
    Retrieving document at 'MEFWEBService.wsdl', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/GlobalStoreMefWeb.wsdl'.
    Retrieving schema at 'WorkflowInformation.xsd', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/MEFWEBService.wsdl'.
    Retrieving document at 'C:\Program Files\glassfish-v2-b53\domains\domain1\jbi\service-assemblies\MefWorkflowCompositeApp\MefWorkflowCompositeApp-sun-http-binding\sun-http-binding\MefWorkflow\LocalStoreMefBpel.wsdl'.
    Retrieving document at 'MEFWEBService.wsdl', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/LocalStoreMefBpel.wsdl'.
    Retrieving schema at 'WorkflowInformation.xsd', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/MEFWEBService.wsdl'.
    Retrieving document at 'C:\Program Files\glassfish-v2-b53\domains\domain1\jbi\service-assemblies\MefWorkflowCompositeApp\MefWorkflowCompositeApp-sun-http-binding\sun-http-binding\MefWorkflow\LocalStoreMefWeb.wsdl'.
    Retrieving document at 'MEFWEBService.wsdl', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/LocalStoreMefWeb.wsdl'.
    Retrieving schema at 'WorkflowInformation.xsd', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/MEFWEBService.wsdl'.
    Retrieving document at 'C:\Program Files\glassfish-v2-b53\domains\domain1\jbi\service-assemblies\MefWorkflowCompositeApp\MefWorkflowCompositeApp-sun-http-binding\sun-http-binding\MefWorkflow\LogCurrentState.wsdl'.
    Retrieving schema at 'WorkflowInformation.xsd', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/LogCurrentState.wsdl'.
    Retrieving document at 'C:\Program Files\glassfish-v2-b53\domains\domain1\jbi\service-assemblies\MefWorkflowCompositeApp\MefWorkflowCompositeApp-sun-http-binding\sun-http-binding\MefWorkflow\MEFWEBService.wsdl'.
    Retrieving schema at 'WorkflowInformation.xsd', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/MEFWEBService.wsdl'.
    Retrieving document at 'C:\Program Files\glassfish-v2-b53\domains\domain1\jbi\service-assemblies\MefWorkflowCompositeApp\MefWorkflowCompositeApp-sun-http-binding\sun-http-binding\MefWorkflow\OperatorInputMefBpel.wsdl'.
    Retrieving document at 'MEFWEBService.wsdl', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/OperatorInputMefBpel.wsdl'.
    Retrieving schema at 'WorkflowInformation.xsd', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/MEFWEBService.wsdl'.
    Retrieving document at 'C:\Program Files\glassfish-v2-b53\domains\domain1\jbi\service-assemblies\MefWorkflowCompositeApp\MefWorkflowCompositeApp-sun-http-binding\sun-http-binding\MefWorkflow\OperatorInputMefWeb.wsdl'.
    Retrieving document at 'MEFWEBService.wsdl', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/OperatorInputMefWeb.wsdl'.
    Retrieving schema at 'WorkflowInformation.xsd', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/MEFWEBService.wsdl'.
    Retrieving document at 'C:\Program Files\glassfish-v2-b53\domains\domain1\jbi\service-assemblies\MefWorkflowCompositeApp\MefWorkflowCompositeApp-sun-http-binding\sun-http-binding\MefWorkflow\OrderManagementMefBpel.wsdl'.
    Retrieving document at 'MEFWEBService.wsdl', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/OrderManagementMefBpel.wsdl'.
    Retrieving schema at 'WorkflowInformation.xsd', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/MEFWEBService.wsdl'.
    Retrieving document at 'C:\Program Files\glassfish-v2-b53\domains\domain1\jbi\service-assemblies\MefWorkflowCompositeApp\MefWorkflowCompositeApp-sun-http-binding\sun-http-binding\MefWorkflow\OrderManagementMefWeb.wsdl'.
    Retrieving document at 'MEFWEBService.wsdl', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/OrderManagementMefWeb.wsdl'.
    Retrieving schema at 'WorkflowInformation.xsd', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/MEFWEBService.wsdl'.
    Retrieving document at 'C:\Program Files\glassfish-v2-b53\domains\domain1\jbi\service-assemblies\MefWorkflowCompositeApp\MefWorkflowCompositeApp-sun-http-binding\sun-http-binding\MefWorkflow\RBLocalStoreMefBpel.wsdl'.
    Retrieving document at 'MEFWEBService.wsdl', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/RBLocalStoreMefBpel.wsdl'.
    Retrieving schema at 'WorkflowInformation.xsd', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/MEFWEBService.wsdl'.
    Retrieving document at 'C:\Program Files\glassfish-v2-b53\domains\domain1\jbi\service-assemblies\MefWorkflowCompositeApp\MefWorkflowCompositeApp-sun-http-binding\sun-http-binding\MefWorkflow\RBLocalStoreMefWeb.wsdl'.
    Retrieving document at 'MEFWEBService.wsdl', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/RBLocalStoreMefWeb.wsdl'.
    Retrieving schema at 'WorkflowInformation.xsd', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/MEFWEBService.wsdl'.
    Retrieving document at 'C:\Program Files\glassfish-v2-b53\domains\domain1\jbi\service-assemblies\MefWorkflowCompositeApp\MefWorkflowCompositeApp-sun-http-binding\sun-http-binding\MefWorkflow\SecurityMefBpel.wsdl'.
    Retrieving document at 'MEFWEBService.wsdl', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/SecurityMefBpel.wsdl'.
    Retrieving schema at 'WorkflowInformation.xsd', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/MEFWEBService.wsdl'.
    Retrieving document at 'C:\Program Files\glassfish-v2-b53\domains\domain1\jbi\service-assemblies\MefWorkflowCompositeApp\MefWorkflowCompositeApp-sun-http-binding\sun-http-binding\MefWorkflow\SecurityMefWeb.wsdl'.
    Retrieving document at 'MEFWEBService.wsdl', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/SecurityMefWeb.wsdl'.
    Retrieving schema at 'WorkflowInformation.xsd', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/MEFWEBService.wsdl'.
    Retrieving document at 'C:\Program Files\glassfish-v2-b53\domains\domain1\jbi\service-assemblies\MefWorkflowCompositeApp\MefWorkflowCompositeApp-sun-http-binding\sun-http-binding\MefWorkflow\SmsAdministratorMefBpel.wsdl'.
    Retrieving document at 'MEFWEBService.wsdl', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/SmsAdministratorMefBpel.wsdl'.
    Retrieving schema at 'WorkflowInformation.xsd', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/MEFWEBService.wsdl'.
    Retrieving document at 'C:\Program Files\glassfish-v2-b53\domains\domain1\jbi\service-assemblies\MefWorkflowCompositeApp\MefWorkflowCompositeApp-sun-http-binding\sun-http-binding\MefWorkflow\SmsAdministratorMefWeb.wsdl'.
    Retrieving document at 'MEFWEBService.wsdl', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/SmsAdministratorMefWeb.wsdl'.
    Retrieving schema at 'WorkflowInformation.xsd', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/MEFWEBService.wsdl'.
    Retrieving document at 'C:\Program Files\glassfish-v2-b53\domains\domain1\jbi\service-assemblies\MefWorkflowCompositeApp\MefWorkflowCompositeApp-sun-http-binding\sun-http-binding\MefWorkflow\SmsParentMefBpel.wsdl'.
    Retrieving document at 'MEFWEBService.wsdl', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/SmsParentMefBpel.wsdl'.
    Retrieving schema at 'WorkflowInformation.xsd', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/MEFWEBService.wsdl'.
    Retrieving schema at 'WorkflowInformation.xsd', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/SmsParentMefBpel.wsdl'.
    Retrieving document at 'C:\Program Files\glassfish-v2-b53\domains\domain1\jbi\service-assemblies\MefWorkflowCompositeApp\MefWorkflowCompositeApp-sun-http-binding\sun-http-binding\MefWorkflow\SmsParentMefWeb.wsdl'.
    Retrieving document at 'MEFWEBService.wsdl', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/SmsParentMefWeb.wsdl'.
    Retrieving schema at 'WorkflowInformation.xsd', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/MEFWEBService.wsdl'.
    Retrieving document at 'C:\Program Files\glassfish-v2-b53\domains\domain1\jbi\service-assemblies\MefWorkflowCompositeApp\MefWorkflowCompositeApp-sun-http-binding\sun-http-binding\MefWorkflow\SolutionDomainBpel.wsdl'.
    Retrieving schema at 'WorkflowInformation.xsd', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/SolutionDomainBpel.wsdl'.
    Retrieving document at 'C:\Program Files\glassfish-v2-b53\domains\domain1\jbi\service-assemblies\MefWorkflowCompositeApp\MefWorkflowCompositeApp-sun-http-binding\sun-http-binding\MefWorkflow\SssMefBpel.wsdl'.
    Retrieving document at 'MEFWEBService.wsdl', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/SssMefBpel.wsdl'.
    Retrieving schema at 'WorkflowInformation.xsd', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/MEFWEBService.wsdl'.
    Retrieving document at 'C:\Program Files\glassfish-v2-b53\domains\domain1\jbi\service-assemblies\MefWorkflowCompositeApp\MefWorkflowCompositeApp-sun-http-binding\sun-http-binding\MefWorkflow\SssMefWeb.wsdl'.
    Retrieving document at 'MEFWEBService.wsdl', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/SssMefWeb.wsdl'.
    Retrieving schema at 'WorkflowInformation.xsd', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/MEFWEBService.wsdl'.
    Retrieving document at 'C:\Program Files\glassfish-v2-b53\domains\domain1\jbi\service-assemblies\MefWorkflowCompositeApp\MefWorkflowCompositeApp-sun-http-binding\sun-http-binding\MefWorkflow\SSSTalkerMefBpel.wsdl'.
    Retrieving document at 'MEFWEBService.wsdl', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/SSSTalkerMefBpel.wsdl'.
    Retrieving schema at 'WorkflowInformation.xsd', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/MEFWEBService.wsdl'.
    Retrieving document at 'C:\Program Files\glassfish-v2-b53\domains\domain1\jbi\service-assemblies\MefWorkflowCompositeApp\MefWorkflowCompositeApp-sun-http-binding\sun-http-binding\MefWorkflow\SSSTalkerMefWeb.wsdl'.
    Retrieving document at 'MEFWEBService.wsdl', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/SSSTalkerMefWeb.wsdl'.
    Retrieving schema at 'WorkflowInformation.xsd', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/MEFWEBService.wsdl'.
    Retrieving document at 'C:\Program Files\glassfish-v2-b53\domains\domain1\jbi\service-assemblies\MefWorkflowCompositeApp\MefWorkflowCompositeApp-sun-http-binding\sun-http-binding\MefWorkflow\UtilityServiceBpel.wsdl'.
    Retrieving schema at 'WorkflowInformation.xsd', relative to 'file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/service-assemblies/MefWorkflowCompositeApp/MefWorkflowCompositeApp-sun-http-binding/sun-http-binding/MefWorkflow/UtilityServiceBpel.wsdl'.
    JBIMA0402: Service Assembly file:/C:/Program Files/glassfish-v2-b53/domains/domain1/jbi/tmp/28345a2b1143bbd25887fe9/MefWorkflowCompositeApp.zip has been deployed.
    Starting service assembly MefWorkflowCompositeApp on target server.
    Starting BPELSE deploy process
    FromXmlParser.endElement(): Found unrecognized end element </query>, namespace=http://docs.oasis-open.org/wsbpel/2.0/process/executable
    ToXmlParser.endElement(): Found unrecognized end element </query>, namespace=http://docs.oasis-open.org/wsbpel/2.0/process/executable
    ToXmlParser.endElement(): Found unrecognized end element </query>, namespace=http://docs.oasis-open.org/wsbpel/2.0/process/executable
    FromXmlParser.endElement(): Found unrecognized end element </query>, namespace=http://docs.oasis-open.org/wsbpel/2.0/process/executable
    ToXmlParser.endElement(): Found unrecognized end element </query>, namespace=http://docs.oasis-open.org/wsbpel/2.0/process/executable
    FromXmlParser.endElement(): Found unrecognized end element </query>, namespace=http://docs.oasis-open.org/wsbpel/2.0/process/executable
    ToXmlParser.endElement(): Found unrecognized end element </query>, namespace=http://docs.oasis-open.org/wsbpel/2.0/process/executable
    FromXmlParser.endElement(): Found unrecognized end element </query>, namespace=http://docs.oasis-open.org/wsbpel/2.0/process/executable
    ToXmlParser.endElement(): Found unrecognized end element </query>, namespace=http://docs.oasis-open.org/wsbpel/2.0/process/executable
    FromXmlParser.endElement(): Found unrecognized end element </query>, namespace=http://docs.oasis-open.org/wsbpel/2.0/process/executable
    ToXmlParser.endElement(): Found unrecognized end element </query>, namespace=http://docs.oasis-open.org/wsbpel/2.0/process/executable
    FromXmlParser.endElement(): Found unrecognized end element </query>, namespace=http://docs.oasis-open.org/wsbpel/2.0/process/executable
    ToXmlParser.endElement(): Found unrecognized end element </query>, namespace=http://docs.oasis-open.org/wsbpel/2.0/process/executable
    FromXmlParser.endElement(): Found unrecognized end element </query>, namespace=http://docs.oasis-open.org/wsbpel/2.0/process/executable
    ToXmlParser.endElement(): Found unrecognized end element </query>, namespace=http://docs.oasis-open.org/wsbpel/2.0/process/executable
    ToXmlParser.endElement(): Found unrecognized end element </query>, namespace=http://docs.oasis-open.org/wsbpel/2.0/process/executable
    FromXmlParser.endElement(): Found unrecognized end element </query>, namespace=http://docs.oasis-open.org/wsbpel/2.0/process/executable
    FromXmlParser.endElement(): Found unrecognized end element </query>, namespace=http://docs.oasis-open.org/wsbpel/2.0/process/executable
    ToXmlParser.endElement(): Found unrecognized end element </query>, namespace=http://docs.oasis-open.org/wsbpel/2.0/process/executable
    FromXmlParser.endElement(): Found unrecognized end element </query>, namespace=http://docs.oasis-open.org/wsbpel/2.0/process/executable
    ToXmlParser.endElement(): Found unrecognized end element </query>, namespace=http://docs.oasis-open.org/wsbpel/2.0/process/executable
    FromXmlParser.endElement(): Found unrecognized end element </query>, namespace=http://docs.oasis-open.org/wsbpel/2.0/process/executable
    FromXmlParser.endElement(): Found unrecognized end element </query>, namespace=http://docs.oasis-open.org/wsbpel/2.0/process/executable
    ToXmlParser.endElement(): Found unrecognized end element </query>, namespace=http://docs.oasis-open.org/wsbpel/2.0/process/executable
    ToXmlParser.endElement(): Found unrecognized end element </query>, namespace=http://docs.oasis-open.org/wsbpel/2.0/process/executable
    FromXmlParser.endElement(): Found unrecognized end element </query>, namespace=http://docs.oasis-open.org/wsbpel/2.0/process/executable
    ToXmlParser.endElement(): Found unrecognized end element </query>, namespace=http://docs.oasis-open.org/wsbpel/2.0/process/executable
    FromXmlParser.endElement(): Found unrecognized end element </query>, namespace=http://docs.oasis-open.org/wsbpel/2.0/process/executable
    ToXmlParser.endElement(): Found unrecognized end element </query>, namespace=http://docs.oasis-open.org/wsbpel/2.0/process/executable
    FromXmlParser.endElement(): Found unrecognized end element </query>, namespace=http://docs.oasis-open.org/wsbpel/2.0/process/executable
    FromXmlParser.endElement(): Found unrecognized end element </query>, namespace=http://docs.oasis-open.org/wsbpel/2.0/process/executable
    ToXmlParser.endElement(): Found unrecognized end element </query>, namespace=http://docs.oasis-open.org/wsbpel/2.0/process/executable
    ToXmlParser.endElement(): Found unrecognized end element </query>, namespace=http://docs.oasis-open.org/wsbpel/2.0/process/executable
    FromXmlParser.endElement(): Found unrecognized end element </query>, namespace=http://docs.oasis-open.org/wsbpel/2.0/process/executable
    ToXmlParser.endElement(): Found unrecognized end element </query>, namespace=http://docs.oasis-open.org/wsbpel/2.0/process/executable
    FromXmlParser.endElement(): Found unrecognized end element </query>, namespace=http://docs.oasis-open.org/wsbpel/2.0/process/executable
    ToXmlParser.endElement(): Found unrecognized end element </query>, namespace=http://docs.oasis-open.org/wsbpel/2.0/process/executable
    ToXmlParser.endElement(): Found unrecognized end element </query>, namespace=http://docs.oasis-open.org/wsbpel/2.0/process/executable
    FromXmlParser.endElement(): Found unrecognized end element </query>, namespace=http://docs.oasis-open.org/wsbpel/2.0/process/executable
    FromXmlParser.endElement(): Found unrecognized end element </query>, namespace=http://docs.oa

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

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

  • B2B Document Definition - Using xpath 'or' in Identification Value

    Hello,
    I have a requirement similar to the one below, this is an example from the Oracle documentation,
    In the below example, Oracle B2B compares the value of the country attribute to the value set for Identification Value. If the values match, then the document is identified successfully.  I have a scenario, where I will receive data with value in the country attribute to be "US" or "France" or "India". Can an 'or' be used in the identification value? such as US or France or India as the Identification values for the Identification Expression "//*/@country".
    Any ideas / suggestions are greatly appreciated.
    Option 3: Check the Value of an Attribute
    Assume that the value of the country attribute is US. Set the parameters as follows:
    Field
    Value
    Identification Value
    US
    Identification Expression
    //*/@country
    Here is the excerpt of the XML payload for this option.
    Check the Value of an Attribute
    <?xml version="1.0" encoding="windows-1252" ?>
    <MyAddress country="US" xmlns="http://www.example.org"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="PO.xsd">
      <name>B2B Buyer</name>
      <street>100 Oracle Parkway</street>
      <city>Redwood City</city>
      <state>CA</state>
      <zip>94065</zip>
    </MyAddress>
    Thanks,
    Venkatesh

    Hi,
    I am interested to know if you managed to make any progress on this issue?
    We have a similar requirement whereby a trading partner sends an ebMS request using a single document type with the ebMS ACTION header identifying the action the request relates to. For example, the following are the key fields from two requests:
    1)
      SENDER_NAME = TradingPartnerX
      RECEIVER_NAME = OurCompanyName
      SERVICE_NAME = Manage Work
      SERVICE_TYPE = v1.0
      BUSINESS_ACTION_NAME = assignWork
      Payload = <ManageWorkRequest>...</ManageWorkRequest>
    2)
      SENDER_NAME = TradingPartnerX
      RECEIVER_NAME = OurCompanyName
      SERVICE_NAME = Manage Work
      SERVICE_TYPE = v1.0
      BUSINESS_ACTION_NAME = updateWork
      Payload = <ManageWorkRequest>...</ManageWorkRequest>
    Where the Payloads of the two requests could potentially be identical.
    Currently, we have the following configuration:
    - Custom xml document type for ManageWorkRequest:
      - Action name: (blank)
      - Service name: (blank)
      - Service type: (blank)
      - From Role: (blank)
      - To Role: (blank)
      - Validate ebMS Header: unchecked
    - Custom xml document definition for ManageWorkRequest:
      - XML Identification Expression (XPath): //*[local-name() = 'ManageWorkRequest']
      - XML Identification Value: (blank)
    - TradingPartnerX Documents:
      - Definition added for ManageWorkRequest
        - both 'Sender' and 'Receiver' checked
      - Document Details:
        - Override DocType Param: checked
        - Document Type ebMS:
          - Action name: (blank)
          - Service name: Manage Work
          - Service type: v1.0
          - From Role: Buyer
          - To Role: Supplier
          - Validate ebMS Header: unchecked
    - Agreement setup between OurCompanyName and TradingPartnerX for inbound communication from TradingPartnerX to OurCompanyName
    When TradingPartnerX attempts to send an assignWork ManageWorkRequest, B2B fails to identify which document type and agreement it relates to. After increasing the B2B logging level, the following can be seen in the soa_server1-diagnostic.log file:
    [2013-11-19T11:16:39.881+10:00] [soa_server1] [TRACE] [] [oracle.soa.b2b.repository] [tid: Workmanager: , Version: 0, Scheduled=false, Started=false, Wait time: 0 ms\n] [userId: <anonymous>] [ecid: ccce6c0f16adb222:111ddc50:142539e3958:-7ffd-000000000013a96f,0] [APP: soa-infra] [SRC_CLASS: oracle.tip.b2b.log.ToplinkLogger] [SRC_METHOD: log] 2013.11.19 11:16:39.880--ServerSession(606155273)--Connection(692532584)--Thread(Thread[Workmanager: , Version: 0, Scheduled=false, Started=false, Wait time: 0 ms[[
    ,10,Application Daemon Threads])--SELECT ID, DIRECTION, APPS_DOCTYPE_NAME, DOC_DEF_NAME, APPS_DOC_PROTOCOL_VERSION, DOC_DEF_TIMESTAMP, APPS_DOCUMENT, DOC_PROTOCOL_NAME, APPS_XSLTFILE, DOC_PROTOCOL_VERSION, ATTRIBUTE1, DOC_REF_NAME, ATTRIBUTE3, DOC_ROUTING_ID, ATTRIBUTE5, DOCTYPE_NAME, ATTRIBUTE7, FROM_DC, ATTRIBUTE9, BUSINESS_ACTION_NAME, LABEL, CREATED, LABEL_DESC, APPS_DOC_PROTOCOL_NAME, MODIFIED, APPS_ACTION, RECEIVER_NAME, ATTRIBUTE2, SENDER_NAME, ATTRIBUTE6, SERVICE_NAME, ATTRIBUTE10, SERVICE_TYPE, DEFINITION_MO, STATE, AGREEMENT_ID, TO_DC, ATTRIBUTE8, TPA_NAME, IS_CUSTOM, TPA_REFERENCE, ATTRIBUTE4, CREATED_BY_UI, USER_NAME, CONTROL_NUMBER_SET FROM B2B_LIFECYCLE WHERE ((SENDER_NAME = ?) AND ((RECEIVER_NAME = ?) AND ((BUSINESS_ACTION_NAME = ?) AND ((SERVICE_NAME = ?) AND ((SERVICE_TYPE = ?) AND ((DIRECTION = ?) AND (STATE = ?)))))))
            bind => [TradingPartnerX, OurCompanyName, assignWork, Manage Work, v1.0, INBOUND, Active]
    [2013-11-19T11:16:39.883+10:00] [soa_server1] [ERROR] [] [oracle.soa.b2b.engine] [tid: Workmanager: , Version: 0, Scheduled=false, Started=false, Wait time: 0 ms\n] [userId: <anonymous>] [ecid: ccce6c0f16adb222:111ddc50:142539e3958:-7ffd-000000000013a96f,0] [APP: soa-infra] Error -:  B2B-50547:  Agreement not found for trading partners: FromTP TradingPartnerX, ToTP OurCompanyName with document type ACTION:assignWork Service:Manage Work ServiceTypev1.0-INBOUND.[[
            at oracle.tip.b2b.tpa.RepoDataAccessor.queryAgreementMO(RepoDataAccessor.java:866)
            at oracle.tip.b2b.tpa.RepoDataAccessor.getAgreementDetails(RepoDataAccessor.java:415)
            at oracle.tip.b2b.tpa.TPAProcessor.processTPA(TPAProcessor.java:465)
            at oracle.tip.b2b.tpa.TPAProcessor.processIncomingTPA(TPAProcessor.java:243)
            at oracle.tip.b2b.engine.Engine.processIncomingMessageImpl(Engine.java:2560)
            at oracle.tip.b2b.engine.Engine.processIncomingMessage(Engine.java:1751)
            at oracle.tip.b2b.engine.Engine.incomingContinueProcess(Engine.java:4258)
            at oracle.tip.b2b.engine.Engine.handleMessageEvent(Engine.java:3856)
            at oracle.tip.b2b.engine.Engine.processEvents(Engine.java:3309)
            at oracle.tip.b2b.engine.ThreadWorkExecutor.processEvent(ThreadWorkExecutor.java:637)
            at oracle.tip.b2b.engine.ThreadWorkExecutor.run(ThreadWorkExecutor.java:214)
            at oracle.integration.platform.blocks.executor.WorkManagerExecutor$1.run(WorkManagerExecutor.java:120)
            at weblogic.work.j2ee.J2EEWorkManager$WorkWithListener.run(J2EEWorkManager.java:184)
            at weblogic.work.DaemonWorkThread.run(DaemonWorkThread.java:30)
    Error -:  B2B-50547:  Agreement not found for trading partners: FromTP TradingPartnerX, ToTP OurCompanyName with document type ACTION:assignWork Service:Manage Work ServiceTypev1.0-INBOUND.
            at oracle.tip.b2b.tpa.RepoDataAccessor.queryAgreementMO(RepoDataAccessor.java:866)
            at oracle.tip.b2b.tpa.RepoDataAccessor.getAgreementDetails(RepoDataAccessor.java:415)
            at oracle.tip.b2b.tpa.TPAProcessor.processTPA(TPAProcessor.java:465)
            at oracle.tip.b2b.tpa.TPAProcessor.processIncomingTPA(TPAProcessor.java:243)
            at oracle.tip.b2b.engine.Engine.processIncomingMessageImpl(Engine.java:2560)
            at oracle.tip.b2b.engine.Engine.processIncomingMessage(Engine.java:1751)
            at oracle.tip.b2b.engine.Engine.incomingContinueProcess(Engine.java:4258)
            at oracle.tip.b2b.engine.Engine.handleMessageEvent(Engine.java:3856)
            at oracle.tip.b2b.engine.Engine.processEvents(Engine.java:3309)
            at oracle.tip.b2b.engine.ThreadWorkExecutor.processEvent(ThreadWorkExecutor.java:637)
            at oracle.tip.b2b.engine.ThreadWorkExecutor.run(ThreadWorkExecutor.java:214)
            at oracle.integration.platform.blocks.executor.WorkManagerExecutor$1.run(WorkManagerExecutor.java:120)
            at weblogic.work.j2ee.J2EEWorkManager$WorkWithListener.run(J2EEWorkManager.java:184)
            at weblogic.work.DaemonWorkThread.run(DaemonWorkThread.java:30)
    Looking at the SQL which has been logged, B2B is looking for an agreement which has the following:
      SENDER_NAME = 'TradingPartnerX'
      RECEIVER_NAME = 'OurCompanyName'
      BUSINESS_ACTION_NAME = 'assignWork'
      SERVICE_NAME = 'Manage Work'
      SERVICE_TYPE = 'v1.0'
      DIRECTION = 'INBOUND'
      STATE = 'Active'
    and it fails to identify any matching agreements which is correct - there aren't any matching these constraints. However, if we specify the 'Action name' field in the DocType param overrides for TradingPartnerX, then B2B is able to identify the agreement and everything works.
    Based on this behaviour, it seems that in this scenario, B2B requires a separate agreement for each possible value which can be passed as the BUSINESS_ACTION_NAME in order to identify the document type and agreement correctly. My question is - is there another way to configure B2B to allow a list of valid 'Action names' rather than having to create a separate agreement for each one with the only difference being the value of the 'Action name' field?
    If anyone is able to provide advice or guidance, it would be much appreciated.
    Thanks
    Kevin

  • Fetching xml node nth value using Xpath

    HI Experts ,
    with reference to below question, i have one more doubt.
    https://social.msdn.microsoft.com/Forums/en-US/f894e5e2-8926-4604-9171-616da3f00cd7/xpath-to-fetch-value-in-flatfile-schema?forum=biztalkgeneral
    I used below xpath to fetch nth value of full repeating message nodes
    indexStr = System.Convert.ToString(index);DATE=xpath(In_FF, "string(//*[local-name() = 'Details']["+indexStr+"])/*[local-name()='DATE'])");index=index + 1;
    and i got below error, can any help me in this?
    Exception thrown from: segment 2, progress 43
    Inner exception: 'string(//*[local-name() = 'Details'][1])/*[local-name()='DATE'])' has an invalid token.
    Exception type: XPathException
    Source: System.Xml
    Target Site: MS.Internal.Xml.XPath.AstNode ParseXPathExpresion(System.String)
    The following is a stack trace that identifies the location where the exception occured

    your XPATH expression is WRONG.
    it should be
    DATE=xpath(In_FF,
    "string(//*[local-name() = 'Details']["+indexStr+"]/*[local-name()='DATE'])");
    There is NO ")" after ["+indexStr+"].
    The more reliable way is to use a string variable and use the System.String.Format() call as below
    xPathExpr = System.String.Format("string(//*[local-name() = 'Details'][{0}]/*[local-name()='DATE'])", index);
    DATE=xpath(In_FF, xPathExpr);
    The "invalid token" is because of the mismatched ")" in your XPATH Expression.
    Regards.

  • How to use 'Extract Values' transformation?

    Hi,
    I am new to EDQ. I have the following requirement - source system sends me partyname+address details. I need to check in the oracle database and if there is a match then send back the ID along with the input details. I am using Lookup check audit process to check if the data is present in the database. If the data is present then I need to send back the ID. To extract the ID I am using 'Extract Values' transformation. I am not able define the Reference Data for this . Can provide a example how to use the same.
    Thanks
    Prabha

    Just use Lookup and Return.
    Though it sounds like you really should be using a match process.

  • Want to get id's value using xpath.

    Hi all,
    I want to get id attribute's value using xpath.
    my xml file as follows:
    <book>
         <person id="1">
                <first id="2">Kiran</first>
                <last id="3">Pai
                        <name id="4">das</name>
                </last>
                <age id="5">22</age>
         </person>
         <person id="6">
                <first id="7">Bill</first>
                <last id="8">Gates</last>
                <age id="9">46</age>
         </person>
         <person id="10">
                <first id="11">Steve</first>
                <last id="12">Jobs</last>
                <age id="13">40</age>
         </person>
    </book>I want to get the id value of name. using xpath-->//book[0]/person[0]/last[0]/name[0]/[@id]..is this a valid xpath to get the id's value? my java code as follows:
    import java.io.File;
    import java.util.HashMap;
    import java.util.Map;
    import java.util.Stack;
    import javax.xml.parsers.*;
    import javax.xml.xpath.*;
    import org.w3c.dom.Document;
    import org.xml.sax.*;
    import org.xml.sax.helpers.DefaultHandler;
    public class Evaluate {
         public static void main(String[] args) {
              String xp = "//book[0]/person[0]/last[0]/name[0]"+"/[@id]";
              String id="";
          try{
               // parse the XML as a W3C Document
              DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
            DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();// Create the parser
            Document doc = docBuilder.parse(new File("book.xml"));
             XPath xpath = XPathFactory.newInstance().newXPath();
             doc.getDocumentElement().normalize();
             XPathExpression xPathExpression = xpath.compile(xp);//-->getting error here
             id=xPathExpression.evaluate(xp).toString();
             id=xPathExpression.evaluate("person");
             System.out.println("id=" +id);
                  System.out.println("xp=" +xp);
                  }catch(Exception err){
                    System.out.println("Errpr= "+ err);
    can anyone please help me ?

    No, I believe that XPath indexes begin with 1, not with zero.

  • How to retrieve value of attribute using xPath ?

    Hello experts,
    I have a following xml chunk
    <image file="/articles/engineering/boxerengine/preview_282x160.jpg">
    <tout name="copyright"></tout>
    <tout name="license"></tout>
    <tout name="photographer"></tout>
    <tout name="description"></tout>
    </image>
    I want to retrieve value of attribute file from absolute node image.
    I tried using xpath='/image/@file' It gives output as file="/articles/engineering/boxerengine/preview_282x160.jpg"
    I just want value "/articles/engineering/boxerengine/preview_282x160.jpg"
    I tried using xpath='/image/@file/text()' . It does not work
    Following is the java code. I am using XOM parser.
    java code :
    Builder parser = new Builder();
    Document doc = parser.build(xmlFile);
    Nodes titles = doc.query(xPath);
    //xpath = ''/image/@file/text()"     
    for (int i = 0; i < titles.size(); i++) {
    strChunk = strChunk.append(titles.get(i).toXML());     
    return strChunk.toString();
    Please help.
    Thanks,
    Sandeep Parmar

    Hi Sandeep,
    Using XPath and XPathExpression you can evaluate XPath queries on Document. have a look at code given bellow:
    // Building Document from XML File
    org.w3c.dom.Document imageDoc = builder.parse(xmlFile);
    // getting new instance of XPath
    javax.xml.xpath.XPath xpath = javax.xml.xpath.XPathFactory.newInstance().newXPath();
    // Building XPathExpression by compiling XPath query
    javax.xml.xpath.XPathExpression xPathExp = xpath.compile("/image/@file");
    // Evaluting XPath Expression on Document
    String imagePath = (String) xPathExp.evaluate(imageDoc, javax.xml.xpath.XPathConstants.STRING);
    // Priting image path it will print : "/articles/engineering/boxerengine/preview_282x160.jpg", if you try with data given in your post.
    System.out.println(imagePath); Hope this will help.
    thanks,
    Tejas Purohit

  • Using XPath for DOM traversal

    This question falls into the category of 'I know it's possible, I just need to find the idom in Java'.
    I'm coming from a MSFT world were the DOM-centric model of XML processing makes heavy use of XPATH for node selection. Basically using the method element.selectNodes(XPathExpresson) allows one to quickly extract the relevant subset of the parsed tree in the DOM as a nodeList. I've become accustomed to using XML for all strucutured storage that doesn't require a full database.
    The W3C DOM Level 3 spec supports evaluateExpression() for this purpose, but I can't believe that Java developers are still using tree traversal waiting for the spec to be implemented. I suppose that I could use getNodesByTagName(), but this is a chainsaw, and I need a scalpel. Anyway, I'm trying to figure out how, exactly, this gets done in Java.
    I figure the following are possibilities:
    1) It's in JAXP and I missed it
    2) One or more of the XML parsers supports XPATH as an extention
    3) There's a common package that sits on top of the DOM Document.
    4) There's a standard way to apply and XSLT methods to the DOM document
    5) Something I've never thought of.
    This is a generalized problem for me, so I can't rely on object serialization, Java-XML data mapping, etc. Any guidance would be greatly appreciated.

    I've written a Config file reader for XML in java,
    and it extracts values using XPath. This is
    some of the code you'll need:
    imports:
    import javax.xml.transform.TransformerException;
    import org.w3c.dom.*;
    import org.xml.sax.InputSource;
    import org.xml.sax.SAXException;
    import org.apache.xerces.parsers.DOMParser;
    import org.apache.xpath.XPathAPI;
    import org.apache.xpath.objects.*;
    Document doc=....;
    * returns a single DOM Node from the config file.
    public Node getNode(String xpath) throws ConfigException {
    try {
    return XPathAPI.selectSingleNode(doc, xpath);
    } catch (TransformerException e) {
    throw new ConfigException("Can't find '"+xpath+"' ("+e.getMessage()+")");

  • Xslt copy-of creates a xml which returns empty while trying to access elements using XPATH

    Hi
    I am trying to do a copy-of function using the XSLT in jdev. This is what I do
        <xsl:param name="appdataDO"/>
        <xsl:template match="/">
        <ns1:applicationData>
          <ns1:applicationId>
            <xsl:value-of select="$appdataDO/ns1:applicationData/ns1:applicationId"/>
          </ns1:applicationId>
          <xsl:copy-of select="/fslo:ExternalapplicationData/fslo:ApplicationsHDRAddInfo">
          </xsl:copy-of>
        </ns1:applicationData>
        </xsl:template>
        </xsl:stylesheet>
    After this I can see the document created in the process flow as this :
        <ns1:applicationData>
        <ns1:applicationId>MMMM</ns1:applicationId>
        <ns2:ApplicationsHDRAddInfo>
        <ns3:genericFromBasePrimitive>iuoui</ns3:genericFromBasePrimitive>
        <ns4:EstimatedMarketValue>77</ns4:EstimatedMarketValue>
        <ns4:PropertyInsuranceFee>jih</ns4:PropertyInsuranceFee>
        <ns4:LoanOriginationFee>hjh</ns4:LoanOriginationFee>
        <ns4:RegistrarFee>kkkkk</ns4:RegistrarFee>
        <ns4:LoanCashInFee>hjh</ns4:LoanCashInFee>
        <ns4:LoanPaidInCashFlag>cddffgd</ns4:LoanPaidInCashFlag>
        </ns2:ApplicationsHDRAddInfo>
        </ns1:applicationData>
    But whenever I am trying to extract any of the output nodes I am getting an empty result. I can copy the whole dataset into similar kind of variable.
    But I am unable to get individual elements using XPATH.
    I tried using exslt function for node set and xslt 2.0 without avail.
    The namespaces might be the culprit here . The test method in the jdev is able to output a result but at runtime the xpath returns empty .
    I have created another transform where I try to copy data from the precious dataobject to a simple string in another data object .
    This is the test sample source xml for the transform created by jdev while testing with all namespaces, where I try to copy the data in a simple string in another data object.
        <applicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/bpmpa/fs/ulo/types file:/C:/JDeveloper/NewAPP/Xfrm/xsd/ApplicationData.xsd" xmlns="http://xmlns.oracle.com/bpmpa/fs/ulo/types">
           <applicationId>applicationId289</applicationId>
           <ApplicationsHDRAddInfo>
              <genericFromBasePrimitive xmlns="http://xmlns.oracle.com/bpm/pa/extn/types/BasePrimitive">genericFromBasePrimitive290</genericFromBasePrimitive>
              <EstimatedMarketValue xmlns="http://xmlns.oracle.com/bpm/pa/extn/headerCategories/">291</EstimatedMarketValue>
              <PropertyInsuranceFee xmlns="http://xmlns.oracle.com/bpm/pa/extn/headerCategories/">PropertyInsuranceFee292</PropertyInsuranceFee>
              <LoanOriginationFee xmlns="http://xmlns.oracle.com/bpm/pa/extn/headerCategories/">LoanOriginationFee293</LoanOriginationFee>
              <RegistrarFee xmlns="http://xmlns.oracle.com/bpm/pa/extn/headerCategories/">RegistrarFee294</RegistrarFee>
              <LoanCashInFee xmlns="http://xmlns.oracle.com/bpm/pa/extn/headerCategories/">LoanCashInFee295</LoanCashInFee>
              <LoanPaidInCashFlag xmlns="http://xmlns.oracle.com/bpm/pa/extn/headerCategories/">LoanPaidInCashFlag296</LoanPaidInCashFlag>
           </ApplicationsHDRAddInfo>
        </applicationData>
    And the xslt
        <xsl:template match="/">
            <ns1:DefaultOutput>
              <ns1:attribute1>
                <xsl:value-of select="/fslo:applicationData/fslo:ApplicationsHDRAddInfo/custom:LoanOriginationFee"/>
              </ns1:attribute1>
            </ns1:DefaultOutput>
          </xsl:template>
    This results in a empty attribute1. Any help will be appreciated .

    Please delete attributeFormDefault="qualified" elementFormDefault="qualified" from your XSD
    Please check the next link:
    http://www.oraclefromguatemala.com.gt/?p=34

  • Receiver Determination, condition to select receiver doesn't extract values

    Dear all!
    I have SAP PI 7.1
    I am facing problem in Receiver Determination while using Condition to select receiver based on the values in the payload.
    I need, if Identificador = 1 then receiver BC_1 and if Identificador = 2 then the receiver BC_2
    My payload has the value:
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:p1="http://pruebas.endesa.es/AME4S_2">
      <soap:Body>
        <p1:MT_WS_SENDER_Q>
          <IDENTIFICADOR>1</IDENTIFICADOR>
          <OBJECT_ID>7600000009</OBJECT_ID>
        </p1:MT_WS_SENDER_Q>
      </soap:Body>
    </soap:Envelope>
    But, the trace shows following:
    <Trace level="2" type="T">......extracting (new) for Extractor: XP /p1:MT_WS_SENDER_Q/IDENTIFICADOR </Trace>
    <Trace level="2" type="T">......extracting values found: 0 </Trace>
    I tried with double quotes, simple quotes, without quotes...
    I tried too with a Receiver Rule (with context) and local rule with xpath....
    Can someone please advise?
    Thanks in advanced!!

    Hello,
    /p1:MT_WS_SENDER_Q/IDENTIFICADOR = 1
    Can you try //p1:MT_WS_SENDER_Q/IDENTIFICADOR = 1 ? I'm sure I read it somewhere here in SDN regarding the xPath difference for stateless and stateless XI 3.0 compatible version is an additional /. It's worth to try
    Hope this helps,
    Mark

  • Xml loading using xpath in pl/sql

    Hi,
    I am loading xml using xpath query bu i am stucked here.I am not able to pass the loop counter "I" into the query.Please help.
    The problem is in line " 13 FROM xml_table,table(XMLSequence(extract(OBJECT_VALUE, '/BIF/SBI/SBC/flag'))) li;
    " in the below block
    1 declare
    2 SBI_count pls_integer;
    3 begin
    4 select count(*)
    5 into SBI_count
    6 from xml_table,table(XMLSequence(extract(OBJECT_VALUE, '/BIF/SBI') ) );
    7 dbms_output.put_line( 'SBI_count '||SBI_count );
    8 for I in 1..SBI_count
    9 LOOP
    10 INSERT INTO Subclass_Date_Flags( Subclass_Id,
    11 subclass_date_flags_8 )
    12 SELECT 'SID',extractvalue(VALUE(li), '//flag')
    13 FROM xml_table,table(XMLSequence(extract(OBJECT_VALUE, '/BIF/SBI[I]/SBC/flag'))) li;
    14 dbms_output.put_line( 'Row '||SQL%ROWCOUNT );
    15 END LOOP;
    16 commit;
    17* end;
    SQL> /
    SBI_count 2
    Row 0
    Row 0
    PL/SQL procedure successfully completed.

    Try this code, just keep a reference to your root node so you can keep appending children to it:
    DECLARE
    xmlDoc xmldom.DOMDocument;
    xmlNode xmldom.DOMNode;
    xmlNode1 xmldom.DOMNode;
    xmlElem1 xmldom.DOMElement;
    xmlElem2 xmldom.DOMElement;
    xmlText xmldom.DOMText;
    CURSOR cur_emp IS
    SELECT *
    FROM emp;
    --WHERE empno = 7369;
    row_emp emp%ROWTYPE;
    BEGIN
    xmlDoc := xmldom.newDOMDocument;
    xmlNode := xmldom.makeNode(xmlDoc);
    xmlElem1 := xmldom.createElement(xmlDoc,'root');
    xmlNode := xmldom.appendChild(xmlNode,xmldom.makeNode(xmlElem1));
    OPEN cur_emp;
    LOOP
    FETCH cur_emp INTO row_emp;
    EXIT WHEN cur_emp%NOTFOUND;
    xmlElem2 := xmldom.createElement(xmlDoc,'name');
    xmldom.setAttribute(xmlElem2, 'empno',TO_CHAR(row_emp.empno));
    xmlNode1 := xmldom.appendChild(xmlNode,xmldom.makeNode(xmlElem2));
    xmlText := xmldom.createTextNode(xmlDoc,row_emp.ename);
    xmlNode1 := xmldom.appendChild(xmlNode1,xmldom.makeNode(xmlText));
    END LOOP;
    CLOSE cur_emp;
    xmldom.writeToFile(xmlDoc,'c:\xmltest1.txt');
    END;
    null

  • [Forum FAQ] SharePoint 2013: Extracting values from a multi-value enabled lookup column and merge values to a multi-value enabled column

    For some business requirements, users want to extract values from a multi-value enabled lookup column
    and add items to another list based on each separate value. In contrast, others want to find duplicate values in the list and merge associated values to a multi-value enabled column and then
    add items to another list based on the merged value. All of these can be achieved using SharePoint Designer 2013 Workflow.
    How to extract values from a multi-value enabled lookup column and add items to another list based
    on each separate value using SharePoint Designer 2013.
    Important actions: Loop Shape; Utility Actions
    Three scenarios
    Things to note
    Steps to create Workflow
    How to merge values to a multi-value enabled column and add item to another list based on the
    merged value using SharePoint Designer 2013.
    Important actions: Call HTTP Web Service; Build Dictionary
    Things to note
    Steps to create Workflow
    How to
    extract values from a multi-value enabled lookup column and
    add items to another list based on each separate value using SharePoint Designer 2013.
    For example, they have three lists as below. They want to
    extract values from the Destinations column
    in Lookup2 and add items to Lookup3 based on each country and set Title to current item: ID.
    Lookup1:
    Title (Single line of text)
    Lookup2:
    Title (Single line of text), Destinations (Lookup; Get information from: Lookup1 in Title column).\
    Lookup3:
    Title (Single line of text), Country (Single line of text).
    Important action
    1. Loop Shape: SharePoint Designer 2013 support two types of loops: loop n times and loop with condition.
    Loops must also conform to the following rules:
    Loops must be within a stage, and stages cannot be within a loop.
    Steps may be within a loop.
    Loops may have only one entry and one exit point.
    2. Utility Actions: It contains many actions, such as ‘Extract Substring from Index of String’ and ‘Find substring in String’.
    Three scenarios
    We need to loop through the string returned from the look up column and look for commas. There are three
    scenarios:
    1.  No comma but string is non-empty so there is only one country.
    2.  At least one comma so there is at least two or more countries to loop.
    3.  In the loop we have consumed all the commas so we have found the last country. 
    Things to note
    There are two things to note:
    1. "Find string in string (output to Variable:index)"  will return -1 if doesn't find
    the searched for string.
    2. In the opening statement "Set Variable: Countries to Current Item:Destinations" set the return
    field as  "Lookup Values, Comma Delimited".
    Steps to create Workflow
    Create a custom list named Lookup1.
    Create a custom list named Lookup2, add column: Destinations (Lookup; Get information from: Lookup1 in Title column).
    Create a custom list named Lookup3, add column: Country (Single line of text).
    Create a workflow associated to Lookup2.
    Add conditions and actions:
    Start the workflow automatically when an item is created.
    Add item to Lookup2, then workflow will be started automatically and create multiple items to lookup3.
    See the below in workflow History List:
    How to merge values to a multi-value enabled column and add item to another list based on the
    merged value using SharePoint Designer 2013
    For example, they have three lists as below. They want to find duplicate values in the Title column in
    Lookup3 and merge country column to a multi-value enabled column and then add item to lookup2 and set the Title to Current Item: Title.
    Lookup1:
    Title (Single line of text)
    Lookup3:
    Title (Single line of text), Country (Single line of text).
    Lookup2:
    Title (Single line of text), Test (Single line of text).
    Important actions
    "Call HTTP Web Service"
    action: In SharePoint 2013 workflows, we can call a web service using a new action introduced in SharePoint 2013 named Call HTTP Web Service. This action
    is flexible and allows you to make simple calls to a web service easily, or, if needed, you can create more complex calls using HTTP verbs as well as allowing you to add HTTP headers.
    “Build Dictionary"
    action:
    The Dictionary variable type is a new variable type in the SharePoint 2013 Workflow.
    The following are the three actions specifically designed for the Dictionary variable type: Build Dictionary, Count Items in a Dictionary and Get an Item from a Dictionary.
    The "Call HTTP Web Service" workflow action would be useless without the new "Dictionary" workflow action.
    Things to note
    The
    HTTP URI is set to https://sitename/_api/web/lists/GetByTitle('listname')/items?$orderby=Id%20desc and the HTTP method is set to “GET”. Then the list will be sort by Id in descending order.
    Use Get
    d/results(0)/Id form
    Variable: ResponseContent (Output to
    Variable: maxid) to get the Max ID.
    Use Set
    Variable: minid to Current List:ID to get the Min ID.
    Use Copy from
    Variable: destianation , starting at
    1 (Output to
    Variable: destianation) to remove the space.
    Steps to create Workflow
    Create a custom list named Lookup1.
    Create a custom list named Lookup2, add column: Test (Single line of text).
    Create a custom list named Lookup3, add column: Country (Single line of text).
    Create a workflow associated to Lookup3.
    Add a new "Build Dictionary" action
    to define the http request header:
    Add a Call HTTP Web Serviceaction, click on
    this and paste your http request.
    To associate the
    RequestHeader variable, select the Call action property,
    set the
    RequestHeaders property to
    RequestHeader:
    In the Call action, click on
    response and associate the response to a new
    variable: ResponseContent (of type Dictionary).
    After the Call action add Get item from Dictionary action to get the Max ID.
    Add Set Workflow Variable action to get the Min ID.
    Add Loop Shape (Loop with Condition) to get all the duplicate titles and integrate them to a string.
    Create item in Lookup2.
    The final Stage should look like this:
    Start the workflow automatically when an item is created.
    Add item to Lookup3, then workflow will be started automatically and create item to lookup2.
    See the below in workflow History List:
    References
    SharePoint Designer 2013 - Extracting values from a multi-value enabled lookup column into a dictionary as separate items:
    http://social.technet.microsoft.com/Forums/en-US/97d34468-1b53-4741-88b0-958472f8ca9a/sharepoint-designer-2013-extracting-values-from-a-multivalue-enabled-lookup-column-into-a
    Workflow actions quick reference (SharePoint 2013 Workflow platform):
    http://msdn.microsoft.com/en-us/library/jj164026.aspx
    Understanding Dictionary actions in SharePoint Designer 2013:
    http://msdn.microsoft.com/en-us/library/office/jj554504.aspx
    Working with Web Services in SharePoint 2013 Workflows using SharePoint Designer 2013:
    http://msdn.microsoft.com/en-us/library/office/dn567558.aspx
    Calling the SharePoint 2013 Rest API from a SharePoint Designer Workflow:
    http://sergeluca.wordpress.com/2013/04/09/calling-the-sharepoint-2013-rest-api-from-a-sharepoint-designer-workflow/

    GREAT info, but it may be helpful to note that when replacing a portion of the variable "Countries" with a whitespace character, you may cause the workflow to fail in a few specific cases (certain lookup fields will not accept this and will automatically
    cancel).  I only found this out when recreating your workflow on a similar, but much more complex list set.  
    To resolve this issue, I used another utility action (Extract Substring from Index of List) to clear out the whitespace.  I configured it as "Copy from
    Variable: Countries, starting at
    1 (Output to Variable: Countries), which takes care of this issue in those few cases.
    Otherwise, WOW!  AWESOME JOB!  Thanks!  :)

Maybe you are looking for