users@jax-rpc.java.net

Re: Instance document when using substitution groups

From: Anne Thomas Manes <atmanes_at_gmail.com>
Date: Sat, 26 Aug 2006 08:43:57 -0400

B.

On 8/25/06, Aspi_Engineer_at_putnam.com <Aspi_Engineer_at_putnam.com> wrote:
>
>
>
>
>
> Hi,
>
> My question is what should the instance document look like when using
> substitution groups.
>
> Suppose I have the following schema definitions:
>
> <xsd:element name="RequestList">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="clientId" type="xsd:string" />
> <xsd:element name="clientRequestId" type=
> "xsd:string" />
> <xsd:element name="synchFlag" type="xsd:int"
> default="0" />
> <xsd:element name="continueOnErrorFlag" type=
> "xsd:int"
> default="0" />
> <xsd:element ref="Requests" maxOccurs="unbounded"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
>
> HEAD ELEMENT OF THE SUBSTITUTION GROUP:
> <xsd:element name="Requests" type="Request" abstract="true"/>
>
> BASE TYPE:
> <xsd:complexType name="Request">
> <xsd:sequence>
> <xsd:element name="requestId" type="xsd:string" />
> </xsd:sequence>
> </xsd:complexType>
>
> DERIVED TYPE#1:
> <xsd:complexType name="BondsAIRequest">
> <xsd:complexContent>
> <xsd:extension base="tns:Request">
> <xsd:sequence>
> <xsd:element name="BondsAIRequestInfo"
> type="tns:BondsAIRequestInfo" />
> </xsd:sequence>
> </xsd:extension>
> </xsd:complexContent>
> </xsd:complexType>
>
> DERIVED TYPE#2:
> <xsd:complexType name="IRSwapRequest">
> <xsd:complexContent>
> <xsd:extension base="tns:Request">
> <xsd:sequence>
> <xsd:element name="IRSwapRequestInfo"
> type="tns:IRSwapRequestInfo" />
> </xsd:sequence>
> </xsd:extension>
> </xsd:complexContent>
> </xsd:complexType>
>
> MEMBERS OF THE SUBSTITUTION GROUP:
> <xsd:element name="BondsAIRequestElement" type="BondsAIRequest"
> substitutionGroup="Requests"/>
> <xsd:element name="IRSwapRequestElement" type="IRSwapRequest"
> substitutionGroup="Requests"/>
>
> Which one of the following is the correct representation of my instance
> document?
> (A)
> <ns0:RequestList>
> <clientId>CLT1</clientId>
> <clientRequestId>ClientRequestId</clientRequestId>
> <synchFlag>1</synchFlag>
> <continueOnErrorFlag>1</continueOnErrorFlag>
> <ns0:Requests xsi:type="ns0:BondsAIRequest">
> <requestId>BAI1</requestId>
> <BondsAIRequestInfo>
> .............elements here
> </BondsAIRequestInfo>
> </ns0:Requests>
> </ns0:RequestList>
>
> OR
> (B)
> <ns0:RequestList>
> <clientId>11</clientId>
> <clientRequestId>11</clientRequestId>
> <synchFlag>1</synchFlag>
> <continueOnErrorFlag>0</continueOnErrorFlag>
> <ns0:BondsAIRequestElement>
> <requestId>1</requestId>
> <BondsAIRequestInfo>
> ... elements here
> </BondsAIRequestInfo>
> </ns0:BondsAIRequestElement>
> </ns0:RequestList>
>
>
> The reason I ask is because we have a tool that is generating an instance
> document as shown in (B) above but its being rejected by jaxrpc which is
> expecting (A).
>
> Thanks
> Aspi
>
>
>
>
> This message is intended for the recipient only and is not meant to be forwarded or distributed in any other format. This communication is for informational purposes only. It is not intended as an offer or solicitation for the purchase or sale of any financial instrument, or security, or as an official confirmation of any transaction. Putnam does not accept purchase or redemptions of securities, instructions, or authorizations that are sent via e-mail. All market prices, data and other information are not warranted as to completeness or accuracy and are subject to change without notice. Any comments or statements made herein do not necessarily reflect those of Putnam, LLC (DBA Putnam Investments) and its subsidiaries and affiliates. If you are not the intended recipient of this e-mail, please delete the e-mail.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
> For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
>
>