美文网首页
php调用sap和.net的webservices接口

php调用sap和.net的webservices接口

作者: 华少_97e6 | 来源:发表于2020-10-22 09:34 被阅读0次

转载:https://www.jb51.net/article/62914.htm

转载:https://www.cnblogs.com/zakun/p/5387910.html

php连接sapwebservices接口

public function getwebservice($param){

  $user = 'username';

  $password = 'password';

  $wsdl = '*****';   /*wsdl地址*/

$SOAP_CONFIG = array(

          'login' => $user,

        'password' => $password,

          'trace' =>true,

          'soap_version'=>SOAP_1_2,

          'connection_timeout' => 50,

          'encoding' => 'UTF-8',

          'cache_wsdl' => WSDL_CACHE_NONE,

          'keep_alive' => false

          );

        try {

                $client = new \SoapClient($wsdl, $SOAP_CONFIG); //调用sap里的接口

                /* $param= array(

                        '参数1'    =>    '1',

                        '参数2'    => '2',

                        '参数3'    =>  '3',

                        '参数4'    =>    '4');*/

                $ve=$client->__call("ZSdSoInfo", array($param));

              return $ve;

    } catch (Exception $e) {

                  print $e->getMessage();

      }

}

php链接.net接口

$ws = "http://*****?wsdl";//webservice服务的地址

    $client = new SoapClient ($ws);

    $result=$client->kelOtp(array('参数1'=>参数1,'参数2'=>参数2);

    $a= $result->kelOtpResult;/

相关文章

网友评论

      本文标题:php调用sap和.net的webservices接口

      本文链接:https://www.haomeiwen.com/subject/arkumktx.html