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

Re: [soaplite] Over-riding the SOAPAction

Expand Messages
  • Thomas J Pinkl
    ... I do it this way: my $soap = new SOAP::Lite; ... $soap- on_action( &custom_action ); ... sub custom_action { my ($uri,$method) = @_; return $uri . / .
    Message 1 of 2 , May 9, 2008
      On Thu, May 08, 2008 at 01:58:08PM -0000, keith_unite wrote:
      > Hi,
      > I need to use SOAP to access data from a SOAP server which uses WSDL
      > over HTTP.
      > My problem is that I need to change the SOAPAction that is sent with
      > the http request.
      > I've tried changing this using:
      > use SOAP::Lite on_action => sub{ die "killed: use"; };
      > and
      > my $s = SOAP::Lite->on_action( sub { die "killed: call" });
      > (as you can imagine the 'die' calls are just for testing) but neither
      > are called when the action is being generated.
      > By adding warnings to the code I can see that on_action is being
      > called twice (for the two redefinitions) but neither affected the
      > SOAPAction that is sent.
      > I suspect I need to subclass the SOAP::Transport::HTTP to override it
      > there but can't even get that to work!!
      > If anyone has some thoughts or examples where they managed to get this
      > working it would save me a great deal of hair loss as I'm tearing my
      > hair out trying to get this to work.

      I do it this way:

      my $soap = new SOAP::Lite;
      $soap->on_action( \&custom_action );

      sub custom_action {
      my ($uri,$method) = @_;
      return $uri . '/' . $method;

      Thomas J. Pinkl | T: 215-442-9300
      Senior Systems Architect | 800-444-1427
      Health Business Systems Inc. | F: 215-442-7555
      An SXC Company |
      738 Louis Drive | http://www.hbsrx.com/
      Warminster, PA 18974 | http://www.sxc.com/

      This communication, including any attachments, may contain information that is confidential and may be privileged and exempt from disclosure under applicable law. It is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are hereby notified that any use, disclosure, dissemination, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender. Thank you for your cooperation.
    Your message has been successfully submitted and would be delivered to recipients shortly.