Re: xml validation (302 Views)
Reply
Advisor
ferrata's
Posts: 18
Registered: ‎03-03-2010
Message 1 of 5 (369 Views)

xml validation

Hi all,

 

I'm trying to validate a xml response data from web. I'm working in WebServices scripting in Vugen 11.04. I only want to compare the result with a xml file.

 

I'm trying do some that:

 


 Action()

{

    web_reg_save_param("WCSParam_Text1",
        "LB=",
        "RB=",
        "Ord=1",
        "RelFrameId=1",
        "Search=Body",
        "IgnoreRedirections=Yes",
        LAST );

//This step performs the service request.

web_url("xml",
"URL=http://****",
        "Resource=0",
        "RecContentType=text/xml",
        "Referer=",
        "Snapshot=t1.inf",
        "Mode=HTML",
        LAST );


// This step validates the results.
        soa_xml_validate ("StepName=ValidacioXML",
        "Snapshot=xmlsnap1.inf",
        "XML={WCSParam_Text1}",
        "StopOnValidationError=0",
        "XSD=C:\\scripts_vugen_xml\\OSBxsd.xml",
     BEGIN_CHECKPOINTS,
CHECKPOINT,"XPATH=/EstatServeis/CanalFax/Domini","Value_Equals=OK",
        END_CHECKPOINTS,
        LAST );

    return 0;

}

 

But when I run the script Vugen shows me two errors:

 

Action.c(38): Error: XML execution failed (CoInitialize problem) --> Code Error: -1088009
Action.c(38): Error: Xml Validation "ValidacioXML" execution failed --> Code Error: -108811

 

Any can help me for this issue?

 

Best regards,

 

David

 

HP Expert
Suerte13cr
Posts: 736
Registered: ‎09-14-2011
Message 2 of 5 (363 Views)

Re: xml validation

You may want to replay this with extended logs to get a better idea of what the issue is. I dont believe Vugen supports sequential processing of transactions which might be why you get this error.

 

Regards,

Mario M.

HP LR/PC Support

If you are customer you can try posting on our internal forums for more personalized support.

LoadRunner:
http://h30499.www3.hp.com/t5/LoadRunner-Support-Customer/bd-p/loadrunner-support-customer-forum

Performance Center:
http://h30499.www3.hp.com/t5/Performance-Center-Support/bd-p/performance-center-support-customer

How to:
http://www.youtube.com/watch?v=4ChlysWupWM

If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.
Advisor
ferrata's
Posts: 18
Registered: ‎03-03-2010
Message 3 of 5 (358 Views)

Re: xml validation

Hi Mario,

 

In extended logs we find:

 

Action.c(29): Error: XML execution failed (CoInitialize problem)
Action.c(29): Error: Xml Validation "ValidacioXML" execution failed
Action.c(29): Error while formatting the report
Action.c(29): Error while formatting the report

 

Is possible that the soa_xml_validate function fails if the xml to analize hasn't the correct format?

 

I try to rerun without the xsd reference to analize only the format. Like this:

 

Action()
{


    web_reg_save_param("WCSParam_Text1",
        "LB=",
        "RB=",
        "Ord=1",
        "RelFrameId=1",
        "Search=Body",
        "IgnoreRedirections=Yes",
        LAST );

    web_url("SondaEstatServeisOSBService",
        "URL=http://***",
        "Resource=1",
        "RecContentType=text/xml",
        "Referer=",
        "Snapshot=t1.inf",
        LAST);

    // This step validates the results.
        soa_xml_validate ("StepName=ValidacioXML",
        "Snapshot=xmlsnap1.inf",
        "XML={WCSParam_Text1}",
        "StopOnValidationError=0",
        //"XSD=C:\\scripts_vugen_xml\\OSB.xsd",
        LAST );


    return 0;
}

 

How can I compare the xml result with a xml file? The objective to do this is compare the web result and a xml file. The two elements will be the same.

 

Best regards,

 

David

HP Expert
Suerte13cr
Posts: 736
Registered: ‎09-14-2011
Message 4 of 5 (347 Views)

Re: xml validation

I am not quite sure about what you are trying to accomplish but it still seems that there is aproblem running this xml within Vugen because of the CoInitialize.

 

Regards,

Mario M.

HP LR/PC Support

If you are customer you can try posting on our internal forums for more personalized support.

LoadRunner:
http://h30499.www3.hp.com/t5/LoadRunner-Support-Customer/bd-p/loadrunner-support-customer-forum

Performance Center:
http://h30499.www3.hp.com/t5/Performance-Center-Support/bd-p/performance-center-support-customer

How to:
http://www.youtube.com/watch?v=4ChlysWupWM

If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.
Occasional Advisor
jeanbean
Posts: 34
Registered: ‎06-13-2012
Message 5 of 5 (302 Views)

Re: xml validation

I am getting the exact same message as the original poster describes. And in same circumstatances. Has anyone a suggestion on what causes this? I ultimately would like to add some checkpoints via the soa_xml_validate() function.

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.