Charles Galpin - 2005-01-25

Hi

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.

http://www.sw-soft.com/webservices/vza/3.0.0/VZA.wsdl

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

    <xs:element name="login">
        <xs:annotation>
            <xs:documentation>Logs user in. Returns "ticket" or Error.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <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"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

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

require_once('nusoap.php');

$parameters = array( 'ip' => '1.2.3.4',
                            'user' => 'usr',
                            'password' => 'pass');
           
$soapclient = new soapclient('http://www.sw-soft.com/webservices/vza/3.0.0/VZA.wsdl', 'wsdl');
$soapclient->setHTTPProxy('5.6.7.8',4646);
$result = $soapclient->call('login',$parameters);
// print debug

Request:

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="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:si="http://soapinterop.org/xsd" xmlns:ns9848="http://tempuri.org"><SOAP-ENV:Body><login xmlns="http://www.sw-soft.com/webservices/vza/3.0.0/ticketm"/></SOAP-ENV:Body></SOAP-ENV:Envelope>

Response:

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="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Header>
<packet_header xmlns="http://www.sw-soft.com/webservices/vza/3.0.0/protocol" time="2005-01-25T03:52:08+0000" priority="0" version="3.0.0">
<origin>ticketm</origin>
<session></session>
<target>vzclient865</target>
<dst>
<director>servd</director>
</dst>

<cookie>login</cookie>
<src>
<director>servd</director>
</src>
</packet_header>
</soap:Header>
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>VZAgent responded with error</faultstring>
<detail>
<error>
<code>400</code>

<message>Invalid packet: IP or username is absent.</message>
</error>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>

Any and all help appreciated.

thanks
charles