Skip Menu |

This queue is for tickets about the XML-Compile-SOAP-WSA CPAN distribution.

Report information
The Basics
Id: 62533
Status: resolved
Priority: 0/
Queue: XML-Compile-SOAP-WSA

People
Owner: Nobody in particular
Requestors: aleksey.mashanov [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: wsa:Action
Both versions of WSA support explicit wsa:Action association using wsa09:Action (for 0.9) or wsaw:Action (for 1.0) attribute in input/output elements of operation in wsdl-schema. For 1.0 it is documented here: http://www.w3.org/TR/2006/CR-ws-addr-wsdl-20060529/#explicitaction I wrote some patch to your code. It is rather ugly, you can see it in attachment. Can you add a logic of it into your module, please?
Subject: wsa.patch
--- /home/amashanov/perl5lib/lib/perl5/site_perl/5.8.8/XML/Compile/SOAP/WSA.pm Thu Oct 7 23:41:25 2010 +++ ../../SOAP/WSA.pm Thu Oct 28 23:35:45 2010 @@ -17,6 +17,7 @@ use File::Spec (); use File::Basename qw/dirname/; +use List::Util qw/first/; my @common_hdr_elems = qw/To From Action ReplyTo FaultTo MessageID RelatesTo RetryAfter/; @@ -72,6 +73,17 @@ $self->_load_ns($wsdl, $def->{xsd}); $self->_load_ns($wsdl, '20060512-wsaw.xsd'); + my $wsa_action_ns = $self->version eq '0.9' ? $ns : WSDL11WSAW; + $wsdl->addHook( + type => '{http://schemas.xmlsoap.org/wsdl/}tParam', + after => sub { + my( $xml, $data, $path ) = @_; + my $wsa_action = $xml->getAttributeNS( $wsa_action_ns, 'Action' ); + $data->{wsa_action} = $wsa_action if $wsa_action; + return $data; + }, + ); + # For unknown reason, the FaultDetail header is described everywhere, # except in the schema. $wsdl->importDefinitions( <<_FAULTDETAIL ); @@ -109,8 +121,10 @@ sub soap11ClientWrapper($$@) { my ($self, $op, $call, %args) = @_; + my $op_def = first { $_->{name} eq $op->name } + @{$op->schemas->findDef(portType => $op->portTypeName)->{wsdl_operation}||[]}; my $to = $args{To} || ($op->endPoints)[0]; - my $action = $args{Action} || $op->soapAction; + my $action = $args{Action} || $op_def->{wsdl_input}->{wsa_action} || $op->soapAction; trace "added wsa in call $to for $action"; sub
Subject: Re: [rt.cpan.org #62533] wsa:Action
Date: Fri, 29 Oct 2010 14:13:45 +0200
To: Aleksey Mashanov via RT <bug-XML-Compile-SOAP-WSA [...] rt.cpan.org>
From: Mark Overmeer <mark [...] overmeer.net>
* Aleksey Mashanov via RT (bug-XML-Compile-SOAP-WSA@rt.cpan.org) [101028 21:57]: Show quoted text
> Thu Oct 28 15:57:01 2010: Request 62533 was acted upon. > Transaction: Ticket created by amashanov > Queue: XML-Compile-SOAP-WSA > Subject: wsa:Action > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=62533 > > > Both versions of WSA support explicit wsa:Action association using > wsa09:Action (for 0.9) or wsaw:Action (for 1.0) attribute in > input/output elements of operation in wsdl-schema.
I spend all morning to implement it cleanly... ;-) Now, there is also a $operation->wsaAction('INPUT'|'OUTPUT') method. That is needed because an other module user needs wsa-action based switching in XML::Compile::SOAP::Daemon. A nice coincidence. There will be more changes in the upcoming release... Let's see if I can tackle your async client code. -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
released in 0.12