0

Nintex ワークフローを使用しています。Web サービスを追加し、GetUserProfile.asmx からデータを取得するように構成しました。Web サービス nintex を追加した後、soap がどのように見えるかを確認できます。石鹸はこちら。

<?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 に答える