I am using SOAP package to make a request to workday-api by xml.
Issue is with xml generated by soap package.
generated XML
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:wd-wsdl="urn:com.workday/bsvc/Recruiting"
xmlns:wd="urn:com.workday/bsvc"
xmlns:nyw="urn:com.netyourwork/aod">
<soapenv:Header>
<wsse:Security soapenv: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>
<wsse:Username>Username</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:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<wd:Get_Applicants_Request
xmlns:wd="urn:com.workday/bsvc"
xmlns="urn:com.workday/bsvc">
<bsvc:Get_Applicants_Request bsvc:version="v32.1">
<bsvc:Request_Criteria>
<bsvc:Email_Address>abc@gmail.com</bsvc:Email_Address>
</bsvc:Request_Criteria>
<bsvc:Response_Group>
<bsvc:Include_Reference>true</bsvc:Include_Reference>
<bsvc:Include_Personal_Information>true</bsvc:Include_Personal_Information>
<bsvc:Include_Recruiting_Information>true</bsvc:Include_Recruiting_Information>
<bsvc:Include_Qualification_Profile>true</bsvc:Include_Qualification_Profile>
<bsvc:Include_Resume>false</bsvc:Include_Resume>
<bsvc:Include_Background_Check>false</bsvc:Include_Background_Check>
<bsvc:Include_External_Integration_ID_Data>false</bsvc:Include_External_Integration_ID_Data>
</bsvc:Response_Group>
</bsvc:Get_Applicants_Request>
</wd:Get_Applicants_Request>
</soapenv:Body>
</soapenv:Envelope>
I need xml is like below
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:bsvc="urn:com.workday/bsvc">
<soapenv:Header>
<wsse:Security soapenv: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>
<wsse:Username>Username</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:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<bsvc:Get_Applicants_Request bsvc:version="v32.1">
<bsvc:Request_Criteria>
<bsvc:Email_Address>abc@gmail.com</bsvc:Email_Address>
</bsvc:Request_Criteria>
<bsvc:Response_Group>
<bsvc:Include_Reference>true</bsvc:Include_Reference>
<bsvc:Include_Personal_Information>true</bsvc:Include_Personal_Information>
<bsvc:Include_Recruiting_Information>true</bsvc:Include_Recruiting_Information>
<bsvc:Include_Qualification_Profile>true</bsvc:Include_Qualification_Profile>
<bsvc:Include_Resume>false</bsvc:Include_Resume>
<bsvc:Include_Background_Check>false</bsvc:Include_Background_Check>
<bsvc:Include_External_Integration_ID_Data>false</bsvc:Include_External_Integration_ID_Data>
</bsvc:Response_Group>
</bsvc:Get_Applicants_Request>
</soapenv:Body>
</soapenv:Envelope>
In soap generated xml contain extra namesapace in soapenv:envelope. How to remove it. And I am getting extra tag after soapenv:body tag.
I am passing below details for header & body.
header:
let soapHeader = `<wsse:Security soapenv: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>
<wsse:Username>Username</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:UsernameToken>
</wsse:Security>`
and body:
let xml = `<bsvc:Get_Applicants_Request bsvc:version="v32.1">
<bsvc:Request_Criteria>
<bsvc:Email_Address>abc@gmail.com</bsvc:Email_Address>
</bsvc:Request_Criteria>
<bsvc:Response_Group>
<bsvc:Include_Reference>true</bsvc:Include_Reference>
<bsvc:Include_Personal_Information>true</bsvc:Include_Personal_Information>
<bsvc:Include_Recruiting_Information>true</bsvc:Include_Recruiting_Information>
<bsvc:Include_Qualification_Profile>true</bsvc:Include_Qualification_Profile>
<bsvc:Include_Resume>false</bsvc:Include_Resume>
<bsvc:Include_Background_Check>false</bsvc:Include_Background_Check>
<bsvc:Include_External_Integration_ID_Data>false</bsvc:Include_External_Integration_ID_Data>
</bsvc:Response_Group>
</bsvc:Get_Applicants_Request>`
and used below method to request xml using soap as workday provides soap api.
let client = await soap.createClientAsync(url, wsdlOptions)
client.addSoapHeader(soapHeader)
let resp = await client.Get_ApplicantsAsync(xml)
Please help me to make xml as I needed using SOAP package.