Jump to content

Nusoap client implementation problem


lallo

Recommended Posts

Hi you all,

I have a problem with a client build with nusoap library:

 

1) I have a wsdl File like this:

 

h__p://webservices.eurotaxglass.com/wsdl/ereinterface.wsdl

 

and the correct SOAP request is the follow:

 

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Header>
<m:ETGHeader xmlns:m="urn:com:eurotaxglass:ereinterface">
<m:VersionRequest>1.0.3</m:VersionRequest> 
<m:Originator>
<m:Signature>MYSIGNATURE</m:Signature> 
<m:LoginData>
<m:Name>MYNAME</m:Name> 
<m:Password>MYPASSWORD</m:Password> 
<m:ReturnSecurityToken>true</m:ReturnSecurityToken> 
</m:LoginData>
<m:SecurityToken /> 
</m:Originator>
<m:Request>
<m:Signature>ERE.EREprepareCalculation</m:Signature> 
</m:Request>
</m:ETGHeader>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<m:EREprepareCalculation xmlns:m="urn:com:eurotaxglass:ereinterface">
<m:EREcalculationData>
<m:ReturnURL>http://www.eurotax.com/index.html</m:ReturnURL> 
<Estimation xmlns:xsi="http://www.w3.org/2001/XMLSChema-instance">
<GlobalSetting>
<EtgCountryCd>IT</EtgCountryCd> 
<EtgDbLangCd>IT</EtgDbLangCd> 
<EtgUiLangCd>IT</EtgUiLangCd> 
<XMLDocVers>2.1.1</XMLDocVers> 
</GlobalSetting>
</Estimation>
</m:EREcalculationData>
</m:EREprepareCalculation>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

 

I'm trying to use nusoap library but I doesn't recreate the same request. I use this script :   

 

<?
   

require("lib/nusoap.php");

/**
* $soap->call($operation,$param,$namespace,$soapAction,$header,$rpcParam,$style,$use) 
*/
$mynamespace = "urn:com:eurotaxglass:ereinterface";

$wsdlURL = "http://webservices.eurotaxglass.com/wsdl/ereinterface.wsdl";
$soap = new nusoap_client($wsdlURL,true);

$header['m:VersionRequest'] = '1.0.3';
$header['m:Originator']['m:Signature'] = 'MYSIGNATURE';
$header['m:Originator']['m:LoginData']['m:Name'] = 'MYNAME';
$header['m:Originator']['m:LoginData']['m:Password'] = 'MYPASSWORD';
$header['m:Originator']['m:LoginData']['m:ReturnSecurityToken'] = 'true';
$header['m:Originator']['m:SecurityToken'] = '';
$header['m:Request']['m:Signature'] = 'ERE.EREprepareCalculation';   	  

  
$etgheaderatt = array('xmlns:m'=>'urn:com:eurotaxglass:ereinterface');  
$etgheader = new soapval('m:ETGHeader','',$header,'', '',$etgheaderatt) ;
$headeruse = array('ETGHeader' => $etgheader); 


$globalsetting['GlobalSetting']['EtgCountryCd'] = 'IT' ;
$globalsetting['GlobalSetting']['EtgDbLa'] ='IT' ;
$globalsetting['GlobalSetting']['EtgUiLangCd'] = 'IT';   
$globalsetting['GlobalSetting']['XMLDocVers'] = '2.1.1'; 

$estimationatt = array('xmlns:xsi'=>'http://www.w3.org/2001/XMLSChema-instance'); 
$estimation = new soapval('Estimation','',$globalsetting,'','','') ;



$parameters['calc_data']['EREcalculationData']['ReturnURL'] = 'http://www.eurotax.com/index.html';
$parameters['calc_data']['EREcalculationData']['Estimation'] = $estimation;


$soap->debug_flag = true; 
$result = $soap->call('EREprepareCalculation',$parameters,$mynamespace,'',$headeruse,'','','');

   
   

echo '<h2>Request</h2>';
echo '<pre>' . htmlspecialchars($soap->request) . '<pre>';
echo '<h2>Response</h2>';
echo '<pre>' . htmlspecialchars($soap->response, ENT_QUOTES) . '</pre>';

echo '<h2>Debug</h2>';
echo '<pre>' . htmlspecialchars($soap->debug_str, ENT_QUOTES) . '</pre>';      


//header("Location:".$result[EREapplicationURL]);
//exit();


?>

 

The result Request of this script is the follow:   

 

<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:tns="urn:com:eurotaxglass:ereinterface">
<SOAP-ENV:Header>
<m:ETGHeader xmlns:m="urn:com:eurotaxglass:ereinterface">
<m:VersionRequest>1.0.3</m:VersionRequest>
<m:Originator>
<m:Signature>MYSIGNATURE</m:Signature>
<m:LoginData>
<m:Name>MYNAME</m:Name>
<m:Password>MYPASSWORD</m:Password>
<m:ReturnSecurityToken>true</m:ReturnSecurityToken>
</m:LoginData>
<m:SecurityToken></m:SecurityToken>
</m:Originator>
<m:Request>
<m:Signature>ERE.EREprepareCalculation</m:Signature>
</m:Request>
</m:ETGHeader>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<EREprepareCalculation xmlns="urn:com:eurotaxglass:ereinterface">
<EREcalculationData>
<ReturnURL>http://www.eurotax.com/index.html</ReturnURL>
</EREcalculationData>
</EREprepareCalculation>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

 

All the "estimation" section is missing and I don't knok how I can sent to server can someone help me?   

Link to comment
https://forums.phpfreaks.com/topic/137047-nusoap-client-implementation-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.