Pergunta

Estou usando o fluxo de trabalho do Nintex.Adicionei o Web Service e configurei para recuperar dados de GetUserProfile.asmx.Depois de adicionar o serviço web nintex, você verá como ficaria o sabonete.aqui está o sabonete.

<?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>

O Nintex também permite que você veja a aparência dos resultados em 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> 

Adicionei um "Query XML" e tentei alguma variação do xpath para o PreferredName do banco de dados de perfil do usuário e está me dando "falsefalsePreferredNamePublicHolmberg, Nancy".

Aqui estão alguns dos códigos que tentei

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

ou

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

ou

//defaultNS:xml/defaultNS:Name

ou

//@PreferredName 

Mas todos eles me dão falsefalsePreferredNamePublicHolmberg, Nancy.Eu deveria me dar Holmberg, Nancy.

Por favor sugira.

Foi útil?

Solução

Eu segui isso e resolveu o problema.

se sua variável que contém o xml for chamada textXML, em sua ação Consultar XML você poderá inserir uma referência à variável de fluxo de trabalho e ficaria assim:

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

</xml>
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top