Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

xmlmime - include content type  RSS feed

 
AnilPrakash Raju
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Not sure if i am posting in the right forum. Sorry if i am posting in the wrong forum.

for my webservices i was thinking of putting the content type in my schema to show to the user what foramt the result is received, but i am getting some errors.

<schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
elementFormDefault="unqualified" attributeFormDefault="unqualified"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
jaxb:extensionBindingPrefixes="xjc"
jaxb:version="1.0"
targetNamespace="http://www.test.com/test/ws/schemas/core">

<xsd:import namespace="http://www.w3.org/2005/05/xmlmime"
schemaLocation="http://www.w3.org/2005/05/xmlmime"/>

<xsd:element name="MyBinaryData" xmime:expectedContentTypes='image/jpeg' >
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:base64Binary" >
<xsd:attribute ref="xmime:contentType" use="required"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>

</schema>

i am getting the following errors when i try to build it:

Cannot resolve the name 'xmime:contentType' to a(n) 'attribute declaration' component.

The content of '#AnonType_MyBinaryData' is invalid. Element 'attribute' is invalid, misplaced, or occurs too often.

Any suggestions would be greatly appreciated

thanks in advance

Anil
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!