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 Thilina Gunarathne <cs...@gmail.com> on 2006/09/23 15:35:30 UTC

[Axis2] Simple Content Type extension

Hi devs,
I feel that the JIRA http://issues.apache.org/jira/browse/AXIS2-1221
is due to a problem with the way we handle the Simple Content Type
Extension..

Can somebody with a better idea on Simple Content Type Extension shed
some light on this issue...

Schema :
<xsd:element name="image-attachment">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:base64Binary">
<xsd:attribute ref="xmime:contentType" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>

Axis2 Generated Message:
<ns1:image-attachment>
                  <ns1:base64Binary
xmlns:ns1="http://www.w3.org/2001/XMLSchema">.....Some Base64
characters or XOP:include.........</ns1:base64Binary>
</ns1:image-attachment>

Thanks,
Thilina
-- 
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: [Axis2] Simple Content Type extension

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
On Sat, 2006-09-23 at 19:05 +0530, Thilina Gunarathne wrote:
> Hi devs,
> I feel that the JIRA http://issues.apache.org/jira/browse/AXIS2-1221
> is due to a problem with the way we handle the Simple Content Type
> Extension..
> 
> Can somebody with a better idea on Simple Content Type Extension shed
> some light on this issue...
> 
> Schema :
> <xsd:element name="image-attachment">
> <xsd:complexType>
> <xsd:simpleContent>
> <xsd:extension base="xsd:base64Binary">
> <xsd:attribute ref="xmime:contentType" />
> </xsd:extension>
> </xsd:simpleContent>
> </xsd:complexType>
> </xsd:element>
> 
> Axis2 Generated Message:
> <ns1:image-attachment>
>                   <ns1:base64Binary
> xmlns:ns1="http://www.w3.org/2001/XMLSchema">.....Some Base64
> characters or XOP:include.........</ns1:base64Binary>
> </ns1:image-attachment>

This generated message is wrong. It should be:

<ns1:image-attachment xmlns:xmime=... xmime:contentType="mime-type">
.. some base 65 characters or xop:include ..
</ns1:image-attachment>

What simple content extension is doing is adding something to the simple
content of an element - that means the element has no children; just
text. In particular, xsd:based64Binary is *type* and there's no element
with that name at all.

Sanjiva.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org