WSO2Con 2013 CFP Banner

WSO2::WSF and soapAction http header

dil.pun's picture
Hi, Just installed http://search.cpan.org/~chintana/WSO2-WSF-Perl-1.1/ and the required WSO2 WSF/C. And I have this consumer.pl: ---8<--- my $payload = ' <hi> <name>Foo</name> </hi> '; my $client = new WSO2::WSF::WSClient( { 'useSOAP' => '1.1', 'to' => 'http://..../cgi-bin/server.pl', 'wsfc_home' => '/home/dilpun/ext_programs/wso2-wsf-c', } ); my $response = $client->request( new WSO2::WSF::WSMessage( { 'payload' => $payload, 'action' => 'http://.../cgi-bin/action.pl', } ) ); print $response->{str}; --->8--- In axis2.xml, I am using "axis2_http_sender" as "transportSender". When I run the consumer.pl and inspect http headers received by server.pl on the server end, I can see that the value of SOAPAction http header is an empty string. I assumed (wrongly?) that the 'action' param in W::W::WSMessage would get reflected in SOAPAction http header. Is there a way set the SOAPAction http header? Any help would be awesome! And thanks for the Perl support of WSO2! Rgds, Dil
chintana's picture

Dil, thanks for raising this

Dil, thanks for raising this issue. It's a gross mistake on my part. I've used a wrong function to set the SOAPAction field. I fixed it on the trunk. Could you please try an svn checkout? It's here - http://svn.wso2.org/repos/wso2/trunk/wsf/perl