ACCESS_VIOLATION error when testing Webservice with "web_service_call" and "soa_xml_validate" functions

122 views
Skip to first unread message

Wellington

unread,
Jan 21, 2009, 8:32:21 AM1/21/09
to LoadRunner
Hi,

I am testing an webservice and I need validate a response XML with
function SOA_XML_VALIDATE, but one error occurred. Can anybody help
me? See below...

Action.c(30): Error: The "Valida_XML" argument (#1) is invalid or not
recognized at this position in the function call
Action.c(30): Error: Xml Validation execution failed
Action.c(30): Error: C interpreter run time error: Action.c (30):
Error -- memory violation : Exception ACCESS_VIOLATION received.
Action.c(30): Notify: CCI trace: Action.c(30): soa_xml_validate
(0x03b60265 "Valida_XML", 0x03b60241 "XML=
{Param_returnAutenticarUsuario}", 0x03b6022f "BEGIN_CHECKPOINTS",
0x03b60224 "CHECKPOINT", 0x03b601f5 "XPATH=parameters[1]/
returnAutenticarUsua...", 0x03b601e9 "Value=false", 0x03b601d9.
Action.c(30): Notify: CCI trace: "END_CHECKPOINTS", 0x03b60270
"LAST")
.
Action.c(30): Notify: CCI trace: Compiled_code(0): Action()
Regards,
Wellington
Vitória - ES, Brazil.

pablo martinez

unread,
Jan 21, 2009, 9:22:09 AM1/21/09
to LR-Loa...@googlegroups.com
I'm not sure, but it seems that it's taking {Param_returnAutenticarUsuario}
as your string instead of its value.
Try to replace it with:
lr_eval_string("{Param_returnAutenticarUsuario}")

pablo martinez

unread,
Jan 21, 2009, 9:25:04 AM1/21/09
to LR-Loa...@googlegroups.com
Also, I didn't find the funcion soa_xml_validate on vugen's help
where is it?

Wellington

unread,
Jan 21, 2009, 11:28:42 AM1/21/09
to LR-Loa...@googlegroups.com
It's in the version 9.1 of LR. What is your version?
 
This is the code:
 
   soa_xml_validate( "Valida_XML",
  "XML={Param_returnAutenticarUsuario}",
  BEGIN_CHECKPOINTS,
   CHECKPOINT, "XPATH=parameters[1]/returnAutenticarUsuario[1]", "Value=false",
  END_CHECKPOINTS,
  LAST );


 
2009/1/21 pablo martinez pablo.dani...@gmail.com

pablo martinez

unread,
Jan 21, 2009, 12:10:53 PM1/21/09
to LR-Loa...@googlegroups.com
sorry, I was with version 8.1. Now I checked the 9.10
 
I've just tested it. Just replace your :
    soa_xml_validate( "Valida_XML",
 
with :
    soa_xml_validate( "StepName=Valida_XML",

Wellington

unread,
Jan 22, 2009, 9:12:20 AM1/22/09
to LoadRunner
Thanks Pablo,

But the problem continues. I really need some help, now the error is:

Action.c(31): Error: The "XML={response}" argument (#3) is invalid or
not recognized at this position in the function call
Action.c(31): Error: Xml Validation "Valida_XML" execution failed
Action.c(31): Error: C interpreter run time error: Action.c (31):
Error -- memory violation : Exception ACCESS_VIOLATION received.
Action.c(31): Notify: CCI trace: Action.c(31): soa_xml_validate
(0x03b6021a "StepName=Valida_XML", 0x03b60207 "SnapShot=teste.inf",
0x03b601f8 "XML={response}", 0x03b601e9 "XSD=Schema.xsd", 0x03b60246
"LAST")
.
Action.c(31): Notify: CCI trace: Compiled_code(0): Action()

-------------------------------------------------------------------------------------
The code of script:

lr_save_string( lr_decrypt("4976f9019a4656a2bfc4acac9d"),
"password" );

web_service_call( "StepName=autenticarUsuarioDiretorio_102",
"SOAPMethod=ServicosSegur.serviceagent|ServicosSegurSoap|
autenticarUsuarioDiretorio",
"ResponseParam=response",
"Service=ServicosSegur.serviceagent",
"ExpectedResponse=SoapResult",
"Snapshot=t1232473679.inf",
BEGIN_ARGUMENTS,
"xml:parameters="
"<parameters>"
"<codUsuario>user</codUsuario>"
"<senha>{password}</senha>"
"<sistema>system</sistema>"
"</parameters>",
END_ARGUMENTS,
BEGIN_RESULT,
"parameters/returnAutenticarUsuario=Param_returnAutenticarUsuario",
"parameters/msgRetorno=Param_msgRetorno",
END_RESULT,
LAST);

lr_output_message("Mensagem: %s", lr_eval_string("{response}"));

soa_xml_validate( "StepName=Valida_XML",
"SnapShot=teste.inf",
"XML={response}",
"XSD=Schema.xsd",
LAST );










On Jan 21, 3:10 pm, pablo martinez <pablo.daniel.marti...@gmail.com>
wrote:
> sorry, I was with version 8.1. Now I checked the 9.10
>
> I've just tested it. Just replace your :
>     soa_xml_validate( "Valida_XML",
>
> with :
>      soa_xml_validate( "*StepName=*Valida_XML",
>
> On Wed, Jan 21, 2009 at 11:28 AM, Wellington <wellington.as...@gmail.com>wrote:
>
>
>
> > It's in the version 9.1 of LR. What is your version?
>
> > This is the code:
>
> >    soa_xml_validate( "Valida_XML",
> >   "XML={Param_returnAutenticarUsuario}",
> >   BEGIN_CHECKPOINTS,
> >    CHECKPOINT, "XPATH=parameters[1]/returnAutenticarUsuario[1]",
> > "Value=false",
> >   END_CHECKPOINTS,
> >   LAST );
>
> > 2009/1/21 pablo martinez pablo.daniel.marti...@gmail.com
>
> >> Also, I didn't find the funcion soa_xml_validate on vugen's help
> >> where is it?
>
> >>   On Wed, Jan 21, 2009 at 9:22 AM, pablo martinez <
> >> pablo.daniel.marti...@gmail.com> wrote:
>
> >>> I'm not sure, but it seems that it's taking
> >>> {Param_returnAutenticarUsuario}
> >>> as your string instead of its value.
> >>> Try to replace it with:
> >>> lr_eval_string("{Param_returnAutenticarUsuario}")
>
> >>>   On Wed, Jan 21, 2009 at 8:32 AM, Wellington <
> >>> wellington.as...@gmail.com> wrote:
>
> >>>> Hi,
>
> >>>> I am testing an webservice and I need validate a response XML with
> >>>> function SOA_XML_VALIDATE, but one error occurred. Can anybody help
> >>>> me? See below...
>
> >>>> Action.c(30): Error: The "Valida_XML" argument (#1) is invalid or not
> >>>> recognized at this position in the function call
> >>>> Action.c(30): Error: Xml Validation execution failed
> >>>> Action.c(30): Error: C interpreter run time error: Action.c (30):
> >>>> Error -- memory violation : Exception ACCESS_VIOLATION received.
> >>>> Action.c(30): Notify: CCI trace: Action.c(30): soa_xml_validate
> >>>> (0x03b60265 "Valida_XML", 0x03b60241 "XML=
> >>>> {Param_returnAutenticarUsuario}", 0x03b6022f "BEGIN_CHECKPOINTS",
> >>>> 0x03b60224 "CHECKPOINT", 0x03b601f5 "XPATH=parameters[1]/
> >>>> returnAutenticarUsua...", 0x03b601e9 "Value=false", 0x03b601d9.
> >>>> Action.c(30): Notify: CCI trace:  "END_CHECKPOINTS", 0x03b60270
> >>>> "LAST")
> >>>> .
> >>>> Action.c(30): Notify: CCI trace: Compiled_code(0): Action()
> >>>> Regards,
> >>>> Wellington
> >>>> Vitória - ES, Brazil.- Hide quoted text -
>
> - Show quoted text -

pablo martinez

unread,
Jan 22, 2009, 9:28:28 AM1/22/09
to LR-Loa...@googlegroups.com
I cannot run your example because I have neither the content or "response" nor your schema.xsd
but just looking at it, I see
               "SnapShot=teste.inf",
instead:
               "Snapshot=teste.inf",
you know, LR is very "sensitive" (I didn't want to say poorly implemented)
 
try to replace the capital S on "Shot" and tell me if it works

pablo martinez

unread,
Jan 22, 2009, 9:47:34 AM1/22/09
to LR-Loa...@googlegroups.com
no, it's not the capital S (I tried with S and s, always the same good result). So, check the content of your "response" variable
 
I tried with:
  lr_save_string("<?xml version=\"1.0\" encoding=\"UTF-8\"?> <personne xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"personne.xsd\">   <nom>de Latour</nom>   <prenom>Jean</prenom>   <date_naissance>1967-08-13</date_naissance> </personne>",
      "response" );
   soa_xml_validate( "StepName=Valida_XML",
               "SnapShot=teste.inf",
               "XML={response}",
               "XSD=Schema.xsd",
               LAST );
 
and as Schema.xsd I used (from the same example that I took the xml that I put in "response"):
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
   <xs:element name="personne">
      <xs:complexType>
         <xs:sequence>
            <xs:element name="nom" type="xs:string"/>
            <xs:element name="prenom" type="xs:string"/>
            <xs:element name="date_naissance" type="xs:date"/>
         </xs:sequence>
      </xs:complexType>
   </xs:element>
</xs:schema>
when I ran it:
Virtual User Script started
Starting action vuser_init.
Ending action vuser_init.
Running Vuser...
Starting iteration 1.
Starting action Action.
Action.c(32): Xml Validation "Valida_XML" started
Action.c(32): Xml Validation "Valida_XML" was successful
Action.c(32): XML validation was successful
Ending action Action.
Ending iteration 1.
Ending Vuser...
Starting action vuser_end.
Ending action vuser_end.
Vuser Terminated.

Wellington

unread,
Jan 22, 2009, 1:31:52 PM1/22/09
to LoadRunner
Hi, Pablo.
I've tried all your solutions, but none of them worked.
I'd like to know if there is any patches installed in your machine.
I've searched for solutions in the web, and I've got many answers.
There aren't references about soa_xml_validate function.

Is ACCESS_VIOLATION a C macro?

The last test I did is:

lr_save_string( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
"<SOAP-ENV:Envelope xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/
envelope/\">"
"<SOAP-ENV:Body>"
"<ns0:autenticarUsuarioResponse xmlns:ns0=\"file.xsd\">"
"<ns0:returnAutenticarUsuario>true</ns0:returnAutenticarUsuario>"
"</ns0:autenticarUsuarioResponse>"
"</SOAP-ENV:Body>"
"</SOAP-ENV:Envelope>","teste");


soa_xml_validate( "StepName=Valida_XML",
"Snapshot=debug.inf",
"XML={teste}",
"XSD=Schema.xsd",
LAST );



On Jan 22, 12:47 pm, pablo martinez <pablo.daniel.marti...@gmail.com>
wrote:
> no, it's not the capital S (I tried with S and s, always the same good
> result). So, check the content of your "response" variable
>
> I tried with:
>   lr_save_string("<?xml version=\"1.0\" encoding=\"UTF-8\"?> <personne
> xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\<http://www.w3.org/2001/XMLSchema-instance/>"
> xsi:noNamespaceSchemaLocation=\"personne.xsd\">   <nom>de Latour</nom>
> <prenom>Jean</prenom>   <date_naissance>1967-08-13</date_naissance>
> </personne>",
>       "response" );
>    soa_xml_validate( "StepName=Valida_XML",
>                "SnapShot=teste.inf",
>                "XML={response}",
>                "XSD=Schema.xsd",
>                LAST );
>
> and as Schema.xsd I used (from the same example that I took the xml that I
> put in "response"):
> *<?xml* version="1.0" encoding="UTF-8"*?>*
> *<xs:schema* xmlns:xs="http://www.w3.org/2001/XMLSchema"*>*
>    *<xs:element* name="personne"*>*
>       *<xs:complexType>*
>          *<xs:sequence>*
>             *<xs:element* name="nom" type="xs:string"*/>*
>             *<xs:element* name="prenom" type="xs:string"*/>*
>             *<xs:element* name="date_naissance" type="xs:date"*/>*
>          *</xs:sequence>*
>       *</xs:complexType>*
>    *</xs:element>*
> *</xs:schema>*
> when I ran it:
> Virtual User Script started
> Starting action vuser_init.
> Ending action vuser_init.
> Running Vuser...
> Starting iteration 1.
> Starting action Action.
> Action.c(32): Xml Validation "Valida_XML" started
> Action.c(32): Xml Validation "Valida_XML" was successful
> Action.c(32): XML validation was successful
> Ending action Action.
> Ending iteration 1.
> Ending Vuser...
> Starting action vuser_end.
> Ending action vuser_end.
> Vuser Terminated.
>
> On Thu, Jan 22, 2009 at 9:28 AM, pablo martinez <
>
>
>
> pablo.daniel.marti...@gmail.com> wrote:
> > I cannot run your example because I have neither the content or "response"
> > nor your schema.xsd
> > but just looking at it, I see
> >                "SnapShot=teste.inf",
> > instead:
> >                "Snap*s*hot=teste.inf",
> > you know, LR is very "sensitive" (I didn't want to say poorly implemented)
>
> > try to replace the capital S on "Shot" and tell me if it works
>
> > On Thu, Jan 22, 2009 at 9:12 AM, Wellington <wellington.as...@gmail.com>wrote:
>
> >> Thanks Pablo,
>
> >> But the problem continues. I really need some help, now the error is:
>
> >> Action.c(31): Error: The "XML={response}" argument (#3) is invalid or
> >> not recognized at this position in the function call
> >> Action.c(31): Error: Xml Validation "Valida_XML" execution failed
> >> Action.c(31): Error: C interpreter run time error: Action.c (31):
> >> Error -- memory violation : Exception ACCESS_VIOLATION received.
> >> Action.c(31): Notify: CCI trace: Action.c(31): soa_xml_validate
> >> (0x03b6021a "StepName=Valida_XML", 0x03b60207 "SnapShot=teste.inf",
> >> 0x03b601f8 "XML={response}", 0x03b601e9 "XSD=Schema.xsd", 0x03b60246
> >> "LAST")
> >> .
> >> Action.c(31): Notify: CCI trace: Compiled_code(0): Action()
>
> >> ---------------------------------------------------------------------------­----------
> >> > - Show quoted text -- Hide quoted text -

pablo martinez

unread,
Jan 22, 2009, 1:58:12 PM1/22/09
to LR-Loa...@googlegroups.com
(hey guys, if I'm bothering someone with all this email traffic, just tell me and I'll continue all this only with wellington. Dmitry, is that ok?)
 
no, ACCESS_VIOLATION is an error, a memory fault (for example, you have a 10 bytes buffer and you are trying to access the 12th byte in it. There's no 12th byte, so you have an access violation)
 
I guess your first error (without the StepName) gave you an access violation because loadrunner was scanning the string looking for StepName=, i didn"t find it and it crashed. I don't know the internal implementation, but it seems that it continue scanning "out of" the string ..
 
Your current error ... I got no idea. Let's try with the response content and the Schema.xsd that I used. It's just to see if it's a version issue. I send you a zip with my example (it contains the Schema.xsd file also). Just import it into LR and run it
 
I have a patch installed (it was intended to solve a web service issue, but it never worked ... long story). I send you a screenshot with my versions
LR9_version.JPG
schema.zip

Wellington

unread,
Jan 22, 2009, 3:51:47 PM1/22/09
to LoadRunner
I ran the script you sent me and didn't work. I think the problem is
the path that is missing.

Below the execution log:

Starting iteration 1.
Starting action Action.
Action.c(3): Notify: Saving Parameter "response = <?xml version="1.0"
encoding="UTF-8"?> <personne xmlns:xsi="http://www.w3.org/2001/
XMLSchema-instance" xsi:noNamespaceSchemaLocation="personne.xsd">
<nom>de Latour</nom> <prenom>Jean</prenom>
<date_naissance>1967-08-13</date_naissance> </personne>"
Action.c(5): Error: The "XML={response}" argument (#3) is invalid or
not recognized at this position in the function call
Action.c(5): Error: Xml Validation "Valida_XML" execution failed
Action.c(5): Error: C interpreter run time error: Action.c (5): Error
-- memory violation : Exception ACCESS_VIOLATION received.
Action.c(5): Notify: CCI trace: Action.c(5): soa_xml_validate
(0x01090167 "StepName=Valida_XML", 0x01090154 "SnapShot=teste.inf",
0x01090145 "XML={response}", 0x01090136 "XSD=Schema.xsd", 0x01090131
"LAST")
.
Action.c(5): Notify: CCI trace: Compiled_code(0): Action()
.
Warning: Transaction "Action_Transaction" will be skipped - could not
calculate the transaction time (duration=0,0424, think_time=0,0000,
wasted_time=1232656101,0896).
Action was aborted.

On 22 jan, 16:58, pablo martinez <pablo.daniel.marti...@gmail.com>
wrote:
> (hey guys, if I'm bothering someone with all this email traffic, just tell
> me and I'll continue all this only with wellington. Dmitry, is that ok?)
>
> no, ACCESS_VIOLATION is an error, a memory fault (for example, you have a 10
> bytes buffer and you are trying to access the 12th byte in it. There's no
> 12th byte, so you have an access violation)
>
> I guess your first error (without the StepName) gave you an access violation
> because loadrunner was scanning the string looking for StepName=, i didn"t
> find it and it crashed. I don't know the internal implementation, but it
> seems that it continue scanning "out of" the string ..
>
> Your current error ... I got no idea. Let's try with the response content
> and the Schema.xsd that I used. It's just to see if it's a version issue. I
> send you a zip with my example (it contains the Schema.xsd file also). Just
> import it into LR and run it
>
> I have a patch installed (it was intended to solve a web service issue, but
> it never worked ... long story). I send you a screenshot with my versions
>
> On Thu, Jan 22, 2009 at 1:31 PM, Wellington <wellington.as...@gmail.com>wrote:
>
> > Hi, Pablo.
> > I've tried all your solutions, but none of them worked.
> > I'd like to know if there is any patches installed in your machine.
> > I've searched for solutions in the web, and I've got many answers.
> > There aren't references about soa_xml_validate function.
>
> > Is ACCESS_VIOLATION a C macro?
>
> > The last test I did is:
>
> > lr_save_string( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
> >                "<SOAP-ENV:Envelope xmlns:SOAP-ENV=\"
> >http://schemas.xmlsoap.org/soap/
> > envelope/\ <http://schemas.xmlsoap.org/soap/envelope//>">"
>  LR9_version.JPG
> 117KExibirDownload
>
>  schema.zip
> 34KExibirDownload

pablo martinez

unread,
Jan 22, 2009, 4:13:40 PM1/22/09
to LR-Loa...@googlegroups.com
call HP support and ask them for that patch, maybe that's the cause
 
hey guys, does anybody have LR9.10 without patches installed ? could you please try my little script to verify if the problem is a patch missing?
 
and someone who has LR9.10 with the patch:
LR91P026 for HP LoadRunner 9.10 QFE
could please also run it?
 
this is my execution log
Virtual User Script started
Starting action vuser_init.
Ending action vuser_init.
Running Vuser...
Starting iteration 1.
Starting action Action.
Action.c(5): Xml Validation "Valida_XML" started
Action.c(5): Xml Validation "Valida_XML" was successful
Action.c(5): XML validation was successful

Ending action Action.
Ending iteration 1.
Ending Vuser...
Starting action vuser_end.
Ending action vuser_end.
Vuser Terminated.


kiran

unread,
Jan 27, 2009, 5:38:48 AM1/27/09
to LoadRunner
Well the first thing you need to check is if the XML is well formed
for all your requests.Most of the web services issues falls in this
category.Triple check all these things.

On Jan 23, 2:13 am, pablo martinez <pablo.daniel.marti...@gmail.com>
wrote:
> call HP support and ask them for that patch, maybe that's the cause
>
> hey guys, does anybody have LR9.10 without patches installed ? could you
> please try my little script to verify if the problem is a patch missing?
>
> and someone who has LR9.10 with the patch:
> LR91P026 for HP LoadRunner 9.10 QFE
> could please also run it?
>
> this is my execution log
> Virtual User Script started
> Starting action vuser_init.
> Ending action vuser_init.
> Running Vuser...
> Starting iteration 1.
> Starting action Action.
> Action.c(5): Xml Validation "Valida_XML" started
> Action.c(5): Xml Validation "Valida_XML" was successful
> Action.c(5): XML validation was successful
> Ending action Action.
> Ending iteration 1.
> Ending Vuser...
> Starting action vuser_end.
> Ending action vuser_end.
> Vuser Terminated.
>
> ...
>
> read more »- Hide quoted text -
Reply all
Reply to author
Forward
0 new messages