0

我正在使用 Nintex 工作流程。我添加了 Web 服务并配置为从 GetUserProfile.asmx 检索数据。添加网络服务 nintex 后,让您看看肥皂的样子。这是肥皂。

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
        <GetUserPropertyByAccountName xmlns="http://microsoft.com/webservices/SharePointPortalServer/UserProfileService">
            <accountName>{WorkflowVariable:tmpApprover}</accountName>
            <propertyName>PreferredName</propertyName>
        </GetUserPropertyByAccountName>
    </soap:Body>
</soap:Envelope>

Nintex 还可以让您查看结果在 xml 中的样子:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soap:Body>
    <GetUserPropertyByAccountNameResponse xmlns="http://microsoft.com/webservices/SharePointPortalServer/UserProfileService">
      <GetUserPropertyByAccountNameResult>
        <IsPrivacyChanged>false</IsPrivacyChanged>
        <IsValueChanged>false</IsValueChanged>
        <Name>PreferredName</Name>
        <Privacy>Public</Privacy>
        <Values>
          <ValueData>
            <Value xsi:type="xsd:string">Holmberg, Nancy</Value>
          </ValueData>
        </Values>
      </GetUserPropertyByAccountNameResult>
    </GetUserPropertyByAccountNameResponse>
  </soap:Body>
</soap:Envelope> 

我添加了一个“查询 XML”,并尝试了一些从用户配置文件数据库到 PreferredName 的 xpath 变体,它给了我“falsefalsePreferredNamePublicHolmberg,Nancy”。

这是我尝试过的一些代码

/soap:Envelope/soap:Body/defaultNS:GetUserPropertyByAccountNameResponse/defaultNS:GetUserPropertyByAccountNameResult/defaultNS:Values/defaultNS:ValueData/defaultNS:Value/@xsi:type

或者

//defaultNS:xml/defaultNS:Values/defaultNS:ValueData/defaultNS:Value

或者

//defaultNS:xml/defaultNS:Name

或者

//@PreferredName 

但他们都给我 falsefalsePreferredNamePublicHolmberg,Nancy。我应该给我霍姆伯格,南希。

请建议。

4

1 回答 1

0

我遵循了这个,它解决了这个问题。

如果包含 xml 的变量称为 textXML,则在 Query XML 操作中,您可以插入对工作流变量的引用,它看起来像这样:

<xml xmlns="http://microsoft.com/webservices/SharePointPortalServer/UserProfileService">
  {WorkflowVariable:textXML}

</xml>
于 2012-03-14T14:57:51.843 回答