You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org> on 2007/07/04 09:45:05 UTC

[jira] Commented: (AXIS2-2900) Enhance adb binding union to default to type xs:any

    [ https://issues.apache.org/jira/browse/AXIS2-2900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12510104 ] 

Amila Chinthaka Suriarachchi commented on AXIS2-2900:
-----------------------------------------------------

this is an schema issue. when we specifiy an union type isn't it requried to set the xsi:type? otherwice we can not determine the type requried.
On the other hand xs:any requried you to give and xml. but here we only have a string.


> 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
>            Assignee: Amila Chinthaka Suriarachchi
>
> 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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org