none
Not getting proper node set with Value Assigning using xpath RRS feed

  • Question

  • Hi,

    Have Assigned the value using xapth like below.


    the assigned value is coming like this. Please observe the bold underlined node. structure is not correct compared to other nodes.



    <_______________________________________

    Thanks,

    Rajeshwari 


    Friday, October 7, 2016 6:40 AM

Answers

  • Hi Rajeshwari,

    use the xpath as below to read the value.

    Use following to assign the value to the node using xpath

    Message_2 is message of type , Variable_2 is a string variable.

    Regards,


    Mandar Dharmadhikari


    • Marked as answer by Rajeshwari ML Friday, October 7, 2016 6:14 PM
    • Edited by Mandar Dharmadhikari Wednesday, December 21, 2016 12:10 PM Removing Sensitive Information
    Friday, October 7, 2016 10:59 AM

All replies

  • Hi Rajeshwari,

    is the response correct???

    i see X_Image being repeated..

    Also are Login Response and Login Response with Token are same message??

    Regards,


    Mandar Dharmadhikari


    Friday, October 7, 2016 6:49 AM
  • HI Rajeswari,

    Are you sure the xpath you are using here have only value, I dont't think so.

    So install Dansharp xml viwer and check the node value using the above xpath.

    https://dansharpxmlviewer.codeplex.com/

    And one more thing use String :

    xpath(Response,"/*[local-name()='LOGINResponse']/*[local-name()='X_IMAGE']")=xpath(LoginResponseWithToken,"string(/*[local-name()='LOGINResponse']/*[local-name()='X_IMAGE'])");

    Friday, October 7, 2016 6:52 AM
  • Hi Rajeshwari,

    right syntax is  like

    xpath(msg, "string(/*/book[1]/title)"); undersline part should be the type like number or string depending upon your datatype of message

    Share the message structure for boththe responses so that we can help you further with this....

    Why cant you use the distinguished fields?? makes life much easier.

    Regards,


    Mandar Dharmadhikari



    Friday, October 7, 2016 6:56 AM
  • Hi rajeshwari,

    Ok,

    You can do something on below lines

    refer to the blog by sarvana,it shows you exactly how to get the value from the base64binary string

    http://blogs.biztalk360.com/dealing-with-web-services-returning-byte-in-biztalk/

    If possible share the xsds for the responses so that I can try to simulate the scenario on my dev box.

    Regards,


    Mandar Dharmadhikari

    Friday, October 7, 2016 7:50 AM
  • Hi Rajeshwari,

    use the xpath as below to read the value.

    Use following to assign the value to the node using xpath

    Message_2 is message of type , Variable_2 is a string variable.

    Regards,


    Mandar Dharmadhikari


    • Marked as answer by Rajeshwari ML Friday, October 7, 2016 6:14 PM
    • Edited by Mandar Dharmadhikari Wednesday, December 21, 2016 12:10 PM Removing Sensitive Information
    Friday, October 7, 2016 10:59 AM
  • Since there's multiple fields in the Response, a Map is probably better.

    Why aren't you using a Map?

    Friday, October 7, 2016 11:25 AM
  • Hi Rajeshwari,

    Well I just saved the xsd that you shared and then I just copied the xpath for the image node from the properties windows of that node...(Open the schema using Biztalk schema editor, then select the node and go to its property...there you can find the xpath...just you need to use that )

    Refer below screen shot for sample...


    Mandar Dharmadhikari

    Friday, October 7, 2016 6:39 PM