2016-12-18 12 views
2

Put_Background_Check Workday Recruiting 웹 서비스를 호출하려고합니다. 나는 SoapUI에서 WSDL 파일을 열어 성공적으로 다음과 같은 XML ...Workday 요청은 SoapUI에서 작동하지만 Postman에서는 작동하지 않습니다.

<?xml version="1.0" encoding="UTF-8"?> 
<env:Envelope 
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" 
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    xmlns:wd="urn:com.workday/bsvc"> 
    <env:Body> 
     <wd:Put_Background_Check_Request 
      xmlns:wd="urn:com.workday/bsvc" 
      wd:version="v26.2"> 
      <wd:Business_Process_Parameters> 
       <wd:Run_Now>true</wd:Run_Now> 
      </wd:Business_Process_Parameters> 
      <wd:Background_Check_Data> 
       <wd:Event_Reference> 
        <wd:ID wd:type="Background_Check_ID">BACKGROUND_CHECK_EVENT-6-96</wd:ID> 
       </wd:Event_Reference> 
       <wd:Background_Check_Status_Data> 
        <wd:Status_Date>2016-12-16</wd:Status_Date> 
        <wd:Status_Reference> 
         <wd:ID wd:type="Background_Check_Status_ID">Background_Check_Status_Pending</wd:ID> 
        </wd:Status_Reference> 
       </wd:Background_Check_Status_Data> 
       <wd:Package_Reference_Data> 
        <wd:Package_Reference> 
         <wd:ID wd:type="Background_Check_Package_ID">BACKGROUND_CHECK_PACKAGE_QR1SQ</wd:ID> 
        </wd:Package_Reference> 
        <wd:Status_Reference> 
         <wd:ID wd:type="Background_Check_Status_ID">Background_Check_Status_Pending</wd:ID> 
        </wd:Status_Reference> 
       </wd:Package_Reference_Data> 
      </wd:Background_Check_Data> 
     </wd:Put_Background_Check_Request> 
    </env:Body> 
</env:Envelope> 

나는 다음과 같은 응답을 얻을 ...

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"> 
    <env:Body> 
     <wd:Put_Background_Check_Response wd:version="v26.2" xmlns:wd="urn:com.workday/bsvc"> 
     <wd:Event_Reference wd:Descriptor="Background Check for Job Application: Elizabeth Taylor - R0000039 Diversity Report Test (Open)"> 
      <wd:ID wd:type="WID">ee6477431cb2100ca61ac0100d041523</wd:ID> 
      <wd:ID wd:type="Background_Check_ID">BACKGROUND_CHECK_EVENT-6-96</wd:ID> 
     </wd:Event_Reference> 
     </wd:Put_Background_Check_Response> 
    </env:Body> 
</env:Envelope> 

URL은 https://wd3-impl-services1.workday.com/ccx/service/TENANT/Recruiting/v27.1입니다 보냈습니다. 인증 방법은 username @ tenant와 암호를 사용하는 기본 인증입니다. 그리고 HTTP 로그는 다음과 같습니다 ... SoapUI HTTP log

문제는 제가 Postman (또는 cURL 또는 Python 요청)에서 같은 헤더로 동일한 POST 요청을 다시 만들려고 할 때 잘못된 username 또는 암호 오류. SoapUI가 특별한 것을하고 있습니까? 이 경우 응답은 다음과 같습니다.

<?xml version="1.0" encoding="utf-8"?> 
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> 
    <SOAP-ENV:Body> 
     <SOAP-ENV:Fault xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wd="urn:com.workday/bsvc"> 
      <faultcode>SOAP-ENV:Client.authenticationError</faultcode> 
      <faultstring>invalid username or password</faultstring> 
     </SOAP-ENV:Fault> 
    </SOAP-ENV:Body> 
</SOAP-ENV:Envelope> 
+0

응답에서 자격 증명이 잘못 되었음이 분명합니다. 정정하고 다시 시도하십시오. – Rao

답변

1

SoapUI는이 경우 발신 XML을 수정합니다. POST 요청으로 보내기 전에 <env:Body> 요소 바로 앞에 다음 청크를 추가합니다.

<env:Header> 
    <wsse:Security 
     env:mustUnderstand="1" 
     xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" 
     xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> 
     <wsse:UsernameToken wsu:Id="UsernameToken-86F2FCCEFFBB80C4CD14820998755791"> 
      <wsse:Username>[email protected]</wsse:Username> 
      <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">password</wsse:Password> 
      <wsse:Nonce 
       EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">asdfwrqwarqwr1+oA== 
      </wsse:Nonce> 
      <wsu:Created>2016-12-18T22:24:30.575Z</wsu:Created> 
     </wsse:UsernameToken> 
    </wsse:Security> 
</env:Header> 

그래서 원본 XML에 추가하고 요청에서 기본 인증 헤더를 제거하면 작동합니다.

+0

WS 보안. https에 의해 보안되지 않는 헤더의 암호 대신 https 연결로 보호되는 문서에 암호를 넣습니다. – geoffc