Skip to Content
0

Compound employee API response format

Dec 06, 2017 at 05:52 PM

156

avatar image
Former Member

When I run Compound Employee API from SOAP UI, I always get a response that looks like this.

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <queryResponse xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns="urn:sfobject.sfapi.successfactors.com" xmlns:ns2="urn:fault.sfapi.successfactors.com">
         <result>
            <sfobject>
               <id>1120</id>
               <type>CompoundEmployee</type>
               <person>
                  <country_of_birth>DEU</country_of_birth>
                  <created_by>sfadmin</created_by>
                  <created_on_timestamp>2017-11-13T13:36:45.000Z</created_on_timestamp>

How do I get a response that looks like this?

<?xml version="1.0" encoding="UTF-8"?>
<queryCompoundEmployeeResponse>
  <CompoundEmployee>
    <id>3801</id>
    <person>
      <country_of_birth>DEU</country_of_birth>
      <created_by>sfadmin</created_by>
      <created_on_timestamp>2017-11-13T13:36:45.000Z</created_on_timestamp>
      <date_of_birth>1990-01-01</date_of_birth>

This is format of CE API response in the HCI log. I wonder how to get that. Or does HCI automatically convert the former to the latter? Kindly throw some light on this.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Sriprasad Shivaram Bhat
Dec 07, 2017 at 03:32 AM
1

Hello Ido.

You will get the data like screenshot#2 when you query from SAP CPI.You can use SOAP UI to verify the data instantly or to check what query would return.

Regards,

Sriprasad Shivaram Bhat

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

@Sriprasad Shivaram Bhat: Since there's no way to reply to your answer, very much unlike SO, I have to resort to writing an answer to comment on your answer.

Hello Ido.You will get the data like screenshot#2 when you query from SAP CPI.You can use SOAP UI to verify the data instantly or to check what query would return.


So, it's CPI that's changing the format? If I hit SF directly from SOAP UI, I get the data like in screenshot#1. But, when I consume CE API in CPI, as you've mentioned, I do get the second format.

But, I don't use CPI. So, I suppose I've to live with format #1?

0

Hello Ido.

Whats the tool you are using to query the data from SF .Basically this formatting is taken care at adapter level.

If you are using SOAP UI just to verify the data then I guess no issues.Also you can try Integration Center if you are looking for data extract ( CompoundEmployee OData Beta is available )

Regards,

Sriprasad Shivaram Bhat

0