<?php 
$wsdl   = "http://smartcard.rmto.ir:9090/orawsv/TR_PUBLIC_WS/PKG_RMTO_WS?wsdl";
$soap_request = '<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
				<Body>
				<SVARCHAR2-RMTO_WEB_SERVICESInput xmlns="http://xmlns.oracle.com/orawsv/TR_PUBLIC_WS/PKG_RMTO_WS">
				<IN_USERNAME-VARCHAR2-IN>Badpa</IN_USERNAME-VARCHAR2-IN>
				<IN_SERVICEID-NUMBER-IN>41</IN_SERVICEID-NUMBER-IN>
				<IN_PASSWORD-VARCHAR2-IN>B@dp@1396</IN_PASSWORD-VARCHAR2-IN>
				<IN_PARAM_9-VARCHAR2-IN>""</IN_PARAM_9-VARCHAR2-IN>
				<IN_PARAM_8-VARCHAR2-IN>""</IN_PARAM_8-VARCHAR2-IN>
				<IN_PARAM_7-VARCHAR2-IN>""</IN_PARAM_7-VARCHAR2-IN>
				<IN_PARAM_6-VARCHAR2-IN>""</IN_PARAM_6-VARCHAR2-IN>
				<IN_PARAM_5-VARCHAR2-IN>""</IN_PARAM_5-VARCHAR2-IN>
				<IN_PARAM_4-VARCHAR2-IN>""</IN_PARAM_4-VARCHAR2-IN>
				<IN_PARAM_3-VARCHAR2-IN>""</IN_PARAM_3-VARCHAR2-IN>
				<IN_PARAM_2-VARCHAR2-IN>""</IN_PARAM_2-VARCHAR2-IN>
				<IN_PARAM_10-VARCHAR2-IN>""</IN_PARAM_10-VARCHAR2-IN>
				<IN_PARAM_1-VARCHAR2-IN>2590423</IN_PARAM_1-VARCHAR2-IN>
				</SVARCHAR2-RMTO_WEB_SERVICESInput>
				</Body>
				</Envelope>';
$header = array();
$serviceArguments = array(
  "validateRequest"=>"0",
  "protocol"=>"v_xml",
  "protocolVersion"=>"2.0",
  "request"=> $soap_request
);

$client = new SoapClient($wsdl);
$result = $client->Execute($serviceArguments);

print "V_XML Response";
print "<pre>".htmlentities($result->ExecuteResult)."</pre>";
/*$soap_do = curl_init();
curl_setopt($soap_do, CURLOPT_URL, $wsdl);
curl_setopt($soap_do, CURLOPT_CONNECTTIMEOUT, 10);
curl_setopt($soap_do, CURLOPT_TIMEOUT,        10);
curl_setopt($soap_do, CURLOPT_RETURNTRANSFER, true );
curl_setopt($soap_do, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($soap_do, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($soap_do, CURLOPT_POSTFIELDS,     $soap_request);
$output = curl_exec($soap_do);*/

if($output === false) {
	$err = 'Curl error: ' . curl_error($soap_do);
	curl_close($soap_do);
	print $err;
} else {
	echo $output;
	$xml = simplexml_load_string($output);	
	$fp = @fopen('driver.xml','w');
	if(!$fp) {
		die('Error cannot create XML file');
	}
	curl_close($soap_do);
	fwrite($fp,$output);
	fclose($fp);
}
?>