PHP5 + soap extension + WSDL Mode

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • dex

    PHP5 + soap extension + WSDL Mode

    Hi,

    I'm trying use a webservice with PHP5 soap extension in WSDL mode.
    I generated the php classes using wsdl2php.
    The problem is that 'auth' member of loginRequest (witch is a complex
    type) dosen't get serialized.
    The 'version' member witch is decimal is being serialized and sent to
    the server.
    I am doing something wrong ?


    full source code, including generated php classes at
    Since 2005, we have helped thousands of people get the perfect domain name.



    ------------------------------------------------------------------>source



    code:


    <?
    require_once('./gwservice/GroupwiseServic e.php');


    $classmap = array(
    'Authentication ' => 'Authentication ',
    'PlainText' => 'PlainText',
    'loginRequest' => 'loginRequest',
    );


    $gwservice = new GroupWiseServic e
    (
    "./wsdl/groupwise.wsdl" ,
    array
    (
    "location" => "http://10.100.30.66:71 91/soap",
    "classmap" => $classmap,
    "trace" => true,
    "exceptions " => true
    )
    );


    $pt = new PlainText();
    $pt->username ="user";
    $pt->password ="secret";


    $lr = new loginRequest();
    $lr->auth = $pt;
    $lr->version =1;


    print_r($lr);
    print_r($gwserv ice->loginRequest($ lr));
    print_r($gwserv ice->__getLastReque st());


    ?>


    ------------------------------------------------------------------>response­­:



    php object:
    loginRequest Object
    (
    [auth] => PlainText Object
    (
    [username] => user
    [password] => secret
    )


    [language] =>
    [version] => 1
    [application] =>
    )


    xml request:
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope
    xmlns:SOAP-ENV="http://schemas.xmlsoap .org/soap/envelope/"
    xmlns:ns1="http ://schemas.novell. com/2005/01/GroupWise/methods">
    <SOAP-ENV:Body>
    <ns1:loginReque st><ns1:auth/><ns1:languag e/><ns1:version>1 </ns1:version><ns ­­1:application/></ns1:loginReques t>


    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

Working...