I am no expert at WSDL files, But if you view your WSDL file in a
browser (https://www.agemni.com/_snet/AgemniLogin.asmx?WSDL) and then
view the actual source of the page.
At the top of the page is this:
<s:element name="agLogin">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="dn"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="username"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="password"
type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
Complex types usually mean Object, so I think your function is
expecting an object with that information so try this instead ...
$agLogURL = "https://www.agemni.com/_snet/AgemniLogin.asmx?WSDL";
$myLogin->dn = "myDN";
$myLogin->username = "myUserName";
$myLogin->password = "myPassword";
$login = new SoapClient($agLogURL);
$results = $login->aglogin($myLogin);
Jonathan
$agUserName = "myUserName";
$agPass = "myPassword";
$login = new SoapClient($agLogURL);
$login->aglogin($agDN, $agUserName, $agPass);
On Dec 29, 2010, at 10:35 AM, newcoder wrote:
ok, changed my code to:
$agLogURL = "https://www.agemni.com/_snet/AgemniLogin.asmx?
WSDL";
$agDN = "myDN";
$agUserName = "myUserName";
$agPass = "myPassword";
$login = new SoapClient($agLogURL);
$login->aglogin($agDN, $agUserName, $agPass);
Here's what I get now as an error:
Fatal error: Uncaught SoapFault exception: [soap:Server]
System.Web.Services.Protocols.SoapException: Server was unable to
process
request. ---> System.NullReferenceException: Object reference not
set to an
instance of an object. at AgemniLogin.agLogin(String dn, String
username,
String password) --- End of inner exception stack trace --- in
C:\XAMPP\xampp\htdocs\agsync\syncwork.php:16 Stack trace: #0 [internal
function]: SoapClient->__call('aglogin', Array) #1
C:\XAMPP\xampp\htdocs\agsync\syncwork.php(16): SoapClient-
>aglogin('myDN',
'myUserName', 'myPassWord') #2 {main} thrown in
C:\XAMPP\xampp\htdocs\agsync\syncwork.php on line 16
--
View this message in context: http://old.nabble.com/Need-help-figuring-out-what-I%27m-doing-wrong-accessing-this-Web-Service-tp30552173p30552332.html
Sent from the Php - Soap mailing list archive at Nabble.com.
--
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php