Domanda

Sto usando il flusso di lavoro Nintex.Ho aggiunto il servizio Web e ho configurato per recuperare i dati da GetUserRofile.asmx.Dopo aver aggiunto il servizio Web Nintex ti consente di vedere come sembrerebbe il sapone.Ecco il sapone.

<?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 ti consente anche di vedere come appare i risultati in 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> 
.

L'ho aggiunto una "query xml" e ho provato alcune varianti di XPath al PreferredName dal database del profilo utente e mi sta dando "FalsefalsepreferredRamepublicicholmberg, Nancy".

Ecco alcuni del codice che ho provato

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

o

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

o

//defaultNS:xml/defaultNS:Name
.

o

//@PreferredName 
.

Ma tutti mi danno FalsefalsepreferredRamepublicicholmberg, Nancy.Dovrei darmi Holmberg, Nancy.

Si prega di suggerire.

È stato utile?

Soluzione

L'ho seguito e ha risolto il problema.

Se la variabile che contiene XML è chiamata TextXML, nell'azione XML della query, è possibile inserire un riferimento alla variabile del flusso di lavoro e sembrerebbe questo:

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

</xml>
.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top