[Xml-compile] error: sending operation requires procedure name with RPC

Tapio.Niva at tieto.com Tapio.Niva at tieto.com
Mon Sep 20 09:02:47 GMT 2010


Hello,
I had previously a namespace problem with wsdl containing rpc style.
MarkOv suggested the following change to lib/XML/Compile/SOAP11/Operation.pm :

Original code :
   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;
    }

Changed code :
    if($style eq 'rpc')
    {   my $ns = $body->{namespace} || '';
        $procedure = pack_type $ns, $opname;
    }

, which worked very well - but lead in our case to next problem :
"error: sending operation requires procedure name with RPC  at /usr/lib/perl5/site_perl/5.8.8/XML/Compile/SOAP.pm line 112"

I assumed that this also could be not-so-critical error and skipped it via a small change to /usr/lib/perl5/site_perl/5.8.8/XML/Compile/SOAP.pm rows 111-117:

Original code :
...
    elsif($style eq 'rpc')
    {   my $procedure = $args{body}{procedure}
         or error __x"sending operation requires procedure name with RPC";
        push @$hooks, $self->_writer_rpc_hook('SOAP-ENV:Body'
          , $procedure, $body, $faults);
    }
Changed code :
...
    elsif($style eq 'rpc')
    {   my $procedure = $args{body}{procedure} || '';                   ## locally added
      ##      or error __x"sending operation requires procedure name with RPC";         ## locally skipped error message
        push @$hooks, $self->_writer_rpc_hook('SOAP-ENV:Body'
          , $procedure, $body, $faults);
    }

After these changes, my WS-EVENTING test using XML::Compile gave good results !

QUESTIONS:
Do you see any risk on these changes - are the changes dangerous to the other module logic ?
Are the above changed rpc-style tests only to make sure that the wsdl is following the standard specs ?

BR, Tapio

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/xml-compile/attachments/20100920/f901627f/attachment.htm


More information about the Xml-compile mailing list