[Xml-compile] XOP with XML::Compile::WSDL11
Mark Overmeer
mark at overmeer.net
Tue Oct 18 08:50:37 GMT 2016
Hi Kit,
(Of course) I rarely look at the XOP code.
* Kit Peters (Kit.Peters at 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
Mark at Overmeer.net solutions at overmeer.net
http://Mark.Overmeer.net http://solutions.overmeer.net
More information about the Xml-compile
mailing list