Loading ...
Sorry, an error occurred while loading the content.

Namespace in binding's soap:body ignored?

Expand Messages
  • hlgr_d
    Hi, I have explictly specified a namespace in the definitions/binding/operation/input/soap:body element. When calling the service via Python s SOAPpy or
    Message 1 of 1 , Dec 9, 2004
    • 0 Attachment
      Hi,

      I have explictly specified a namespace in the
      definitions/binding/operation/input/soap:body element.

      When calling the service via Python's SOAPpy or Apache's axis Java
      module all is fine. With SOAP::WSDL however the namespace declaration
      is ignored and a wrong namespace is used.
      Is this by design or omission?

      ATM I do something along this line:
      ,----
      | diff -u /home/holgerd/dist/lib/perl5/site_perl/5.8.0/SOAP/WSDL.pm
      /home/holgerd/.cpan/build/SOAP-WSDL-1.20/WSDL.pm
      | --- /home/holgerd/dist/lib/perl5/site_perl/5.8.0/SOAP/WSDL.pm
      2004-12-08 17:06:21.000000000 +0000
      | +++ /home/holgerd/.cpan/build/SOAP-WSDL-1.20/WSDL.pm 2004-12-08
      15:19:53.000000000 +0000
      | @@ -172,18 +172,8 @@
      | }
      |
      | ### TBD: encode method (fully qualified)
      | - $path='/' . $self->_wsdl_wsdlns . 'definitions/'
      | - . $self->_wsdl_wsdlns . "binding/"
      | - . $self->_wsdl_wsdlns . "operation[\@name='$method']/"
      | - . $self->_wsdl_wsdlns . 'input/'
      | - .
      $self->_wsdl_ns->{'http://schemas.xmlsoap.org/wsdl/soap/'}."body/\@namespace";
      | - my $methodns=$self->{_WSDL}->{ caching } ? $self->{_WSDL}->{ cache
      }->{ $path } : undef;
      | - unless ($methodns) {
      | - $methodns = $xpath->find($path);
      | - $self->{_WSDL}->{ cache }->{ $path }= $methodns if
      ($self->{_WSDL}->{ caching });
      | - }
      | - my $methodEncoded=SOAP::Data->name( "ns1:".$method )->attr( {
      'xmlns:tns' => $self->_wsdl_tns_uri,
      | -
      'xmlns:ns1' => $methodns } );
      | + my $methodEncoded=SOAP::Data->name( $method )->attr( { xmlns =>
      $self->_wsdl_tns_uri } );
      | +
      | unless ($self->{_WSDL}->{no_dispatch}) {
      | return $self->SUPER::call($methodEncoded => @param);
      | } else {
      `----

      This should of course in real life check that there is such a
      namespace attribute and handle its lack gracefully. Also, the path
      currently does not specify which binding element to use (I only have
      one, so it works for me).

      Any ideas on this?

      Holger
    Your message has been successfully submitted and would be delivered to recipients shortly.