Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6940859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:48:28+00:00 2026-05-27T12:48:28+00:00

So the makers of this API has my code clearly marked as functional, seeing

  • 0

So the makers of this API has my code clearly marked as functional, seeing as they made the damn thing. The thing is, that the REST API works fine as long as I use PI or QS alone. When I try to use the more advanced features requiring an XML document being sent with the REST request, it just returns false on the execution.

<?php

$objCurlToken = curl_init();
$strUrlToken = "https://servername/apimember/services/rest/connect/open/username/password/token";
$arrCurlOptions1 = array(
    CURLOPT_URL => $strUrlToken,
    CURLOPT_RETURNTRANSFER => true
);
curl_setopt_array($objCurlToken, $arrCurlOptions1);
$strXMLToken = curl_exec($objCurlToken);
$objXML = simplexml_load_string($strXMLToken);
curl_close($objCurlToken);


$strXMLPost = '
<?xml version="1.0" encoding="utf-8"?>
<synchroMember>
    <memberUID>
        EMAIL
    </memberUID>
    <dynContent>
        <entry>
            <key>
                EMAIL
            </key>
            <value>
                klaus@lagerbrau.de
            </value>
        </entry>
        <entry>
            <key>
                FIRSTNAME
            </key>
            <value>
                KLAUS LAGER
            </value>
        </entry>
        <entry>
            <key>
                EMVADMIN1
            </key>
            <value>
                This is klaus lager, the test subject
            </value>
        </entry>
    </dynContent>
</synchroMember>
';
$objCurlProbe = curl_init();
$strUrlProbe = "https://servername/apimember/services/rest/member/insertOrUpdateMember/" . $objXML->result . "";
$arrCurlOptions2 = array(
    CURLOPT_URL => $strUrlProbe,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => $strXMLPost
);
curl_setopt_array($objCurlProbe, $arrCurlOptions2);
$strCurlXMLResult = curl_exec($objCurlProbe);
echo "<pre>";
var_dump(htmlentities($objXML->result));
var_dump(htmlentities($strXMLPost));
var_dump(htmlentities($strCurlXMLResult));
curl_close($objCurlProbe);
$objXMLResult = simplexml_load_string($strCurlXMLResult);
var_dump($objXMLResult);
?>

The output looks as follows:

string(84) "*tokenkey*"
string(615) "
<?xml version="1.0" encoding="utf-8"?>
<synchroMember>
    <memberUID>
        EMAIL
    </memberUID>
    <dynContent>
        <entry>
            <key>
                EMAIL
            </key>
            <value>
                klaus@lagerbrau.de
            </value>
        </entry>
        <entry>
            <key>
                FIRSTNAME
            </key>
            <value>
                KLAUS LAGER
            </value>
        </entry>
        <entry>
            <key>
                EMVADMIN1
            </key>
            <value>
                This is klaus lager, the test subject
            </value>
        </entry>
    </dynContent>
</synchroMember>
"
string(0) ""
bool(false)

Taken from API documentation:

***Insert or Update Member Data***
This method searches a specified column of the Member table for a particular value used to identify a member
in order to update the member's data. If the member is not found, a new member is created. Any criteria can
be used to find the member including one of the fields to be updated.
The memberUID attribute is used to specify the key and value used as search criteria. The dynContent attribute
should only contain the values to be updated.
**insertOrUpdateMember**
***Input***
https://{server}/apimember/services/rest/member/insertOrUpdateMember/{token}
<?xml version="1.0" encoding="utf-8"?>
<synchroMember>
<memberUID>
{fieldNameA},
{fieldNameB}
</memberUID>
<dynContent>
<entry>
<key>>
{fieldNameA}
</key>
<value>
{fieldValueA}
</value>
</entry>
<entry>
<key>
{fieldNameB}
</key>
<value>
{fieldValueB}
</value>
</entry>
<entry>
<key>
{fieldNameC}
</key>
<value>
{fieldValueC}
</value>
</entry>
</dynContent>
</synchroMember>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T12:48:34+00:00Added an answer on May 27, 2026 at 12:48 pm

    I found the problem, the problem was in missing header describing the document as XML.
    As far as I know this shouldn’t be a problem on normal REST servers, seeing as the only accepted data form is XML.
    What didn’t help the matter is that the company is pretty horrible at software development, so the system never responds with errors and if it does, they are not human readable, and the company does not supply an error code list.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just came a cross this nice code that makes this scatter matrix plot:
Suppose you have code like this: Result.X := ACustomMemo.Perform(EM_LINEFROMCHAR, -1, 0); The Windows API
I have a web page with a google map (api v3) that has dozens
The user has markers loaded depending on where they select their location. The markers
I'm working on a map that has multiple markers on it. These markers use
The HTTP commons client 4.12 tutorial section on exception handling clearly shows that one
I am designing the API for a client of a service that retrieves data
I have some VB code which makes use of a COM api and results
I fixed the problem below by updating the Google maps API version in this
I have a Google Map on our site that has a list of markers

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.