Enhance adb binding union to default to type xs:any ---------------------------------------------------
Key: AXIS2-2900 URL: https://issues.apache.org/jira/browse/AXIS2-2900 Project: Axis 2.0 (Axis2) Issue Type: Improvement Components: adb Affects Versions: 1.2 Environment: All platforms. Reporter: Denis Rachal adb binding support of union types expects the XML attribute xs:type to be specified in the XML document when unmarshalling. If the xs:type attribute is missing the unmarshal fails. This enhancement requests that if the xs:type attribute is missing, the XML element be treated as an xs:any and unmarshal the elemen as a dom element. Example taken from: "http://schemas.xmlsoap.org/ws/2004/09/enumeration" Type is 'ExpirationType'. Element set in message response is 'Expires': <xs:simpleType name="NonNegativeDurationType"> <xs:restriction base="xs:duration"> <xs:minInclusive value="P0Y0M0DT0H0M0S"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="ExpirationType"> <xs:union memberTypes="xs:dateTime tns:NonNegativeDurationType"/> </xs:simpleType> ... <!-- Enumerate response --> <xs:element name="EnumerateResponse"> <xs:complexType> <xs:sequence> <xs:element name="Expires" type="tns:ExpirationType" minOccurs="0"/> <xs:element name="EnumerationContext" type="tns:EnumerationContextType"/> <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:anyAttribute namespace="##other" processContents="lax"/> </xs:complexType> </xs:element> XML document example: If the above case, the adb binding currently expects the following and will fail during unmarshal if the attribute 'xs:type' is not specified: ... <env:Body> <wsen:EnumerateResponse xmlns:ns11="http://test.foo" xmlns:ns12="http://examples.hp.com/ws/wsman/user"> <wsen:Expires xs:type="xs:dateTime">2147483647-12-31T23:59:59.999-14:00</wsen:Expires> <wsen:EnumerationContext>70d7063f-1639-4cda-a7db-b4fb2638b738</wsen:EnumerationContext> </wsen:EnumerateResponse> </env:Body ... If the following is sent, the adb binding should treat the value as 'xs:any' and not throw a fault for an "Unexpected element" during unmarshal: ... <env:Body> <wsen:EnumerateResponse xmlns:ns11="http://test.foo" xmlns:ns12="http://examples.hp.com/ws/wsman/user"> <wsen:Expires>2147483647-12-31T23:59:59.999-14:00</wsen:Expires> <wsen:EnumerationContext>70d7063f-1639-4cda-a7db-b4fb2638b738</wsen:EnumerationContext> </wsen:EnumerateResponse> </env:Body ... -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]