PFI Webservice

 4 Replies
 0 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
prakash
Advanced Member
Posts: 27
Advanced Member
    Hi,

    How to assign the output of a web service in pfi to a variable. While assigning it shows java script expression error. The value shown is
     
    WebService4810_output.*::Body.*::CreateAgreementResponse.*::STS100.*::STS101.*::STS109

    Thanks
    Woozy
    Veteran Member
    Posts: 709
    Veteran Member
      Hi prakash,

      This is tough to answer with the limited information you provided in your question.  I don't see anything obvious that would cause such an assignment to fail. 

      I have a couple of clarifying questions:
      • I assume you are trying to assign this to a string variable.  Is that correct? 
      • Are you getting the error when you create the assignment in the designer tool, or in the log when you run the flow?
      • Are you using a regular variable assignment or a javascript assignment?
      • Where are you seeing the value you listed?  In the pflow log, or when you call the web service manually in a browser?
      • Are you running the flow locally or on the server?

      It would be most helpful for you to post the flow, or at least screenshots of the web service node setup, assignment node setup, and a section of the log that includes both nodes.  This would help us point you in the right direction.

      Kelly


      Kelly Meade
      J. R. Simplot Company
      Boise, ID
      prakash
      Advanced Member
      Posts: 27
      Advanced Member
        Hi Kelly,

        Thanks!

        Yes, I am trying to assign it to string variable in PFI designer. Attached is the screen shot for your reference.

        regards,
        Prakash B
        Attachments
        Woozy
        Veteran Member
        Posts: 709
        Veteran Member
          Your screenshot is very small, so it is hard to read, but it looks like it doesn't like the asterisks in the variable name.  I haven't done much with webservice nodes, but I'm wondering if you should use an XML node to do an "xml parse" rather than an "assign", and then take the XML output and assign it to your string variable. 

          Another possibility (probably not likely) would be to escape the variable in the assignment: "escape(WebService4810_output.*::Body.*::CreateAgreementResponse.*::STS100.*::STS101.*::STS109)"

          Hopefully someone with a better understanding of these nodes will add their input.

          Good Luck.  Sorry I couldn't help more.

          Kelly


          Kelly Meade
          J. R. Simplot Company
          Boise, ID
          prakash
          Advanced Member
          Posts: 27
          Advanced Member
            Thanks! Kelly, for your update.