LoadRunner xpath-Suche in xml-Antwort
Ich brauchen, um pick-up die Wert
'myvalue'
in diesem soap-Antwort:
</something>
<id>myvalue</id>
Mit LoadRunners lr_xml_get_values() Funktion möchte ich den Wert 'meinwert' aus der Antwort, und ich dachte, dies würde funktionieren:
lr_xml_get_values("XML={response}", ValueParam=mv", "Query=//something/id/id", LAST);
Aber LoadRunner nicht finden können, den Wert.
Ich denke, es hat zu tun Mit dem in /in .
So, wie ich angeben (korrekt) mit diesem xpath-in LoadRunner?
Hier ist die komplette xml-Antwort
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Action>http://gaylord.com/service/service/person/v1/hore/getmeinformationResponse</wsa:Action>
<wsa:RelatesTo>uuid:3de7a201-1544-4bfc-8445-c240353d6c38</wsa:RelatesTo>
</soapenv:Header>
<soapenv:Body>
<ns2:getmeinformationResponse xmlns:ns2="http://gaylord.com/service/service/person/v1/">
<response>
<person xsi:type="ns4:Bruker" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns4="http://gaylord.com/service/service/person/v1/information">
<bankaccount endretAv="2701783" endringstidspunkt="2013-08-02T00:00:00.000+02:00" xsi:type="ns4:bankaccountswege">
<bankaccount>
<bankaccountnummer>7645786655</bankaccountnummer>
</bankaccount>
</bankaccount>
<adress>
<adresstome xsi:type="ns4:Gateadresse">
<count>swe</count>
<pust>1361</pust>
<fytti>0219</fytti>
<street>roadtohell</street>
<idiot>92</idiot>
<letter>B</letter>
</adresstome>
</adress>
<civil>
<civil>GIFT</civil>
</civil>
<ghy endringstidspunkt="2002-05-22T00:00:00.000+02:00">
<land>swe</land>
</ghy>
<harFraRolleI>
<harSammeBosted>true</harSammeBosted>
<tilRolle>BARN</tilRolle>
<tilPerson>
<ident>
<ident>34785699875</ident>
<type>fnr</type>
</ident>
<personnavn endretAv="AJOURHD" endringstidspunkt="2009-12-01T00:00:00.000+01:00">
<aftermath>gaylord</aftermath>
<forename>miss</forename>
<mid>heys</mid>
<sammensattNavn>gaylord miss BRÅTEN</sammensattNavn>
</personnavn>
</tilPerson>
</harFraRolleI>
<harFraRolleI>
<harSammeBosted>true</harSammeBosted>
<tilRolle>EKTE</tilRolle>
<tilPerson>
<ident>
<ident>34785699875</ident>
<type>fnr</type>
</ident>
<personnavn endretAv="AJOURHD" endringstidspunkt="2011-08-25T00:00:00.000+02:00">
<aftermath>gaylord</aftermath>
<forename>MARIANNE</forename>
<mid>heys</mid>
<sammensattNavn>gaylord MARIANNE BRÅTEN</sammensattNavn>
</personnavn>
</tilPerson>
</harFraRolleI>
<harFraRolleI>
<harSammeBosted>false</harSammeBosted>
<tilRolle>FARA</tilRolle>
<tilPerson>
<ident>
<ident>34785699875</ident>
<type>fnr</type>
</ident>
<personnavn endringstidspunkt="2002-05-22T00:00:00.000+02:00">
<aftermath>gaylord</aftermath>
<forename>anton JÔRGEN</forename>
<sammensattNavn>gaylord anton JØRGEN</sammensattNavn>
</personnavn>
</tilPerson>
</harFraRolleI>
<harFraRolleI>
<harSammeBosted>false</harSammeBosted>
<tilRolle>MORA</tilRolle>
<tilPerson>
<ident>
<ident>34785699875</ident>
<type>fnr</type>
</ident>
<personnavn endringstidspunkt="2002-05-22T00:00:00.000+02:00">
<aftermath>gorm</aftermath>
<forename>fru ELISABETH</forename>
<sammensattNavn>gorm fru ELISABETH</sammensattNavn>
</personnavn>
</tilPerson>
</harFraRolleI>
<ident>
<ident>34785699875</ident>
<type>fnr</type>
</ident>
<kjoenn>
<kjoenn>M</kjoenn>
</kjoenn>
<personnavn endringstidspunkt="2002-05-22T00:00:00.000+02:00">
<aftermath>gaylord</aftermath>
<forename>myron</forename>
<mid>gorm</mid>
<sammensattNavn>gaylord myron gorm</sammensattNavn>
</personnavn>
<personstatus endringstidspunkt="2002-05-22T00:00:00.000+02:00">
<personstatus>BOSA</personstatus>
</personstatus>
<foedselsdato>
<foedselsdato>1978-01-27+01:00</foedselsdato>
</foedselsdato>
<gjeldendePostadresseType>adress</gjeldendePostadresseType>
<harAnsvarligEnhet>
<enhet>
<organisasjonselementID>0219</organisasjonselementID>
</enhet>
</harAnsvarligEnhet>
</person>
</response>
</ns2:getmeinformationResponse>
</soapenv:Body>
</soapenv:Envelope>
Du musst angemeldet sein, um einen Kommentar abzugeben.
In der soap-Antwort, die Sie haben,
<id>
ist nicht ein Unterelement</something>
, wie es kommt nach dem Ende-tag (falls<id>
war innerhalb<something></something>
, dann wären Sie näher an eine richtige Abfrage). Auch, warum haben Sieìd
zweimal in die Abfrage? Wenn ich mich nicht völlig Irre,Query=//id
ausreichen würde, zu Holenmyvalue
in dieser Antwort.Bitte kopieren Sie den untenstehenden code in Aktion an den web-service und führen Sie es.
ich erfassen Sie die Kontonummer aus der SEIFE, die Sie zur Verfügung gestellt haben und es wird Ihnen helfen zu verstehen und erfassen Sie alle Werte.
char * str= "http://schemas.xmlsoap.org/soap/envelope/\">"
"http://www.w3.org/2005/08/addressing\">"
"http://gaylord.com/service/service/person/v1/hore/getmeinformationResponse"
"uuid:3de7a201-1544-4bfc-8445-c240353d6c38"
""
""
"http://gaylord.com/service/service/person/v1/\">"
""
"http://www.w3.org/2001/XMLSchema-instance\" xmlns:ns4=\"http://gaylord.com/service/service/person/v1/information\">"
""
""
"7645786655"
""
""
""
""
"swe"
"1361"
"0219"
"roadtohell"
"92"
"B"
""
""
""
"GESCHENK"
""
""
"swe"
""
""
"true"
"SCHEUNE"
""
""
"34785699875"
"fnr"
""
""
"gaylord"
"miss"
"heys"
"gaylord Fräulein BRTEN"
""
""
""
""
"true"
"EKTE"
""
""
"34785699875"
"fnr"
""
""
"gaylord"
"MARIANNE"
"heys"
"gaylord MARIANNE BRTEN"
""
""
""
""
"false"
"FARA"
""
""
"34785699875"
"fnr"
""
""
"gaylord"
"anton JÜRGEN"
"gaylord anton JÜRGEN"
""
""
""
""
"false"
"MORA"
""
""
"34785699875"
"fnr"
""
""
"gorm"
"fru ELISABETH"
"gorm fru ELISABETH"
""
""
""
""
"34785699875"
"fnr"
""
""
"M"
""
""
"gaylord"
"myron"
"gorm"
"gaylord myron gorm"
""
""
"BOSA"
""
""
"1978-01-27+01:00"
""
"Adresse"
""
""
"0219"
""
""
""
""
""
""
"";
lr_save_string(str,"Antwort");