Skip to Content
author's profile photo Former Member
Former Member

ERROR- Unable to get the Response in xcode of mac os

We have installed Netweaver Gateway(NWGW) plugin in mac os .

When we are trying to browse the services we are able to see only SDATA services(but not ODATA) in NWGW plugin of mac os.

When we are trying to get the response in xcode we are getting the following error

Returned Query URL: /HREMPPA0002PD

ERROR :: SUPJsonException:expected string, found 140/Location:-[SUPRequest startSynchronous] + 1159

ERROR :: 400:Bad request/Location:-[SUPRequest startSynchronous] + 1184

Exception during parsing response data. Error: The document is not a valid data document

<?xml version="1.0" encoding="utf-8"?> <error ><message xml:lang="en">Malformed URL recieved :no protocol: /HREMPPA0002PD</message> </error>

The above error occurred on the last line(red color) the following code which has been mentioned in this document (page number 29),

SDMConnectivityHelper *supConn =[[SDMConnectivityHelper alloc] init];

LiteSUPUserManager *supUserManager = [supConn activateSUPModeWithHost:@"xxxx" andSUPPort:xxxx andSUPFarmId:@"0" andAppId:@"xxxx"];

[supConnregisterSUPUser:@"xxxx" andPassword:@"xxxx" andSecurityConfigName:@"Basic" andSUPUserManager:supUserManager];

0262Service *service = [[0262Service alloc] init];

[service setServiceDocumentUrl:[LiteSUPAppSettings getApplicationEndPoint]];

NSMutableArray *personalDataArray = [service get02PDWithData:[[supConn executeBasicSyncRequestWithQuery:service.02PDQuery] responseData] error:nil];

And i am not able to get the endpoints. I am using the following code in the xcode,

[LiteSUPAppSettings getApplicationEndPoint];

Please provide us the pointers to resolve the issue

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on May 03, 2012 at 11:06 AM

    Hi Rakesh,

    Few quick questions here, are hitting the gateway directly or you have SUP in the middle ? Do you also have a relay server ?

    your question was

    SDATA is typically a wrapper around oDATA, you need to use, oData/SDATA libraries provided by SUP

    you can read more about this at


    Srinivas Divakarla

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      In the client application, you need to indicate you are routing through SUP. For example, here is a snippet that sets request type for the application to be SUP:

      - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions


      // Override point for customization after application launch.

      self.userManager = [LiteSUPUserManager getInstance:supApp];

      if (![[[NSUserDefaults standardUserDefaults] stringForKey:@"UserReg"] isEqualToString:@"Registered"])


      [self.userManager setConnectionProfile:supServer withSupPort:supServerPort


      [self.userManager registerUser:supUser withActivationCode:supActivationCode];


      [[NSUserDefaults standardUserDefaults] setObject:@"Registered" forKey:@"UserReg"];

      [SDMRequestBuilder setRequestType:SUPRequestType];

      [SUPUtilities setDelegate:self];

      [LiteSUPMessagingClient setupForPush:application];

      //[[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound)];

      self.window.rootViewController = self.navigationController;

      [self.window makeKeyAndVisible];

      return YES;


      Later, when generating requests, we do something like this:

      NSString *gwurl = [LiteSUPAppSettings getApplicationEndPoint];

      self.request = [SDMRequestBuilder requestWithURL: [NSURL URLWithString:gwurl]];

      [m_Request setUsername:user];

      [m_Request setPassword:password];

      [m_Request setDelegate:self];

      [m_Request setDidFinishSelector:@selector(serviceDocSuccess:)];

      [m_Request setDidFailSelector:@selector(serviceDocFailed:)];

      [m_Request setRequestMethod:@"GET"];

      [m_Request startAsynchronous];

      so we extract the end point URL and then generate a request.

      Does that help?


Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.