[prev in list] [next in list] [prev in thread] [next in thread]
List: kandula-dev
Subject: [jira] [Commented] (AXIS2-6053) cvc-complex-type.3.2.2: Attribute 'contentType' is not allowed to ap
From: "Ralf Hauser (Jira)" <jira () apache ! org>
Date: 2023-01-24 13:55:00
Message-ID: JIRA.13520916.1674370381000.5690.1674568500039 () Atlassian ! JIRA
[Download RAW message or body]
[ https://issues.apache.org/jira/browse/AXIS2-6053?page=com.atlassian.jira.plugin. \
system.issuetabpanels:comment-tabpanel&focusedCommentId=17680223#comment-17680223 ]
Ralf Hauser commented on AXIS2-6053:
------------------------------------
By adding in the java
{noformat}
if (localContentType != null) {
String namespaceXmlMime = "http://www.w3.org/2005/05/xmlmime";
java.lang.String namespacePrefix =
registerPrefix(xmlWriter, namespaceXmlMime);
if ((namespacePrefix != null) && (namespacePrefix.trim().length() > \
0)) { writeAttribute(
namespacePrefix,
namespaceXmlMime,
"contentType", localContentType.toString(),
xmlWriter);
} else {
writeAttribute("", "contentType", \
localContentType.toString(), xmlWriter); }
}{noformat}
it seems to work, although not very efficient as for each instance of have an s4, s5, \
s...
<attachmentRef>
<fileRefs xmlns:s4="http://www.w3.org/2005/05/xmlmime" \
s4:contentType="application/pdf" filename="minimum-sig-16.pdf" \
hash="605b461...
<fileRefs xmlns:s5="http://www.w3.org/2005/05/xmlmime" \
s5:contentType="application/pdf" filename="324bytes.pdf" hash="0ce02a0456747...
...
> cvc-complex-type.3.2.2: Attribute 'contentType' is not allowed to appear in element \
> ...
> ---------------------------------------------------------------------------------------
>
> Key: AXIS2-6053
> URL: https://issues.apache.org/jira/browse/AXIS2-6053
> Project: Axis2
> Issue Type: Improvement
> Affects Versions: 1.8.2
> Reporter: Ralf Hauser
> Priority: Major
>
> when upgrading from 2.1.78 to 2.182 the following line from my xsd unexpectedly \
> caused the problem
> <xs:attribute ref="xmime:contentType" use="required"/>
>
> where
> xmlns:xmime="http://www.w3.org/2005/05/xmlmime" version="1.0"
>
> Copying it over solved the problem.
>
> ==> But it would be way better if the "cvc-complex-type.3.2.2" error would give a \
> hint that the "ref=" is no longer supported.
> [https://stackoverflow.com/questions/17422175/whats-the-difference-between-ref-and-type-in-an-xml-schema]
>
> https://stackoverflow.com/questions/1448888/what-does-the-ref-attribute-on-an-element-in-an-xsd-do
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic