我有一些代码类似于下面的代码,这些代码曾经有效,但是现在失败了。我可以在wsdl中找到“标识符”了。有人能在这方面提供帮助吗?
function GetADFS($url) {
$ch = curl_init ();
curl_setopt ( $ch, CURLOPT_URL, $url . "XrmServices/2011/Organization.svc?wsdl=wsdl0" );
curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, 1 );
curl_setopt ( $ch, CURLOPT_TIMEOUT, 60 );
curl_setopt ( $ch, CURLOPT_SSL_VERIFYPEER, false );
$response = curl_exec ( $ch );
curl_close ( $ch );
$responsedom = new DomDocument ();
$responsedom->loadXML ( $response );
// **************************************************
// **************************************************
// Can no longer find this Identifier
// **************************************************
// **************************************************
$identifiers = $responsedom->getElementsbyTagName ( "Identifier" );
$identifier = $identifiers->item ( 0 )->textContent;
return str_replace ( "http://", "https://", $identifier );
}发布于 2016-10-18 08:54:49
它在命名空间‘ms’中,所以替换
$identifiers = $responsedom->getElementsbyTagName ( "Identifier" );使用
$identifiers = $responsedom->getElementsbyTagNameNS ( "ms-xrm","Identifier" );检查一下。下一步是签入实际的WSDL,如果没有看到这个节点,那么CRM的配置可能会出现问题,因为只有在使用ADFS时才能使用该节点。
https://stackoverflow.com/questions/40099045
复制相似问题