IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

Example for a specific choice Options · View
ceving
Posted: Sunday, October 4, 2009 8:15:38 AM
Rank: Newbie

Joined: 10/1/2009
Posts: 5
Location: DE
Hi,

how can I create an XML example file based on an XML schema for a specific choice? Whenever I try to create an example file XMLSpy creates a file only for the first element in a choice. I have an XML schema with several nested choices and I can not find a way to create an example of a specific combination of nested choices.

For example 'message' may be a choice of 'login' and 'logout'. And 'login' and 'logout' may be choices of 'request' and 'response'. So there are four different message possibilities:

message/login/request
message/login/response
message/logout/request
message/logout/response

XMLSpy creates always message/login/request. But I would like to create also the other three. How can this be done?

Regards
Sascha
paul
Posted: Monday, October 5, 2009 4:02:31 AM
Rank: Advanced Member

Joined: 9/9/2005
Posts: 483
Location: AT
Hello Sascha,

I am afraid that currently there is no possibility to influence which choice element is generated - as you have discovered, it is always the first. However, we do have an internal feature request logged to perhaps change this behaviour in the future.

In the meantime, if you are able, in the schema you should temporarily comment out all but the choice combination you wish to generate.
ceving
Posted: Monday, October 5, 2009 6:37:01 AM
Rank: Newbie

Joined: 10/1/2009
Posts: 5
Location: DE
Hi,

thanks for your information!

I found some kind of workaround, although I think this is also a bug. After importing the schema into a WSDL file I can create a SOAP request based on the schema. The WSDL part of XMLSpy ignores the choices and treats them as sequences. This results in a SOAP request, which contains all different choices. By removing the unnecessary choices I end up with my correct examples.

Regards
Sascha
Users browsing this topic
guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.