Using XML Name Value Pairs in Web Services

"Brendan Laing" <[email protected]> Tue, 27 Jan 2009 14:06:34 +0000
Newsgroups gmane.text.xml.distributed
Message-ID <CCA0A6D7ECC4B74C9CF222B0825F1FF003D45A76@UKISMC01.axongroup.co.uk>



This is a multi-part message in MIME format.

------_=_NextPart_001_01C98088.5AC63A3B
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hi,=20

=20

I'm looking for some advice. What are the drawbacks of implementing a
generic XSD for web services by using Name/Value Pairs as described
below:

=20

<GenericServiceTicket>

=20

 <ServiceTicketHeader>

  <TransactionID>80001234</TransactionID>=20

  <Subject>WM18</Subject>=20

  <UserStatus>E0001</UserStatus>=20

  <Result>Result</Result>=20

  <ExternalReference />=20

  <Channel>202</Channel>

 </ServiceTicketHeader>

=20

 <ServiceSpecifics>

  <Value GroupID=3D"" Name=3D"JobTypeID">BULW</Value>=20

  <Value GroupID=3D"" Name=3D"JobSubTypeID">TAIL</Value>=20

  <Value GroupID=3D"1" Name=3D"BulkyCode">SOF</Value>=20

  <Value GroupID=3D"1" Name=3D"Quantity">1</Value>=20

 </ServiceSpecifics>

=20

</GenericServiceTicket>

=20

If we implemented these name/value pairs as full XSD schemas than we
would have 30-40 different schemas. By using Name/Value pairs we can
have one single generic schema. Intuitively this feels like misuse of
XML standards and the purpose of using XSD's and WSDL's but I have no
hard argument with our technical team since it is still XML. I would
like to be 100% certain that this will not create issues for support or
interoperability at some point in the future.=20

=20

Do you any experience implement this approach and later regretted it?

=20

Brendan



DISCLAIMER:

The contents of this e-mail and any attachment(s) are confidential and inte=
nded for the named recipient(s) only. It shall not attach any liability on =
the originator or HCL or its affiliates. Any views or opinions presented in=
 this email are solely those of the author and may not necessarily reflect =
the opinions of HCL or its affiliates. Any form of reproduction, disseminat=
ion, copying, disclosure, modification, distribution and / or publication o=
f this message without prior written consent of the author of this e-mail i=
s strictly prohibited. If you have received this email in error please dele=
te it and notify the sender immediately. Before opening any mail and attach=
ments please check them for viruses and defect.

Axon Solutions Limited. Registered Office: Axon Centre, Church Road, Egham,=
 Surrey, TW20 9QB, UK. Registered in England & Wales under Company No. 2976=
395. Axon Solutions Limited is a limited company.


------_=_NextPart_001_01C98088.5AC63A3B
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" xmlns:w=3D"urn:sc=
hemas-microsoft-com:office:word" xmlns=3D"http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 11 (filtered medium)">
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:Arial;
	color:windowtext;}
span.m1
	{color:blue;}
span.t1
	{color:#990000;}
span.b1
	{font-family:"Courier New";
	color:red;
	font-weight:bold;
	text-decoration:none none;}
span.tx1
	{font-weight:bold;}
@page Section1
	{size:595.3pt 841.9pt;
	margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
	{page:Section1;}
-->
</style>

</head>

<body lang=3DEN-GB link=3Dblue vlink=3Dpurple>

<div class=3DSection1>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>Hi, <o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>I&#8217;m looking for some advice. What are the drawback=
s of
implementing a generic XSD for web services by using Name/Value Pairs as
described below:<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>&lt;GenericServiceTicket&gt;<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>&nbsp;&lt;ServiceTicketHeader&gt;<o:p></o:p></span></fon=
t></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>&nbsp;&nbsp;&lt;TransactionID&gt;80001234&lt;/Transactio=
nID&gt; <o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>&nbsp; &lt;Subject&gt;WM18&lt;/Subject&gt; <o:p></o:p></=
span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>&nbsp; &lt;UserStatus&gt;E0001&lt;/UserStatus&gt; <o:p><=
/o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>&nbsp; &lt;Result&gt;Result&lt;/Result&gt; <o:p></o:p></=
span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>&nbsp; &lt;ExternalReference /&gt; <o:p></o:p></span></f=
ont></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>&nbsp; &lt;Channel&gt;202&lt;/Channel&gt;<o:p></o:p></sp=
an></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>&nbsp;&lt;/ServiceTicketHeader&gt;<o:p></o:p></span></fo=
nt></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>&nbsp;&lt;ServiceSpecifics&gt;<o:p></o:p></span></font><=
/p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>&nbsp; &lt;Value GroupID=3D&quot;&quot;
Name=3D&quot;JobTypeID&quot;&gt;BULW&lt;/Value&gt; <o:p></o:p></span></font=
></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>&nbsp; &lt;Value GroupID=3D&quot;&quot;
Name=3D&quot;JobSubTypeID&quot;&gt;TAIL&lt;/Value&gt; <o:p></o:p></span></f=
ont></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>&nbsp; &lt;Value GroupID=3D&quot;1&quot;
Name=3D&quot;BulkyCode&quot;&gt;SOF&lt;/Value&gt; <o:p></o:p></span></font>=
</p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>&nbsp; &lt;Value GroupID=3D&quot;1&quot; Name=3D&quot;Qu=
antity&quot;&gt;1&lt;/Value&gt;
<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>&nbsp;&lt;/ServiceSpecifics&gt;<o:p></o:p></span></font>=
</p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>&lt;/GenericServiceTicket&gt;<o:p></o:p></span></font></=
p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>If we implemented these name/value pairs as full XSD sch=
emas
than we would have 30-40 different schemas. By using Name/Value pairs we can
have one single generic schema. Intuitively this feels like misuse of XML
standards and the purpose of using XSD&#8217;s and WSDL&#8217;s but I have =
no
hard argument with our technical team since it is still XML. I would like t=
o be
100% certain that this will not create issues for support or interoperabili=
ty
at some point in the future. <o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>Do you any experience implement this approach and later =
regretted
it?<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span style=3D'font-size:1=
0.0pt;
font-family:Arial'>Brendan<o:p></o:p></span></font></p>

</div>

<html>
<body>
<br>
<font size=3D"1" face=3D"Arial" color=3D"#000000">
DISCLAIMER:=20
<br>-----------------------------------------------------------------------=
-------------------------------------------<br>
The contents of this e-mail and any attachment(s) are confidential and inte=
nded for the named recipient(s) only. It shall not attach any liability on =
the originator or HCL or its affiliates. Any views or opinions presented in=
 this email are solely those of the author and may not necessarily reflect =
the opinions of HCL or its affiliates. Any form of reproduction, disseminat=
ion, copying, disclosure, modification, distribution and / or publication o=
f this message without prior written consent of the author of this e-mail i=
s strictly prohibited. If you have received this email in error please dele=
te it and notify the sender immediately. Before opening any mail and attach=
ments please check them for viruses and defect.
<br>-----------------------------------------------------------------------=
-------------------------------------------<br>
<br>
Axon Solutions Limited, Registered Office: Axon Centre, Church Road, Egham,=
 Surrey, TW20 9QB, UK. Registered in England & Wales under Company No. 2976=
395. Axon Solutions Limited is a limited company.<br>
</font>
</body>
</html>
</body>

</html>

------_=_NextPart_001_01C98088.5AC63A3B--