Ask a Question

I don't want the Optional elements in XML message to be automatically added by ReadyAPI

SOLVED
MRutten
Occasional Contributor

I don't want the Optional elements in XML message to be automatically added by ReadyAPI

Good afternoon,

 

I am using ReadyAPI 3.1.0

 

There was a big difference between my XML message yesterday and the message today.

It looks as if ReadyAPI has automatically added all kind of optional elements in the message without me knowing about it. 

This is very disturbing!

 

Example of message as defined yesterday:

Original XMLOriginal XML

Example of the same message as it looks today:

 

Why does REadyAPI make these changes? I don't want that.Why does REadyAPI make these changes? I don't want that.

 

4 REPLIES 4
sonya_m
SmartBear Alumni (Retired)

Hi @MRutten, let's see if the community members faced anything similar and have advice on how to handle this.

 

Any idea of what could be happening?

@nmrao @HimanshuTayal  @richie @groovyguy 

Thanks!


Sonya Mihaljova
Community and Education Specialist

groovyguy
Community Hero

I haven't made the upgrade from 2.3.0 to 3.1.0 yet, but the only time I've seen this behavior is if I have ReadyAPI set to automatically build requests with optional fields and use the F5 / Recreate request buttons to rebuild the request.




---

Click the Accept as Solution button if my answer has helped, and remember to give kudos where appropriate too!
nmrao
Community Hero

I would suggest to check with your team or service provider to find if there is any change in the wsdl definition.
Tool can't imagine the schema and add random data to the request.


Regards,
Rao.
richie
Community Hero

Hi @MRutten 

 

Just reiterating what Rao and msiadak mentioned.

 

There is a switch to add in all optional tags from a schema.  If your schema is embedded within your .wsdl (and it sounds like thats the way its been setup) and this switch has been set then I'm almost 100% positive this will be the cause (unless a regression has been added to v3.2!) as the content added is too non random to be anything else.

 

Capture55.PNG

 

you could always double check by extracting the .xsd from the .wsdl, launch in something like XMLSpy and use XMLSpy to generate an example xml instance based on the .xsd content (XMLSpy also includes switches to build instance content with and without optional tags/attributes

 

cheers,

 

rich

if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
cancel
Showing results for 
Search instead for 
Did you mean: