Forum Discussion

SKoneru's avatar
SKoneru
Contributor
11 years ago

[Res]Automatically inserts additional tags in SOAP test step

Hi SOAPUI-PRO team,

I have created a sample SOAP request test step for one of the operation and modified the request according to my use-case. Which means, I removed some tags from the request.
Noticed that tool automatically inserts these tags when ever I close the test step and open it.

I am giving a sample XSD for which I notice this problem.
<xs:complexType name="DraftCheck">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="1" name="listingMode" type="xs:token"/>
<xs:element maxOccurs="1" minOccurs="1" name="listingSource" type="tns:ListingSource"/>
<xs:any maxOccurs="unbounded" minOccurs="0" processContents="lax"/>
</xs:sequence>
</xs:complexType>

In my request, I just need only listingMode and not listingSource, so I deleted listingSource, but I keep getting back this tag contents(close the request and open it, you will see it).
As this keeps appearing my tests fail.

I looked at all the options in tool preferences, update definitions for WSDL, but didn't find any option to fix it.

Any suggestions..

Thanks
Surya

7 Replies

  • I didn't do any changes to the WSDL. I should not change the existing WSDL.
    The example XSD that I provided is already existing in the WSDL.

    So there is no point of refactoring.
    I just modified the request in the SOAP test step by removing the "listingSource" container(please check the XSD that I quoted in the initial request).
    For some requests I need this container and some I don't need it.
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    You should still try to do refactoring so the changes can be updated in SoapUI.



    Regards,
    Marcus
    SmartBear Support
  • Marcus,

    What kind of refactoring should I do? As some of my requests should have the listingSource container and some don't.
    I didn't really understand what change you are recommending. This service is not modified in recent times.

    I just started writing tests and ran into this issue.

    Thanks
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    I was under the impression that you modified the schema. I believe you just want to create a test that has some missing request elements, correct?

    If that is the case then change the default editor to Source by File -> Preferences -> SoapUI Pro -> Default Request Editor: Source.



    Regards,
    Marcus
    SmartBear Software
  • Thank you Marcus. That worked.

    But can you explain or point me to the documentation that talks about SOAPUIPro preferences.
    I want to understand what it means changing "Default Request Editor" to Source, Outline, Form options.

    Thanks