Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

An error occurred while processing an assertion: net.sf.saxon.trans.XPathException: Required

Parasofttoudaya
Parasofttoudaya Posts: 232 ✭✭
edited September 2017 in SOAtest

Error Message:
DataSource: PostInquiryResponse (row 1): An error occurred while processing an assertion:
net.sf.saxon.trans.XPathException: Required item type of first operand of '/' is node(); supplied
value has item type xs:string

Team,

Why am i getting this error , evaluation happens good was able to get the response in regex.

Regards
Udaya

Comments

  • benken_parasoft
    benken_parasoft Posts: 1,228 ✭✭✭

    The Assertor tools currently only support XPaths that return an element/attribute node from the original document. XPaths that can return other things, like strings or booleans, won't work. For example, in your case, it looks like your XPath could return the string "error". This is a known limitation, something that will likely be resolved in some future release. For now, you have to go about your validation a different way, perhaps use a different XPath.

  • Parasofttoudaya
    Parasofttoudaya Posts: 232 ✭✭

    :'(:'(

  • Parasofttoudaya
    Parasofttoudaya Posts: 232 ✭✭

    @jakubiak

    I am trying to follow using below thread, But getting the same error. is there any solution for my case using this below thread???

    https://forums.parasoft.com/discussion/2848/soatest-returning-error-when-trying-to-update-the-xpath-with-string-functions

  • benken_parasoft
    benken_parasoft Posts: 1,228 ✭✭✭
    edited September 2017

    Yeah, in that other post jakubiak is mentioning the same thing that "Unfortunately the Assertor tools require the XPath to return a node as opposed to a string". I see he suggested using parse-xml XPath function (which returns a node). I can see that being a potential way to make an XPath return a node as opposed to a string.

    In terms of your particular XPath and the error you mention, it sounds like the error is saying you are passing a string to a function that takes a node. I'm not sure exactly what part of the XPath is in error but it probably depends on the XML being consumed as well. You'd probably need to provide more detail or sample XML that demonstrates the problem as well. Please also consider contact Parasoft support if you need a timely resolution.

  • Parasofttoudaya
    Parasofttoudaya Posts: 232 ✭✭

    I had written extension tool code to validate it. How do i get to know when this issue will be fixed in which version??

  • benken_parasoft
    benken_parasoft Posts: 1,228 ✭✭✭

    Release notes are included with each SOAtest release. For 9.10.3 I think they will start being linked directly from the main user documentation. The release notes highlight new features and list any defects that were addressed.

    As far as making specific inquiries about specific product changes, defects, or enhancements, you'll have to contact Parasoft directly. Likely this means contacting Parasoft Support unless your organization has a specific point of contact at Parasoft.

  • Parasofttoudaya
    Parasofttoudaya Posts: 232 ✭✭

    Okay, Thanks..
    Please give high priority to this, most of my cases extracts value using regex.

    @jakubiak
    Any workaround would be really appreciatable.