|
|
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
|
|
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.
|
|
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
|
|
|
guest |