Charles Galpin - 2005-01-25


I have a soap service I am trying to use, that requires logging in first. The only documentation they have is an example of doing it using .NET with some sort of code generator that takes the WSDL and creates the classes. Honestly its not being much help.

I'm trying to figure out what exactly I need to pass to the login call to get it to work for the following WSDL.

I believe it needs a ip,login and password per this snippet

    <xs:element name="login">
            <xs:documentation>Logs user in. Returns "ticket" or Error.</xs:documentation>
                <xs:element name="ip" type="vzat:ip_type" minOccurs="0"/>
                <xs:element name="user" type="xs:string" minOccurs="0"/>
                <xs:element name="password" type="xs:base64Binary" minOccurs="0"/>

But when I run my test, it doesn't pass them through


$parameters = array( 'ip' => '',
                            'user' => 'usr',
                            'password' => 'pass');
$soapclient = new soapclient('', 'wsdl');
$result = $soapclient->call('login',$parameters);
// print debug


POST https://localhost:4646 HTTP/1.0
Host: localhost:4646
User-Agent: NuSOAP/0.6.8 (1.83)
Content-Type: text/xml; charset=ISO-8859-1
SOAPAction: ""
Content-Length: 471

<?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="" xmlns:xsd="" xmlns:xsi="" xmlns:SOAP-ENC="" xmlns:si="" xmlns:ns9848=""><SOAP-ENV:Body><login xmlns=""/></SOAP-ENV:Body></SOAP-ENV:Envelope>


HTTP/1.1 500 - Internal Server Error
Date: Tue, 25 Jan 2005 03:52:08 GMT
Server: Apache/2.0.46 (Red Hat)
Content-Length: 805
Connection: close
Content-Type: text/xml; charset=utf-8

<soap:Envelope xmlns:soap="" xmlns:xsd="" xmlns:xsi="">
<packet_header xmlns="" time="2005-01-25T03:52:08+0000" priority="0" version="3.0.0">

<faultstring>VZAgent responded with error</faultstring>

<message>Invalid packet: IP or username is absent.</message>

Any and all help appreciated.