I’m sorry – I read your response again and changed ‘type’ to ‘extends’ in the return hash in XML::Compile::SOAP (in _writer_xop_hook, for those of you playing along at home). That generated what appears to be good MTOM. Thanks!
Now, the next question: is that going to be changed in the XML::Compile::SOAP distro, or do I need to do some sort of jiggery pokery on my end? KP -- Kit Peters Doer of Things, ATS Integrations D: +1 949 793 8208 M: +1 816 200 0279 On 10/18/16, 09:35, "Kit Peters" <kit.pet...@broadbean.com> wrote: Changing “type => ‘text/xml’” to “extends => ‘text/xml’” in my code did not change things. Or did you mean for me to change it somewhere else? Definition of nsm:StreamBody from https://msdn.microsoft.com/en-us/library/dd960971(v=office.12).aspx (note that the WSDL defines the “nsm” namespace to mean “http://schemas.microsoft.com/Message”) is: <xs:schema xmlns:tns="http://schemas.microsoft.com/Message" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/Message" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:simpleType name="StreamBody"> <xs:restriction base="xs:base64Binary" /> </xs:simpleType> </xs:schema> That would indicate that the Document is being base64 encoded because the schema is telling it to, right? KP -- Kit Peters Doer of Things, ATS Integrations D: +1 949 793 8208 M: +1 816 200 0279 On 10/18/16, 03:50, "Mark Overmeer" <m...@overmeer.net> wrote: Hi Kit, (Of course) I rarely look at the XOP code. * Kit Peters (kit.pet...@broadbean.com) [161017 23:27]: > <xsd:element name="submitLargeDocument"> > <xsd:complexType> > <xsd:sequence> > <xsd:element maxOccurs="1" minOccurs="1" name="Document" nillable="true" type="nsm:StreamBody" nsxmlmime:expectedContentTypes="application/octet-stream"/> > </xsd:sequence> > </xsd:complexType> > </xsd:element> In the code (so probably also in the specs), the elements which get to XOP need a type based on xsd:base64Binary. See XML::Compile::SOAP sub _writer_xop_hook($) { my ($self, $xop_objects) = @_; my $collect_objects = sub { my ($doc, $val, $path, $tag, $r) = @_; return $r->($doc, $val) unless UNIVERSAL::isa($val, 'XML::Compile::XOP::Include'); my $node = $val->xmlNode($doc, $path, $tag); push @$xop_objects, $val; $node; }; +{ type => 'xsd:base64Binary', replace => $collect_objects }; } The returned hash is a hook, which wraps the processing of all elements with type 'base64Binary'. - can you tell me the type 'nsm:StreamBody' - could you try to use the module changing 'type =>' into 'extends =>' in the returned hash? -- Success, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions m...@overmeer.net soluti...@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net _______________________________________________ Xml-compile mailing list Xml-compile@lists.scsys.co.uk http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/xml-compile _______________________________________________ Xml-compile mailing list Xml-compile@lists.scsys.co.uk http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/xml-compile