none
message part data is not initialized correctly for xpath Expression. RRS feed

  • Question

  • Hi ,

    Have used the below code in message assignment shape. Getting Error when i run the api. please check the error below.


      _________________________________________________________________

    Thanks,

    Rajeshwari M.L


    Friday, September 16, 2016 7:21 AM

Answers

  • Hi Rajeshwari,

    Can you please right click on the MAINTAIN_TOKEN schema and generate instance and then assign that XML to xmlvar variable.

    Image result

    Note: You have to escape the quotes, for which you will have to replace each " inside the string literal with ' to escape it. 

    Example:

    xmlvar.LoadXml( @"<ns0:MAINTAIN_TOKEN xmlns:ns0='http://[URL]>

    ...

    ");



    Rachit Sikroria (Microsoft Azure MVP)


    Friday, September 16, 2016 7:31 AM
    Moderator
  • Hi Rajeshwari,

    make sure that the xml which you have loaded using the xmlVar is correct...I suggestr verify the same 

    You have done the following


    What you need to do is set the target namespace for the message what you can do is something on the below lines

    regards,

    Mandar Dharmadhikari




    Friday, September 16, 2016 7:32 AM
  • Hi Rajeshwari

    The issue is that the xml string you are passing in xmlvar.LoadXml does not contain the namespace.

    Do a Generate Instance on the schema from Visual Studio, copy the entire xml that gets generated and use that as the string.


    Thanks Arindam

    • Marked as answer by Rajeshwari ML Friday, September 16, 2016 12:42 PM
    Friday, September 16, 2016 7:42 AM
    Moderator

All replies

  • Hi Rajeshwari,

    Can you please right click on the MAINTAIN_TOKEN schema and generate instance and then assign that XML to xmlvar variable.

    Image result

    Note: You have to escape the quotes, for which you will have to replace each " inside the string literal with ' to escape it. 

    Example:

    xmlvar.LoadXml( @"<ns0:MAINTAIN_TOKEN xmlns:ns0='http://[URL]>

    ...

    ");



    Rachit Sikroria (Microsoft Azure MVP)


    Friday, September 16, 2016 7:31 AM
    Moderator
  • Hi Rajeshwari,

    make sure that the xml which you have loaded using the xmlVar is correct...I suggestr verify the same 

    You have done the following


    What you need to do is set the target namespace for the message what you can do is something on the below lines

    regards,

    Mandar Dharmadhikari




    Friday, September 16, 2016 7:32 AM
  • Hi Rajeshwari

    The issue is that the xml string you are passing in xmlvar.LoadXml does not contain the namespace.

    Do a Generate Instance on the schema from Visual Studio, copy the entire xml that gets generated and use that as the string.


    Thanks Arindam

    • Marked as answer by Rajeshwari ML Friday, September 16, 2016 12:42 PM
    Friday, September 16, 2016 7:42 AM
    Moderator