I´m trying to connect to SAP-SUP trough a relay server and I followed the How-To: Transitioning Existing Object API Applications to Mobile SDK 2.1 ESD #3 I registered with success the application but I can´t synchronize. I keep getting the error 216 or 219 like this:
(MOBILINK_COMMUNICATIONS_ERROR) %1:219 %2: %3:0Details: StreamErrorCode = 219
216 stands for - An error occurred while trying to parse an HTTP header. The header may be malformed.
219 stands for - An unexpected character was read in an HTTP header. The header may be malformed or the other side may not be sending HTTP at all.
SUPConnectionProfile *sp = [RHDC1RHDC1DB getSynchronizationProfile];
[sp setAsyncReplay:NO];
[sp setUser:kSUPLoginUsername];
[sp setPassword:kSUPLoginPassword];
[sp setServerName:kSUPServerName];
[sp setPortNumber:kSUPServerPort];
[sp setNetworkProtocol:@"https"];
[sp setNetworkStreamParams:@"trusted_certificates=afaria.xpto.en.cer;compression=zlib;url_suffix=/ias_relay_server/server/rs_server.dll/SUPRBSFarm"];
The NetworkStreamParameters seem fine. I can´t find the error on that line! As anyone successfully connected through a relay server? Or can find the error in my code?
It turns out that instead of the server configurations:
[sp setNetworkStreamParams:@"trusted_certificates=afaria.xpto.en.cer;compression=zlib;url_suffix=/ias_relay_server/server/rs_server.dll/SUPRBSFarm"];
i should have used the cliente configurations:
[sp setNetworkStreamParams:@"trusted_certificates=afaria.xpto.en.cer;compression=zlib;url_suffix=/ias_relay_server/cliente/rs_client.dll/SUPRBSFarm"];
The code errors did not point me in the right direction, but this was the way to solve it.