We are using Axis 1.4 Regards Ian
CSC Solutions Norge AS Registered Office: SandsliƄsen 57, 5254 Sandsli, Norway Registered in Norway No: 958 958 455 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- "Amila Suriarachchi" <[EMAIL PROTECTED]> 15.08.2007 04:52 Please respond to [email protected] To [email protected] cc Subject Re: <xsd:choice> Are you using axis1.x or Axis2? On 8/10/07, Ian Meikle <[EMAIL PROTECTED]> wrote: Hi, We are using axis to access Web Services created and served from a legacy system. Some of our XSD's use the <xsd:choice> construct. An example is shopwn below. <xsd:complexType name="BinaryComparisonOperation" abstract="true" > <xsd:complexContent > <xsd:extension base="sds:UnaryComparisonOperation" > <xsd:sequence> <xsd:choice > <xsd:element name="elementReference" type="sds:ElementReference" minOccurs="0" /> <xsd:element name="value" type="xsd:anyType" minOccurs="0" /> </xsd:choice > </xsd:sequence> </xsd:extension > </xsd:complexContent > </xsd:complexType> When we import this into axis (using Eclipse WTP), everthing looks fine. However when we execute a call, the generated xml looks like: <multiRef id="id6" soapenc:root="0" soapenv:encodingStyle= "http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns7:Like" xmlns:ns7=" http://www.SicsNt.com/DomainSearch" xmlns:soapenc= "http://schemas.xmlsoap.org/soap/encoding/" > <elementName xsi:type="xsd:string" >name</elementName > <elementReference xsi:type="ns7:ElementReference" xsi:nil="true" /> <value xsi:type="ns8:String82" xmlns:ns8= "http://www.SicsNt.com/CommonTypes" > Demo* </value > </multiRef> Here <ns7:Like> is a child of <BinaryComparisonOperation>. As far as I understand this is incorrect since a <xsd:choice> construct means that only one of the contents should be serialized. i.e either <value> OR <elementReference>. Can someone please tell me if I am using axis wrong or if this is a bug ? Regards Ian Meikle CSC Solutions Norge AS Phone: +47 21 63 46 12 Mobile: +47 48 08 66 12 E-mail: [EMAIL PROTECTED] CSC Solutions Norge AS Registered Office: SandsliƄsen 57, 5254 Sandsli, Norway Registered in Norway No: 958 958 455 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -- Amila Suriarachchi, WSO2 Inc.
