无法从php脚本调用WCF服务方法
我有WCF服务。 当我尝试从.NET页面访问它时,一切正常。但是,我找不到从php脚本访问它的方法无法从php脚本调用WCF服务方法,php,wcf,Php,Wcf,我有WCF服务。 当我尝试从.NET页面访问它时,一切正常。但是,我找不到从php脚本访问它的方法 <system.serviceModel> <bindings> <wsHttpBinding> <binding name="NewBinding0"> <reliableSession inactivityTimeout="01:00:00" /> <security mode="Tran
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="NewBinding0">
<reliableSession inactivityTimeout="01:00:00" />
<security mode="TransportWithMessageCredential">
<transport clientCredentialType="Basic" />
<message clientCredentialType="UserName" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="RegisterBehavior">
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceMetadata httpsGetEnabled="true" />
<serviceThrottling maxConcurrentCalls="48" maxConcurrentSessions="5000"
maxConcurrentInstances="5000" />
<serviceCredentials>
<userNameAuthentication userNamePasswordValidationMode="Custom"
customUserNamePasswordValidatorType="..."
cacheLogonTokens="true" cachedLogonTokenLifetime="01:00:00" />
</serviceCredentials>
</behavior>
<behavior name="">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="RegisterBehavior" name="Riepas.WCFRiepas">
<endpoint address="..."
binding="wsHttpBinding" bindingConfiguration="NewBinding0" contract="...">
</endpoint>
<endpoint address="mex" binding="mexHttpsBinding" name="mex"
contract="IMetadataExchange">
</endpoint>
</service>
</services>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"
/>
函数返回正常值。要使用,您需要使用,而不是
有关非常简单完整的工作示例,请参见my,其中包括
这样做的缺点是,您的服务将无法实现或删除。但是,如果您需要这些,则有一个名为的开源第三方模块,据说它可以处理wsHttpBinding
$client = new SoapClient("wsdl", array(
'login' => "...",
'password' => "...",
'soap_version' => SOAP_1_2));
$functions = $client->__getFunctions ();
var_dump ($functions);
$parameters = array("ReqVal" => "nu?");
//$result = $client->__soapCall("GetStr", $parameters);
//$result = $client->GetStr($parameters);