Hello, so im pretty new to SOAP in Perl, im trying to call to a smartermail server to add a user, just for testing purposes, heres the code I have so far
#!c:/perl/bin use SOAP::WSDL; use strict; use warnings; my %data = ( 'AuthUserName' => 'xxxxxx@testdomain.com', 'AuthPassword' => 'xxxxxxx', 'NewUsername' => 'johndoe', 'NewPassword' => 'test', 'DomainName' => 'testdomain.com', 'FirstName' => 'john', 'LastName' => 'doe', 'IsDomainAdmin' => 0 ); my $soap = SOAP::WSDL->new( wsdl => 'http://xxxxxxxxxxxxxx.com/services/svcUserAdmin.asmx?WSDL +', ); my $result = $soap->call('AddUser', %data); print $result;
Ive been looking through smartermails PDF doc on automating the web services, I know the PW/UN im using is right, but its still not returning anything at all, or adding the user. http://www.smartertools.com/downloads/documents/smartermail/SmarterMail6x_Automation_with_WebServices.pdf Anyone here use soap::wsdl that can see any obvious errors in my above code? I printed result out with data dumper, this is what it returns..

'detail' => '', 'faultcode' => 'soap:Client', 'faultstring' => 'System.Web.Services.Protocols.SoapException: Se rver was unable to read request. ---> System.InvalidOperationException: There is an error in XML document (1 , 205). ---> System.FormatException: The string \'\' is not a valid Boolean value. at System.Xml.XmlConvert.ToBoolean(String s) at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read21_AddUser() at Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectSerializer.Deserialize(XmlSerializationRead er reader) at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeser ializationEvents events) --- End of inner exception stack trace --- at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeser ializationEvents events) at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle) at System.Web.Services.Protocols.SoapServerProtocol.ReadParameters() --- End of inner exception stack trace --- at System.Web.Services.Protocols.SoapServerProtocol.ReadParameters() at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()' }, '{http://schemas.xmlsoap.org/soap/envelope/}Fault',


In reply to SOAP::WSDL Module by jhyland87

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.