This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

hpsv.request as string?

Hi, in the incoming xml message there is a line of the form: <myParam xmlns: xsi = "......" atribute1 = "valueOfAtribute1" xsi:type = "value2">, value2 changes depending on the message. How can I get this value into a string variable?

i try convert hpsv.request to string and use regexp, but it don't work (.

  • 0

    Almost all attributes and values from the xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" namespace are discarded from a data model. One exception is when you have created the virtual service from XML Schema and that schema defined multiple types for a certain complex node (primitive types are not supported). Than we'll store and present the value of that type in the data model (there will be a combo box).

    Can you please describe in more detail what you need to do and post a complete messages?

  • 0 in reply to 

    For example, I have two XML messages, the difference between them in "xsi : type":

    I need to get the value from the attribute "xsi : type", how to do it? HP SV not learning this attribute

    Example file in attach.

    Example.zip
  • 0 in reply to 

    This one is tricky.

    Your examples looks like SOAP, but they are not valid SOAP. I had to fix following issues:

    For the xsi:type selector to appear in the Data Model editor, you need to create the virtual service based on the WSDL or XSD, which would have proper type inheritance in XML Schema (a base type from which the types load, upLoad in your messages will inherint). I have constructed such sample WSDL and is attached.

    After creation of VS from such WSDL and importing your messages, I can see such selector. Screenshot and SV 4.20 project attached.

    resources.zip