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

How to map an incoming namespace to a different perl module?

Expand Messages
  • tomtamboers
    My server has to adhere to a specific interface for SOAP requests (as defined in a common WSDL interface file), in which the namespace has been standardized.
    Message 1 of 1 , Nov 19, 2003
    • 0 Attachment
      My server has to adhere to a specific interface for SOAP requests (as
      defined in a common WSDL interface file), in which the namespace has
      been standardized. As it stands, the method GetInfo() is called in
      the 'http://www.openuri.org/' namespace.

      Incoming XML therefore looks like:

      <SOAP-ENV:Envelope
      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <SOAP-ENV:Body>
      <m:GetInfo xmlns:m="http://www.openuri.org/"/>
      </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>


      I'd like to dispatch this to a specific module in my 'soap.cgi'
      server, which is set up as:


      #!/usr/local/bin/perl -w

      use SOAP::Transport::HTTP;
      my $server = new SOAP::Transport::HTTP::CGI;
      $server
      -> dispatch_to('/data/soap/soapmodules_dvl', 'AMWSOAP')
      -> handle;


      But running it from a (non-perl) client gives the error:


      Denied access to method (GetInfo) in class (main) at
      /usr/local/lib/perl5/site_perl/5.6.1/SOAP/Lite.pm line 2128.


      Is there a possibility to map the incoming
      namespace 'http://www.openuri.org/' to the module name 'AMWSOAP'?
      I'll be creating a different soap.cgi server for each corresponding
      service. I know I can map the outgoing response types to any
      namespace using

      $server->serializer->maptype( { Result
      => 'http://www.openuri.org/' } );

      so sending the results back shouldn't be a problem...


      Any help greatly appreciated!

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