Forum Discussion
richie
5 years agoCommunity Hero
Hi rodneyH,
I dont understand the title of your post "how to pass data as container data type"
Are you talking about passing data in the bits of your xml which is representer by ? characters or do you mean something else? There are a number or ways of passing values via xml tags in a payload.
You do have a containing tag entitled <CONTAINER></CONTAINER>, but the xml youve supplied below is malformed xml (its malformed for a number of reasons) ...i.e. it wont be parsed successfully by an xmlparser.
Can you rephrase your question so we know exactly what you mean, but can you also provide the genuine wellformed xml you need?
Cheers,
Rich
I dont understand the title of your post "how to pass data as container data type"
Are you talking about passing data in the bits of your xml which is representer by ? characters or do you mean something else? There are a number or ways of passing values via xml tags in a payload.
You do have a containing tag entitled <CONTAINER></CONTAINER>, but the xml youve supplied below is malformed xml (its malformed for a number of reasons) ...i.e. it wont be parsed successfully by an xmlparser.
Can you rephrase your question so we know exactly what you mean, but can you also provide the genuine wellformed xml you need?
Cheers,
Rich
- rodneyH5 years agoNew Contributor
Hi Rich,
Thanks for your response. Perhaps I should rephrase my question properly....
The data I need to pass to my web service as container data type which has key and value format. I don't know what values to put in the question marks in the xml element.
For example, if i want to send the data as pet = tiger as my container data type.
Your help is greatly appreciated.
<rhv:TechNotes>
<!--You have a CHOICE of the next 2 items at this level-->
<rhv:element type="?" name="?">?</rhv:element>
<rhv:container/>
</rhv:TechNotes>- richie5 years agoCommunity HeroHey rodneyH
Alright fella....right your question is a little confusing for a number of reasons. I understand now that you want to know the values with the ? Character placeholders but there are issues with any forum member answering your question.
Firstly you keep mentioning that you need to identify the container datatype, and you give an example like pet=tiger so it appears youre trying to identify a group name and individual values for that, but we (forum members) would not know this, this would be part of your requirement (like an xml schema....xml schemas often have the file extension of .xsd. an xml instance is posted to a listening webservice and the xml instance is then compared/validated against the xml schema (.xsd file) to ensure the file is formatted correctly and the values populating the elements and elements' attributes are correct...e.g. has correct length, datatype (string, or numeric, etc.) content pattern, etc.
The xml that youve copied into your post has a number of errors in it so i can youve edited it, but on top of that, it looks like the content of a schema file, rather than an xml instance (which is the payload you submit to the web service).
Going back to your example pet=tiger.....if you publish your schema file we would be able to build a wellformed and valid xml instance (payload) for you, we might be able to determine the group/individual values for you, but we'd need that detail at the very minimum and it depends om how detailed the schema is before anyone could do that.
Hope this helps a little
Cheers,
Rich