Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SOAP::Lite - Server did not recognize the value of HTTP Header

Status
Not open for further replies.

s34n

Programmer
Jan 3, 2012
1
GB
Hi There,

Im having some problems with SOAP Lite.... when I run my code, I keep getting the following error: "Server did not recognize the value of HTTP Header SOAPAction: namespaceurl"

The service uses Web Service Security and i've checked the namespace URL and it is correct.

I have also mimicked the call in a quick .NET application and used Fiddler2 to see a working SOAP Request... the only different between the two (one working and one not) is tags in the SOAP Header relating to addressing.



This is the code I am using...


#!/usr/bin/perl
use SOAP::Lite 'trace', 'debug';
use SOAP::WSDL;
use strict;
use warnings;



# Service Vars
my $SERVICE_URL = 'my $SERVICE_NAMESPACE = 'my $username = 'username';
my $password = 'password';



my $soap = SOAP::Lite
-> uri($SERVICE_NAMESPACE)
-> on_action( sub {sprintf '%s/%s', @_} )
-> proxy($SERVICE_URL);



my $security=SOAP::Header->name("wsse:Security")->
attr({'soap:mustUnderstand'=>1,'xmlns:wsse'=>'my $userToken =SOAP::Header->name("wsse:UsernameToken" =>
\SOAP::Header->value(
SOAP::Header->name('wsse:Username')->value($username)->type(''),
SOAP::Header->name('wsse:password')->value($password)->type('')->attr({'Type'=>' )->attr({'xmlns:wsu'=>'


my $response = $soap
-> VersionInfo($security->value(\$userToken),SOAP::Data->name('IncludeVersionHistory')->value('true')->type(''));




This is the WSDL (If you need to double check the namespace is correct)...


Is there anything obvious I have missed?



If it helps, this is the SOAP Request which is generated by the script

<soap:Envelope xmlns:xsi=" xmlns:soapenc=" xmlns:xsd=" soap:encodingStyle=" xmlns:soap=" xmlns:wsse=" soap:mustUnderstand="1"><wsse:UsernameToken xmlns:wsu=" Type=" xmlns="SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal Server Error


Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top