PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Web Services » SOAP » Bug #5904

WSDL loading in client and params order

Details

Submitted2005-11-09 14:20 UTC
Fromiconeb at yahoo dot it
StatusNo Feedback
PackageSOAP
PHP VersionIrrelevant
OSLinux
Roadmaps(Not assigned)

Comments

[2005-11-09 14:20 UTC] iconeb at yahoo dot it

Description:
------------
I have two different behaviours when calling a soapclient, both wrong
1) SOAP_Client($wsdlurl, 'wsdl') does not build parameters in SOAP message (it returns an empty tag with called function name).

2) SOAP_Client with $wsdl->getProxy() builds correctly SOAP parameters, but they're not ordered (in wsdl they are a 'sequence').

I would really like to use PEAR::SOAP because I also need SOAP::Server, but the SOAP Client still works with nusoap libraries

If needed, I can provide test $wsdlurl to connect

Thanks federico

Test script:
---------------
<?php
require ('SOAP/Client.php');
include_once 'Var_Dump.php';
Var_Dump::displayInit(array('display_mode' => 'HTML4_Text'));

$wsdlurl = 'http://........';

$pearwsdl = new SOAP_WSDL($wsdlurl);
$pearclient1 = $pearwsdl->getProxy();
$pearclient2 = new SOAP_Client($wsdlurl, 'wsdl');

$pearclient1->setOpt('trace', 1);
$pearclient2->setOpt('trace', 1);
$pearclient2->setOpt('namespace', 'urn:Grid_HelpDesk');

$params = array( 'Origin_ID'=>'999','Loginname' => 'trystring', 'Last_login' => 'trystring', 'Name' => 'Federico', 'E-mail' => 'foo@bar.com', 'Phone' => '09887798', 'Date_Time_of_problem' => '2005-11-11 11:11', 'Short_description' => 'Prova description', 'G_XML_Short_Desc' => 'Prova description', 'Description' => 'Prova description', 'G_XML_Desc' => 'Prova description', 'Diary_of_steps' => 'update_log', 'Priority' => 'urgent', 'Experiment_specific_problem' => 'No', 'Experiment' => 'Alice', 'Status' => 'new', 'Responsible_Unit' => 'GlobalGrid_UserSupport', 'Last_Modifier' => 'Federico', 'Origin_SG' => 'ROC_Italy');

$resp1 = $pearclient1->call('OpCreate', $params);
$resp2 = $pearclient2->OpCreate($params);

Var_Dump::display($pearclient1);
Var_Dump::display($pearclient2);

?>

Actual result:
--------------
This is the outgoing message with SOAP_Client without $wsdl->getProxy()
SOAPAction: "urn:Grid_HelpDesk/OpCreate"
<?xml version="1.0" encoding="UTF-8"?>
<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:ns4="urn:Grid_HelpDesk"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns4:OpCreate xsi:nil="true"/>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>