I am working on Workday SOAP API. Using SOAP API - I am trying to create a Job Requisition (Create_Requisition_Request) and I am struggling with what valid values could be for each attribute and element. Could anyone please help me with some sample requests or point me to the link where I could get the valid values for each elements and attributes. Any help on this would be highly appreciated.
I have filled the xml payload with minimal information. you can add or remove some fields.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:bsvc="urn:com.workday/bsvc">
<soapenv:Header/>
<soapenv:Body>
<bsvc:Create_Requisition_Request bsvc:version="v27.2">
<bsvc:Business_Process_Parameters>
<bsvc:Auto_Complete>true</bsvc:Auto_Complete>
<bsvc:Run_Now>true</bsvc:Run_Now>
<bsvc:Comment_Data>
<bsvc:Comment>Create Job Requisition using WWS</bsvc:Comment>
</bsvc:Comment_Data>
</bsvc:Business_Process_Parameters>
<bsvc:Create_Job_Requisition_Data>
<bsvc:Position_Restriction_Reference>
<bsvc:ID bsvc:type="Position_ID">Your Position ID eg P-00300</bsvc:ID>
</bsvc:Position_Restriction_Reference>
<bsvc:Number_of_Openings>1</bsvc:Number_of_Openings>
<bsvc:Job_Requisition_Data>
<bsvc:Job_Requisition_ID>MY-REQ-001</bsvc:Job_Requisition_ID>
<bsvc:Job_Posting_Title>Software Engineer</bsvc:Job_Posting_Title>
<bsvc:Recruiting_Start_Date>2018-01-01</bsvc:Recruiting_Start_Date>
<bsvc:Target_Hire_Date>2018-01-01</bsvc:Target_Hire_Date>
<bsvc:Job_Profile_Reference>
<bsvc:ID bsvc:type="Job_Profile_ID">Enter Job profile ID (it should be in your tenant)</bsvc:ID>
</bsvc:Job_Profile_Reference>
<bsvc:Worker_Type_Reference>
<bsvc:ID bsvc:type="Worker_Type_ID">Employee</bsvc:ID>
</bsvc:Worker_Type_Reference>
<bsvc:Worker_Sub-Type_Reference>
<bsvc:ID bsvc:type="Employee_Type_ID">Regular</bsvc:ID>
</bsvc:Worker_Sub-Type_Reference>
<bsvc:Primary_Location_Reference bsvc:Descriptor="nimborum in">
<bsvc:ID bsvc:type="Location_ID">Toronto_site</bsvc:ID>
</bsvc:Primary_Location_Reference>
<bsvc:Position_Time_Type_Reference bsvc:Descriptor="animos et temperat">
<bsvc:ID bsvc:type="Position_Time_Type_ID">Full_time</bsvc:ID>
</bsvc:Position_Time_Type_Reference>
<bsvc:Scheduled_Weekly_Hours>40</bsvc:Scheduled_Weekly_Hours>
</bsvc:Job_Requisition_Data>
</bsvc:Create_Job_Requisition_Data>
</bsvc:Create_Requisition_Request>
</soapenv:Body>
</soapenv:Envelope>
Related
I am trying to get the metadata/fields of the custom forms in Netsuite. But the documentation of netsuite does not provide any direct way of doing this. Some pages mentioned using the SOAP Api's, So i tried using the SOAP api. Here is my api request in SOAP.
<?xml version="1.0"?>
<soapenv:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soapenv:Header>
<ns1:searchPreferences
xmlns:ns1="urn:messages_2022_1.platform.webservices.netsuite.com" soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0">
<ns1:pageSize>30</ns1:pageSize>
</ns1:searchPreferences>
<ns2:tokenPassport soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0"
xmlns:ns2="urn:messages_2022_1.platform.webservices.netsuite.com">
<ns3:account
xmlns:ns3="urn:core_2022_1.platform.webservices.netsuite.com">{{ACCOUNT}}
</ns3:account>
<ns4:consumerKey
xmlns:ns4="urn:core_2022_1.platform.webservices.netsuite.com">{{CONSUMER_KEY}}
</ns4:consumerKey>
<ns5:token
xmlns:ns5="urn:core_2022_1.platform.webservices.netsuite.com">{{TOKEN_ID}}
</ns5:token>
<ns6:nonce
xmlns:ns6="urn:core_2022_1.platform.webservices.netsuite.com">{{nonce}}
</ns6:nonce>
<ns7:timestamp
xmlns:ns7="urn:core_2022_1.platform.webservices.netsuite.com">{{timestamp}}
</ns7:timestamp>
<ns8:signature
xmlns:ns8="urn:core_2022_1.platform.webservices.netsuite.com" algorithm="HMAC-SHA256">{{signature}}
</ns8:signature>
</ns2:tokenPassport>
</soapenv:Header>
<soapenv:Body>
<getSelectValue>
<fieldDescription
xmlns:platformCore="urn:core_2022_1.platform.webservices.netsuite.com">
<platformCore:recordType>salesOrder</platformCore:recordType>
<platformCore:sublist
xmlns="urn:core_2022_1.platform.webservices.netsuite.com">customForm
</platformCore:sublist>
<platformCore:field>salesOrder</platformCore:field>
<platformCore:filterByValueList>
<platformCore:filterBy>
<platformCore:field>entity</platformCore:field>
<platformCore:internalId>164</platformCore:internalId>
</platformCore:filterBy>
</platformCore:filterByValueList>
</fieldDescription>
<pageIndex>1</pageIndex>
</getSelectValue>
</soapenv:Body>
</soapenv:Envelope>
The authorization and the signature generation are working correctly and it return actual response from netsuite. The response contains the list of all custom forms, but not the metadata/fields of the form i put in the filter part.
If there is any other way to do this let me know.
Would be the following SOAP request valid according to the standard?
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns2:ServiceReq xmlns:ns2="http://www.tibco.com/service" xmlns:ns1="http://www.tibco.com/framework">
<ns1:HeaderIn>
<ns1:countryISO>FR</ns1:countryISO>
<ns1:callerDateTime>2021-11-26T15:50:08.742Z</ns1:callerDateTime>
</ns1:HeaderIn>
<ns2:request>
<entete>
<profile>Default</profile>
</entete>
<input>
<type>W</type>
<codeRegion>X</codeRegion>
</input>
</ns2:request>
</ns2:ServiceReq>
</soapenv:Body>
</soapenv:Envelope>
I am not sure because certain tags don't have a namespace
There are multiple levels of valid here:
Is it a valid SOAP message as per the SOAP standard? Yes. The SOAP envelope and body tags seem valid.
Is it a valid XML format? Yes, it's a well formed XML file.
Are those elements without a namespace prefix valid? Yes. Elements can be in a default namespace or in no namespace at all.
Is the actual content of the body a valid messages? You can only tell if you verify the message you posted against the expected message as defined in the WSDL file of the web service.
All the elements in the body of the SOAP message should belong to specific namespaces, but sometimes a developer forgets to add a namespace annotation on the element, or copy-pastes something from some place else, or whatever, and you end up with weird looking XMLs like that. The service works and the message is correctly parsed, but it just looks funny.
I'd like to use a SOAP request to get a list of items in servicenow table, that have description starting with "TEST".
I am able to send a simple getKeys request. For example the below one is successfully returning to me the sys_id of a single ticket:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:hr="http://www.service-now.com/hr_case">
<soapenv:Header/>
<soapenv:Body>
<hr:getKeys>
<short_description>TEST Soap 1</short_description>
</hr:getKeys>
</soapenv:Body>
</soapenv:Envelope>
How should I modify the above request, so that it returns keys of all items with description starting with "TEST"?
I've used instead a REST webservice with the URI:
https://???.service-now.com/api/now/table/hr_case?sysparm_query=short_descriptionSTARTSWITHTEST
before then I tried a URI like that:
https://???.service-now.com/api/now/table/hr_case?&short_description=TEST Soap 1
I need to maintain an Active Directory service via SPMLv2 SOAP requests to an Active Roles Server.
I'm trying to do something ostensibly simple: delete the telephoneNumber attribute from an object. I'd never heard of SPML before so I spent some time trying to understand the specification available on the list of OASIS open standards.
I've figured out how to do it if the value is known. For example, the payload below will delete the telephoneNumber attribute if it matches the value '12345', but not any other value.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:urn="urn:oasis:names:tc:SPML:2:0">
<soapenv:Header/>
<soapenv:Body>
<urn:modifyRequest xmlns:spml="urn:oasis:names:tc:SPML:2:0">
<urn:psoID ID="CN=Some User,OU=User,OU=Accounts,DC=someorganisation,DC=org"/>
<urn:modification>
<modification name="telephoneNumber" operation="delete" xmlns="urn:oasis:names:tc:DSML:2:0:core">
<value>12345</value>
</modification>
</urn:modification>
</urn:modifyRequest>
</soapenv:Body>
</soapenv:Envelope>
What I can't figure out is how to do this for an unspecified value, i.e. I don't care what the value is before I delete it, I just want to delete it. I suspect this has something to do with the SelectionType and I just need to use a 'match anything' selector, but I'm having trouble understanding the specification.
Any ideas?
Edit: To add to the confusion, I see we're using the DSMLv2 namespace for the modification. I just pulled this from a sample on the Active Roles SPML service documentation so I don't know how/why it works. The SPML specification does mention DSML but doesn't give any context around its usage as far as I can tell. It could actually be a vendor specific implementation.
Figured out a solution/work-around to this problem.
To delete the attribute without knowing its current value, you can simply include a 'replace' operation to first set some arbitrary value and include it in the same modify request as the 'delete' operation.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:urn="urn:oasis:names:tc:SPML:2:0">
<soapenv:Header/>
<soapenv:Body>
<urn:modifyRequest xmlns:spml="urn:oasis:names:tc:SPML:2:0">
<urn:psoID ID="CN=Some User,OU=User,OU=Accounts,DC=someorganisation,DC=org"/>
<urn:modification>
<modification name="telephoneNumber" operation="replace" xmlns="urn:oasis:names:tc:DSML:2:0:core">
<value>deleteMe</value>
</modification>
<modification name="telephoneNumber" operation="delete" xmlns="urn:oasis:names:tc:DSML:2:0:core">
<value>deleteMe</value>
</modification>
</urn:modification>
</urn:modifyRequest>
</soapenv:Body>
</soapenv:Envelope>
I am using HPD_IncidentInterface_WS WSDL service (Incident Management). This service provides method HelpDesk_Query_Service, incident number as a parameter, to get remedy ticket details. However this method doesn't return any information on Work Info Notes and Work Info Summary. How do I get this information?
You could create a new web-service on the work info form. You can expose all of the fields there. You'll need to be sure and expose the incident number field as an input. Otherwise you won't be able to control which work info records it returns.
Best of luck,
Mike
In the HPD_IncidentInterface
there is a method HelpDesk_GetWorkInfoList which can be used to obtain the work infos
<urn:HelpDesk_GetWorkInfoList>
<urn:Qualification>'Incident Number'="INC000000XXXXX"</urn:Qualification>
<urn:startRecord>0</urn:startRecord>
<urn:maxLimit>0</urn:maxLimit>
</urn:HelpDesk_GetWorkInfoList>
It returns a list of Work Infos:
<soapenv:Body>
<ns0:HelpDesk_GetWorkInfoListResponse xmlns:ns0="urn:HPD_IncidentInterface_WS" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ns0:ListWOQuery>
<ns0:getListValues>
<ns0:WorkInfoInstanceID>ID</ns0:WorkInfoInstanceID>
<ns0:WorkInfoStatus>Enabled</ns0:WorkInfoStatus>
<ns0:WorkInfoType>General Information</ns0:WorkInfoType>
<ns0:WorkInfoCommSource xsi:nil="true"/>
<ns0:WorkInfoSummary>Summary</ns0:WorkInfoSummary>
<ns0:WorkInfoNotes>Note</ns0:WorkInfoNotes>
<ns0:ParentID>INC000000XXXXX</ns0:ParentID>
<ns0:WorkInfoSecureLog>No</ns0:WorkInfoSecureLog>
<ns0:WorkInfoSubmitDate>2023-01-16T17:11:25+01:00</ns0:WorkInfoSubmitDate>
<ns0:WorkInfoAttachment1Name/>
<ns0:WorkInfoAttachment1Data/>
<ns0:WorkInfoAttachment1OrigSize/>
<ns0:WorkInfoAttachment2Name/>
<ns0:WorkInfoAttachment2Data/>
<ns0:WorkInfoAttachment2OrigSize/>
<ns0:WorkInfoAttachment3Name/>
<ns0:WorkInfoAttachment3Data/>
<ns0:WorkInfoAttachment3OrigSize/>
</ns0:getListValues>
</ns0:ListWOQuery>
</ns0:HelpDesk_GetWorkInfoListResponse>
</soapenv:Body>
</soapenv:Envelope>