none
Issue with expression and sql polling RRS feed

  • Question

  • Hi,

    I am facing strange issue with sql polling. I am getting polled data in xml message but not able to fetch any record in orchestration variable.

    Even if i try to assign this message into a xmldocument type variable, and try to get outerxml. I get null value.

    Suppose message is:

    <file_process_request xmlns="http://CTC.Receiver.FileGeneration.Sch_Input"><File_Process_Request PROCESS_REQUEST_ID="15" FILE_TYPE="MULTIPLE" FILE_FREQUENCY="P" SUBMITTOR_ID="SUBMTR" STATUS_CODE_ID="35" CREATED_BY="RECEIVERUSER1" CREATE_DATE_TIME="2013-10-03T03:46:07.467" LAST_UPDATED_BY="RECEIVERUSER1" LAST_UPDATED_DATE_TIME="2013-10-03T03:46:16.557" FILE_PATH="D:\FileWatcherTemp\Temp\760735877P_sst2" /></file_process_request>

    if i try to fetch records with xpath query, i get null. I have Var_File_Frequency variable of string type and my message is Msg_FileInput.

    Var_File_Frequency=xpath(Msg_FileInput,"string(/*[local-name()='file_process_request' and namespace-uri()='http://CTC.Receiver.FileGeneration.Sch_Input']/@*[local-name()='FILE_FREQUENCY' and namespace-uri()=''])");

    I tried it also to check the message :

    Var_FetchData=new System.Xml.XmlDocument();
    Var_FetchData=Msg_FileInput;
    Var_Process_Request_Id =Var_FetchData.OuterXml;

    But no luck.

    Any help much appreciated :)

    Wednesday, January 1, 2014 2:31 PM

Answers

  • Try:

    Var_File_Frequency = xpath(Msg_FileInput,"string(/*[local-name()='file_process_request']/@[local-name()='FILE_FREQUENCY'])");

    Keep it simple to start.  Haveing the namespace evals isn't necessary unless you expect a collision.

    • Marked as answer by Pengzhen Song Wednesday, January 15, 2014 6:33 AM
    Friday, January 3, 2014 3:36 PM

All replies

  • How about this XPath instead:

    /*[local-name()='file_process_request' and namespace-uri()='http://CTC.Receiver.FileGeneration.Sch_Input']/*[local-name()='File_Process_Request' and namespace-uri()='http://CTC.Receiver.FileGeneration.Sch_Input']/@*[local-name()='FILE_FREQUENCY' and namespace-uri()='']

    Morten la Cour

    Thursday, January 2, 2014 1:00 PM
  • Hi Morten,

    Thanks for replying. 

    I have tried the same as you suggested but no luck. Getting null value.

    Friday, January 3, 2014 6:31 AM
  • Hi RAMA,

    there might be some issue with ur xpath query.

    copy & paste the "Instance xpath" value from the sql schema of that perticular node which you need to access in ur xpath query.

    And make sure that ur sql polling is correct and it starts the orchestration.

    Thanks

    Friday, January 3, 2014 11:48 AM
  • Please verify if Var_Process_Request_Id  has any value? If not, then probably Msg_FileInput is empty in your case. Due to which Var_File_Frequency is null.

    Kunal G

    Friday, January 3, 2014 1:01 PM
  • Try:

    Var_File_Frequency = xpath(Msg_FileInput,"string(/*[local-name()='file_process_request']/@[local-name()='FILE_FREQUENCY'])");

    Keep it simple to start.  Haveing the namespace evals isn't necessary unless you expect a collision.

    • Marked as answer by Pengzhen Song Wednesday, January 15, 2014 6:33 AM
    Friday, January 3, 2014 3:36 PM