How to compare two SOAP Envelope or two Document or two XML files

Discussion in 'Java' started by GenxLogic, Dec 6, 2006.

  1. GenxLogic

    GenxLogic Guest

    Hi All,
    I am testing a web service.
    I need to compare the SOAP Response i got from the web service with the
    xml present with me as expected output. i means to say i am receiving
    SOAPEnvelope using call.invoke() function and i want to compare this
    envelope with another XML file.
    Could anyone help me out please?

    Thanks in Advance,
    Deepak Kumar
    Infosys Technologies Ltd.
     
    GenxLogic, Dec 6, 2006
    #1
    1. Advertising

  2. GenxLogic

    Tomek Guest

    GenxLogic napisal(a):
    > Hi All,
    > I am testing a web service.
    > I need to compare the SOAP Response i got from the web service with the
    > xml present with me as expected output. i means to say i am receiving
    > SOAPEnvelope using call.invoke() function and i want to compare this
    > envelope with another XML file.
    > Could anyone help me out please?


    Comparing SOAP response with xml data from file can be tricky,
    different parser can generate different output. But you can check if
    some specific elements exists inside response using XPath.
     
    Tomek, Dec 6, 2006
    #2
    1. Advertising

  3. GenxLogic

    Lew Guest

    Tomek wrote:
    > GenxLogic napisal(a):
    >> Hi All,
    >> I am testing a web service.
    >> I need to compare the SOAP Response i got from the web service with the
    >> xml present with me as expected output. i means to say i am receiving
    >> SOAPEnvelope using call.invoke() function and i want to compare this
    >> envelope with another XML file.
    >> Could anyone help me out please?

    >
    > Comparing SOAP response with xml data from file can be tricky,
    > different parser can generate different output. But you can check if
    > some specific elements exists inside response using XPath.


    Google "canonical XML form".

    - Lew
     
    Lew, Dec 6, 2006
    #3
  4. On Dec 6, 10:53 am, "GenxLogic" <> wrote:
    > Hi All,
    > I am testing a web service.
    > I need to compare the SOAP Response i got from the web service with the
    > xml present with me as expected output. i means to say i am receiving
    > SOAPEnvelope using call.invoke() function and i want to compare this
    > envelope with another XML file.
    > Could anyone help me out please?
    >
    > Thanks in Advance,
    > Deepak Kumar
    > Infosys Technologies Ltd.


    if you are testing a web service - I HIGHLY recommend soapUI.

    Its a great tool for inspecting, ad-hoc experimenting with a web
    service's methods and best of all, allows automated test cases to be
    created and run very easily. It will also do load testing for you.

    The only down side, is its a Java Webstart app, that requires you to
    accept its security certificate. However, we use it in our Corporate
    environment without any issues.


    Andrew

    See
    http://www.soapui.org/

    screen shots:
    http://www.soapui.org/images/screenshot1.gif
    http://www.soapui.org/images/screenshot2.gif
    http://www.soapui.org/images/screenshot3.gif
    http://www.soapui.org/images/screenshot4.gif
     
    andrewmcdonagh, Dec 6, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mike
    Replies:
    0
    Views:
    535
  2. cxc
    Replies:
    0
    Views:
    6,398
  3. Rich

    Xml namespace in soap:envelope

    Rich, Jan 5, 2005, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    252
    Dilip Krishnan
    Jan 5, 2005
  4. msdnuniv

    exception on Response Envelope, Error in XML-document

    msdnuniv, Aug 22, 2007, in forum: ASP .Net Web Services
    Replies:
    11
    Views:
    749
    Kim Janssens
    Nov 30, 2008
  5. droesler
    Replies:
    2
    Views:
    509
    droesler
    Aug 31, 2010
Loading...

Share This Page