Hi ... you're doing this the wrong way. You appear to be attempting to write a schema for what XOP packaging of an optimizable envelope looks like. That's wrong - all you need to do is to have some optimizable content (base64 typed field as Dims said) then MTOM and XOP will take over and replace that on the wire with something similar to what you wrote.
Sanjiva. On Fri, 2006-01-13 at 01:36 +0100, Bram Biesbrouck wrote: > Hi all, > > I'm struggling with this for a few days now, and can't seem to find a > solution. Please help me out. > How do I design a schema in my wsdl file that uses mtom/xop to transfer a > (large) file to my webservice? My latest schema looks like this: > > <types> > <schema targetNamespace="http://ws.bpower2.com/screenkast/xsd" > xmlns="http://www.w3.org/2001/XMLSchema" > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" > xmlns:xmlmime="http://www.w3.org/2004/11/xmlmime" > xmlns:xop="http://www.w3.org/2004/08/xop/include" > elementFormDefault="unqualified" > attributeFormDefault="unqualified"> > > <import > namespace="http://www.w3.org/2004/08/xop/include"/> > <import namespace="http://www.w3.org/2004/11/xmlmime"/> > <import > namespace="http://www.w3.org/2003/05/soap-encoding"/> > > <element name="recordingRequest"> > <complexType> > <sequence> > <element ref="xop:Include" > minOccurs="1" maxOccurs="1" > nillable="false"/> > </sequence> > <attribute ref="xmlmime:contentType" > use="optional"/> > </complexType> > </element> > > <element name="recordingResponse"> > <complexType> > <sequence> > <element name="errorCode" > type="xsd:int"/> > </sequence> > </complexType> > </element> > > </schema> > </types> > > I get NullpointerExceptions though (axis2-0.94). > > My experience so far with binary embedded data is troublesome. I never seem > to > get it right. Call me a quitter, but I'm seriously thinking about switching > to Web-Service-controlled FTP-uploads to do the same trick. > What are your experiences with attachments? > > regards, > > Bram
