【问题标题】:Issue getting identifier from XRMServices/2011/Organization.svc从 XRMServices/2011/Organization.svc 获取标识符的问题
【发布时间】:2016-10-18 03:31:37
【问题描述】:

我有一些类似于 Jason Lattimer 下面的代码,这些代码曾经可以工作,但现在失败了。我可以在 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 );
}

【问题讨论】:

    标签: php soap dynamics-crm dynamics-crm-2015 dynamics-crm-2016


    【解决方案1】:

    它在命名空间“ms-xrm”中,所以替换

    $identifiers = $responsedom->getElementsbyTagName ( "Identifier" );
    

    $identifiers = $responsedom->getElementsbyTagNameNS ( "ms-xrm","Identifier" );
    

    并检查。接下来是检查实际的 WSDL,如果您看到此节点,如果没有,那么您的 CRM 配置可能存在问题,因为该节点仅在您使用 ADFS 时可用。

    【讨论】:

    • 谢谢!!你回答了我的问题。我使用的是 AD 但不是 ADFS。如何为内部 AD 部署获得类似的东西?
    • “类似的东西”是什么意思?没有 ADFS,就没有“标识符”节点。
    • 那么如果 Active Directory 服务器不是联合设置,我该如何找到它?
    • WSDL 中既没有 AD 也没有 ADFS(当您的 CRM 配置为 ADFS 时除外)地址。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2023-04-01
    • 2011-04-07
    • 2017-01-05
    • 1970-01-01
    • 2013-05-06
    • 2011-06-14
    • 1970-01-01
    相关资源
    最近更新 更多