-
1. Re: MTOM/XOP support
heiko.braun May 22, 2006 6:44 AM (in response to heiko.braun)Heiko Braun wrote:
> Hi Alexey,
>
> after a discussion with thomas, we decided that only the declared type
> 'xmlmime:base64Binary' should be optimized, instead of all
> xsd:base64binaries:
>
> <xs:schema targetNamespace="http://www.w3.org/2005/05/xmlmime">
>
> <xs:attribute name="contentType">
> <xs:simpleType>
> <xs:restriction base="xs:string">
> <xs:minLength value="3"/>
> </xs:restriction>
> </xs:simpleType>
> </xs:attribute>
>
> <xs:attribute name="expectedContentTypes" type="xs:string"/>
>
> <xs:complexType name="base64Binary">
> <xs:simpleContent>
> <xs:extension base="xs:base64Binary">
> <xs:attribute ref="xmime:contentType"/>
> </xs:extension>
> </xs:simpleContent>
> </xs:complexType>
>
> </xs:schema>
>
> It seems that we are not able to read the content-type attribute from
> our current schema model, therefore we do simple content-type guessing
> based on the java type. The jbossws.utils.MimeUtils class contains
> examples for that.
>
> Anyway i think your marshaller/unmarshaller implementations do not
> need to deal with it, as the implementaiton actually comes from
> jbossws, right?
>
> I saw that you factored the interface to XOPMarshaller/Unmarshaller. I
> will move our implementation to that interface as well and drop the
> initial abstractions from javax.xml.*
>
> /Heiko -
2. Re: MTOM/XOP support
heiko.braun May 22, 2006 6:45 AM (in response to heiko.braun)Alex wrote:
thanks for the info. I've already started work on any derivation of xs:base64Binary though.
The reason for adding XOPMarshaller was purely build system related.
Otherwise there would be cyclic module dependecies, i.e. between common and j2ee. -
3. Re: MTOM/XOP support
heiko.braun May 22, 2006 6:47 AM (in response to heiko.braun)You can name it as you like as long as the concept stays the same.
BTW, should we moveisXopOptimizable(TypeBinding type)
to the interface as well? This way the implementation (jbossws in this case) could decide which declared types can be optimized. Actually we do that upfront already anyway ... -
4. Re: MTOM/XOP support
aloubyansky May 22, 2006 7:08 AM (in response to heiko.braun)Maybe. So far it's internal impl details that may change. I would like to finish the basic support for this first.
-
5. Re: MTOM/XOP support
aloubyansky May 24, 2006 10:03 AM (in response to heiko.braun)Here is what I currently have http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossXB_XOP
Also see org.jboss.test.xml.XOPUnitTestCase.
Let me know what is missing and the priorities. -
6. Re: MTOM/XOP support
aloubyansky May 24, 2006 4:59 PM (in response to heiko.braun)I realized it's too soon for the WS team to be happy about this. XOP marshalling is supported by the SchemaBinding-based marshaller, not the XercesXsMarshaller which is currently used by the JBossWS.
I don't want to spend time on XercesXsMarshaller now. Switching to the SchemaBinding-based marshaller has been planned for a long time now
http://jira.jboss.com/jira/browse/JBWS-673
It's time to finally make this step. -
7. Re: MTOM/XOP support
heiko.braun Jun 29, 2006 8:05 AM (in response to heiko.braun)in order to get rid of the XB dependencies towards JAF & Mail i suggets we factor out the DataHandler from the XOP interfaces and use an equivalent class that's suffiecient to our needs:
I.e:public interface XOPMarshaller { boolean isXOPPackage(); String addMtomAttachment(XOPObject obj, String elementNamespace, String elementName); String addMtomAttachment(byte[] data, String elementNamespace, String elementName); }
public class XOPObject { private Object content; private String contentType; public XOPObject(Object content) { this.content = content; } public Object getContent() { return content; } public String getContentType() { return contentType; } public void setContentType(String contentType) { this.contentType = contentType; } }