[Xml-compile] XML::Compile fails on rpc operation : namespace
required
Mark Overmeer
mark at overmeer.net
Mon Aug 23 19:33:12 GMT 2010
* Tapio.Niva at tieto.com (Tapio.Niva at tieto.com) [100823 11:01]:
> trying to compile a vendor’s subscribe.wsdl with XML::Compile
> (test_XML_Compile.pl) gives following error (test_XML_Compile.log) for which
> I did not find a reason (I’m afraid my poor knowledge may be the main reason
> here…) :
First this:
trace: parsing XML from file ws-addr.xsd
Are you aware of XML::Compile::SOAP::WSA? It's a recent addition.
error: rpc operation
{http://notification.sdk.nms.ov.hp.com/nms-sdk-notify}IncidentNotificationMsg
requires namespace attribute
The error states what "I" think is wrong. The spec says that the rpc
operation definitions in the WSDL requires a namespace="..." attribute.
It complains in lib/XML/Compile/SOAP11/Operation.pm
if($style eq 'rpc')
{ exists $body->{namespace}
or error __x"rpc operation {name} requires namespace attribute"
, name => $msgname;
my $ns = $body->{namespace};
$procedure = pack_type $ns, $opname;
}
You could try to change this in
if($style eq 'rpc')
{ my $ns = $body->{namespace} || '';
$procedure = pack_type $ns, $opname;
}
and see wether the produces messages are accepted with your server...
When it works, it will be a difficult decission: it this a common problem
with the spec? In that case the change may be useful. Otherwise, I may
add an option or change it into a warning.
--
Regards,
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