【发布时间】:2021-05-18 13:52:35
【问题描述】:
我需要为我的肥皂服务器添加凭据,但我在这方面没有太多经验。我必须使用什么来添加用户和密码?
<?php
require_once "vendor/econea/nusoap/src/nusoap.php";
$namespace = "testeSoap";
$server = new soap_server();
$server->configureWSDL("PinchesSOAP",$namespace);
$server->wsdl->schemaTargetNamespace = $namespace;
$server->wsdl->addComplexType(
'Cliente',
'complexType',
'struct',
'all',
'',
array(
'name' => array('name' => 'name', 'type'=>'xsd:string'),
)
);
$server->wsdl->addComplexType(
'response',
'complexType',
'struct',
'all',
'',
array(
'status' => array('name'=>'status', 'type'=>'xsd:string')
)
);
$server->register(
'notifyCustomerCreationRequest',
array('name' => 'tns:Cliente'),
array('name' => 'tns:response'),
$namespace,
false,
'rpc',
'encoded',
''
);
function notifyCustomerCreationRequest(){
return array(
"status" => "PEN"
);
}
$POST_DATA = file_get_contents("php://input");
$server->service($POST_DATA);
exit();
我将使用soapUI并需要验证信息,但不知道。
【问题讨论】:
标签: php soap nusoap soapserver