Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

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

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

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

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...

use SOAP::Lite 'trace', 'debug';
use strict;
use warnings;

# Service Vars
my $SERVICE_URL = 'https://webservice.s4.exacttarget.com/Service.asmx';
my $SERVICE_NAMESPACE = 'http://exacttarget.com/wsdl/partnerAPI';
my $username = 'username';
my $password = 'password';

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

my $security=SOAP::Header->name("wsse:Security")->
my $userToken =SOAP::Header->name("wsse:UsernameToken" =>

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)... https://webservice.s4.exacttarget.com/etframework.wsdl

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="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" soap:mustUnderstand="1"><wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><wsse:Username>password</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">password</wsse:Password></wsse:UsernameToken></wsse:Security></soap:Header><soap:Body><VersionInfoRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI"><IncludeVersionHistory>true</IncludeVersionHistory></VersionInfoRequestMsg></soap:Body></soap:Envelope>
SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal Server Error


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close