Search in sources :

Example 1 with MimeAttribute

use of org.apache.cxf.databinding.source.mime.MimeAttribute in project cxf by apache.

the class ReflectionServiceFactoryBean method addMimeType.

private void addMimeType(final XmlSchemaElement element, final Annotation[] annotations) {
    if (annotations != null) {
        for (Annotation annotation : annotations) {
            if (annotation instanceof XmlMimeType) {
                MimeAttribute attr = new MimeAttribute();
                attr.setValue(((XmlMimeType) annotation).value());
                element.addMetaInfo(MimeAttribute.MIME_QNAME, attr);
            }
        }
    }
}
Also used : MimeAttribute(org.apache.cxf.databinding.source.mime.MimeAttribute) XmlMimeType(javax.xml.bind.annotation.XmlMimeType) Annotation(java.lang.annotation.Annotation)

Aggregations

Annotation (java.lang.annotation.Annotation)1 XmlMimeType (javax.xml.bind.annotation.XmlMimeType)1 MimeAttribute (org.apache.cxf.databinding.source.mime.MimeAttribute)1