Forum Discussion

Shilpa's avatar
Shilpa
Occasional Contributor
17 years ago

Is it possible to de-serialize complex objects and compare against WSDL?

Hi,

I am very new to SOAP UI and to Groovy script also. I need help in identifying a way to de-serialize complex objects and to compare each and every object against WSDL..

I am able to manage myself to write a script and placed it as script assertion that gives total no of object coming in response.

But I am unable to refactor the object and compare each of its parameter against WSDL.


Is it possible? Please help asap..

5 Replies

  • Hello!

    Could you please elaborate? I do not quite understand what it is you are serializing, how you are serializing it, or why. Thank you!

    Regards,
    Dain
    eviware.com
  • Shilpa's avatar
    Shilpa
    Occasional Contributor
    Hi Dain,

    Thanks for the reply..

    There are some complex objects  that has been internally defined and APIs use those complex object. I need to verify whether each and every parameter within the complex object  are coming properly in Response XML or not and also want to compare those parameters against the parameters defined in WSDL.


    For example, If (Rq1,Rq2) parameters are defined in Request XML then I should get (Re1,Re2) only in Response XML .I should not get Re3.

    I hope the requirement is clear now.

    Is it possible?

    Thanks

    Shilpa
  • Hi Shilpa,


    There are still some details missing from your description. I'll try to dig into the problem to help you out.

    I assume you're refactoring server-side code and objects that are being serialized when responding a web services request.  I further assume your server-side framework is providing serialization facility for you (i.e. converting data objects into XML text embedded within SOAP body).

    If my assumptions are correct, please let us know this:
    - When you refactor you server-side code and classes which instances are serialized to XML is the corresponding WSDL also automatically updated by your server-side framework?
    - If you SOAP response contains a XML schmema, soapUI allows you to check for Schema Compliance.  If you run into some problems, make sure to check out the sample project. Will this solve your need to compare reponse against the parameters defined in WSDL?

    Let us know if you managed to solve your problem.


    Cheers!
    /Nenad Nikolic a.k.a. Shonzilla
  • Shilpa's avatar
    Shilpa
    Occasional Contributor
    Hi,

    Yes,your assumptions are correct.


    Yes, WSDL automatically gets updated by server-side framework.

    Schema Compliance never worked for me. I tried using it in intial stages.
    I will surely get through the sample project and will let you know.

    Regards,
    Shilpa
  • Shilpa's avatar
    Shilpa
    Occasional Contributor
    Hi,

    I am bit late to reply for my query.

    I was wrong by giving information that wsdl gets updated automatically with server-side framework.

    I tried using "schema compilance" assertion. Its giving exception as "soap encoded mesage not supported".

    If you want  I can post the script that I am using in script assertion to find out total no of complex objects in response.My concern is to verify each parameter inside each and every complex objects.


    How shall I proceed futher?

    Thanks and Regards,
    Shilpa