Service Virtualization

 View Only
Expand all | Collapse all

XML XPath filter

  • 1.  XML XPath filter

    Posted Oct 30, 2018 09:22 AM

    XML XPath Filter - DevTest Solutions - 10.3 - CA Technologies Documentation 

     

    The lisa.xml.xpath.computeXPath.alwaysUseLocalName property controls whether the XPath local-name() function is always used during the XPath generation. The default value is false, which means that the local-name() function is used only when necessary. To generate an XPath that works regardless of an XML node namespace, set the value to true.

     

    Can any one help me on where do we set lisa.xml.xpath.computeXPath.alwaysUseLocalName property to "true" so that this can function properly. 



  • 2.  Re: XML XPath filter
    Best Answer

    Broadcom Employee
    Posted Oct 30, 2018 10:01 AM

    Add lisa.xml.xpath.computeXPath.alwaysUseLocalName=true to your local.properties file and restart the workstation or VSE or Simulator as required.

     

    Cheers,

    Danny



  • 3.  RE: Re: XML XPath filter

    Posted Jan 14, 2020 09:30 AM
    Hi, 

    will this resolve the issue while parsing data with other additional letters (languages other than english) like Å, Æ and Ø ?. 

    I am facing a failure while using xpath filter. please let me know how can i get rid of this.

    Thanks


  • 4.  RE: Re: XML XPath filter

    Posted Jan 14, 2020 11:11 AM

    Hi,

     

    I would expect not, as this property is related to using namespaces or not.

     

    Can you post an example of an XML (with non-English characters) and the xpath query on it that would fail?

     

     

    Cheers,

    Danny

     

    ::DISCLAIMER::

    The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of authorized representative of HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any email and/or attachments, please check them for viruses and other defects.






  • 5.  RE: Re: XML XPath filter

    Posted Jan 15, 2020 09:02 AM

    Xml Sample:

    <?xml version="1.0" encoding="iso-8859-1" ?>
    <tmout>
    <trans>
    <result>
    <rc>0
    </rc>
    </result>
    </trans>
    <output>
    <åpningsdato>20200115</åpningsdato>
    <name>jcjkckjl</name>
    </output>
    </tmout>

    xpath : /TMOUT/OUTPUT/NAME/text()

    I can see that while i type the Norwegian character in 'Parse text as response step' , its been picked by xpath filter. But when a real time response captured, the response itself is shown with a different character and hence it is failing

    If there is anyway to encoperate 'iso-8859-1' encoding in the responding part please let us know


  • 6.  RE: Re: XML XPath filter

    Posted Jan 20, 2020 04:07 AM

    Hi,

     

    Indeed, it looks like the Norwegian å-character already gets invalidated in the listener step (base listener step without any data protocols). I think you need to open a Broadcom support ticket to get this investigated.

     

    Cheers,

    Danny

     

    ::DISCLAIMER::

    The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of authorized representative of HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any email and/or attachments, please check them for viruses and other defects.






  • 7.  RE: Re: XML XPath filter

    Posted Jan 20, 2020 04:38 AM
    ​We had already raised tickets and the team confirmed that  only supported languages are English or Japanese. But if the tool is not supporting norwegian charectors then we will not be able to use the tool further as most of our services will defnitely have these charectors.
    We may need to look for some other tools in the markets as i heard some of them already support this.


  • 8.  RE: Re: XML XPath filter

    Broadcom Employee
    Posted Jan 20, 2020 06:52 AM
    Hi Musthaq
                Could you please share the Support Ticket # for me to have a look.

    regards
    Sankar​

    ------------------------------
    Sankar Natarajan
    Service Virtualization Product Engineering Team
    Broadcom
    ------------------------------



  • 9.  RE: Re: XML XPath filter

    Posted Jan 20, 2020 06:56 AM

    Hi ,

     

    Case #: 20251631

     

    Regards,

    _______________________________________________________________

     

    Musthaq Mohammed | TDM Test Analyst | IT BP – Release Train Management

     

    DNB Bank ASA

    Mob: +47 46355270

    E-post: musthaq.mohammed@dnb.nowww.dnb.no

     

    _______________________________________________________________

     






  • 10.  RE: Re: XML XPath filter

    Posted Jan 20, 2020 07:19 AM

    Hi Sankar,

     

    That would be good if you could like into this and share with us the reason of this behavior? Because it really confuses me, and I have worked with virtual services with Turkish characters and with Swedish characters, and I cannot recall ever running into this.

     

    I was dabbling around myself. I took the data type of the payload out of the equation and was just sending in some text, in this case the primary Norwegian characters, here with a blank line first, second line 5 characters separated by a blank, and terminated by a newline:

     

    å æ Æ ø Ø

     

    As transaction body this results in:

     

    And as you grab the body as a byte array, then you notice that the binary body payload is not placed as-is in the request object but that it has been processed. Each Norwegian character is replaced with this same byte-sequence: -17, -65, -67 (10 = newline; 32 is blank)

     

     

    Cheers,

    Danny

    ::DISCLAIMER::

    The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of authorized representative of HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any email and/or attachments, please check them for viruses and other defects.






  • 11.  RE: Re: XML XPath filter

    Broadcom Employee
    Posted Jan 20, 2020 07:27 AM
    THanks Danny for the additional Diagnosis. This is going to be of help.

    Musthaq - Please allow me a day to look into this in detail and respond.

    --
    regards
    Sankar Natarajan





  • 12.  RE: Re: XML XPath filter

    Posted Jan 20, 2020 07:42 AM

    Sure Sankar,  take your time..

     

    Regards,

    _______________________________________________________________

     

    Musthaq Mohammed | TDM Test Analyst | IT BP – Release Train Management

     

    DNB Bank ASA

    Mob: +47 46355270

    E-post: musthaq.mohammed@dnb.nowww.dnb.no

     

    _______________________________________________________________

     






  • 13.  RE: Re: XML XPath filter

    Broadcom Employee
    Posted Jan 20, 2020 12:07 PM
    Hi Musthaq
                   It looks like the encoding of XML response is not honored as expected. I tried to reproduce the scenario locally, but I am unable to do so. I looked at the test case shared on the Wolken case too. One of the step has an invalid character but it needs to be figured what causes the encoding to me ignored.

    Can we have a support session to go over this ? Please let me know your convenient time.

    regards
    Sankar

    ------------------------------
    Sankar Natarajan
    Service Virtualization Product Engineering Team
    Broadcom
    ------------------------------



  • 14.  RE: Re: XML XPath filter

    Posted Jan 20, 2020 12:50 PM

    Hi Sankar,

     

    I am working in Central European Time (UTC+1) and mostly available at our afternoon.

     

    Regards,

    _______________________________________________________________

     

    Musthaq Mohammed | TDM Test Analyst | IT BP – Release Train Management

     

    DNB Bank ASA

    Mob: +47 46355270

    E-post: musthaq.mohammed@dnb.nowww.dnb.no

     

    _______________________________________________________________

     






  • 15.  RE: Re: XML XPath filter

    Broadcom Employee
    Posted Jan 21, 2020 12:47 AM
    HI Musthaq
                 Please reply to this thread as soon as your are in office. I shall setup a quick webex to go over this.

    regards
    Sankar

    ------------------------------
    Sankar Natarajan
    Service Virtualization Product Engineering Team
    Broadcom
    ------------------------------



  • 16.  RE: Re: XML XPath filter

    Posted Jan 21, 2020 03:17 AM

    Hi Sankar,

     

    I am in office now

     

    Regards,

    _______________________________________________________________

     

    Musthaq Mohammed | TDM Test Analyst | IT BP – Release Train Management

     

    DNB Bank ASA

    Mob: +47 46355270

    E-post: musthaq.mohammed@dnb.nowww.dnb.no

     

    _______________________________________________________________