Search the web
Sign In
New User? Sign Up
soaplite · SOAP::Lite for Perl (soaplite.com)
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Over-riding the SOAPAction   Message List  
Reply | Forward Message #6154 of 6387 |
Re: [soaplite] Over-riding the SOAPAction

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.



Fri May 9, 2008 6:13 pm

tpinkl
Offline Offline
Send Email Send Email

Forward
Message #6154 of 6387 |
Expand Messages Author Sort by Date

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...
keith_unite
Offline Send Email
May 8, 2008
2:43 pm

... I do it this way: my $soap = new SOAP::Lite; ... $soap->on_action( \&custom_action ); ... sub custom_action { my ($uri,$method) = @_; return $uri . '/' ....
Thomas J Pinkl
tpinkl
Offline Send Email
May 9, 2008
6:13 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help