连接SDM请求时应用程序崩溃

时间:2014-05-29 15:39:16

标签: ios odata sap sup smp

有人可以帮我解决以下问题:

尝试通过SUP通过ODATA渠道服务从iPad应用程序连接到SAP ECC系统时,它允许我第一次登录并可以从SAP系统成功检索数据。但是当我注销并尝试使用相同的会话再次登录时,应用程序会崩溃。以下是崩溃报告供您参考。

我正在使用SDM Parser连接SAP系统。

        SDMODataServiceDocumentParser *sdmDocParser = [[SDMODataServiceDocumentParser alloc] init];
        [sdmDocParser parse:aServiceDocument];

        m_serviceDocument = sdmDocParser.serviceDocument;

        //Load the object with metadata xml:
        SDMODataMetaDocumentParser *sdmMetadataParser = [[SDMODataMetaDocumentParser alloc] initWithServiceDocument:m_serviceDocument];
        [sdmMetadataParser parse:aMetadata];

启动服务后,设置网址。

[service setServiceDocumentUrl:m_serviceDocumentURL];

使用SDMconnectivityhelper连接网址

 id<SDMRequesting> serviceDocumentRequest2 = [connectivityHelper executeBasicSyncRequestWithQuery3:[[ODataQuery alloc]initWithURL:[NSURL URLWithString:encodedStrUrl]]] ;

- (id <SDMRequesting>)executeBasicSyncRequestWithQuery3:(ODataQuery *)aQuery
{
  id<SDMRequesting> request = [self createRequestWithQuery:aQuery];
  [request setTimeOutSeconds:TIMEOUT_SEC];
  [request setRequestMethod:@"GET"];
  [request addRequestHeader:@"Content-Type" value:@"application/xml"];
  [request startSynchronous];**[App getting CRASH in this line]**
   return request;
}

- (id <SDMRequesting>)createRequestWithQuery:(ODataQuery *)aQuery
{
  if (isSUPMode) 
  {
    [SDMRequestBuilder setRequestType:SUPRequestType];
  }
  else
  {
    [SDMRequestBuilder setRequestType:HTTPRequestType];
  }

  id <SDMRequesting> request = [SDMRequestBuilder requestWithURL:aQuery.URL];
  request.username = self.username;
  request.password = self.password;
  return request;
}

崩溃报告: -

Incident Identifier: 347511BA-5F7F-45D4-8662-D5DCD2F88EA7
CrashReporter Key:   9a4d38cf19b1a94476eb6b2170d4f56678d6ca60
Hardware Model:      iPad3,4
Path:                /var/mobile/Applications/F38AD64F-03F8-4A21-  

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x00000000
Triggered by Thread:  0

Thread 0 Crashed:
0   libsystem_platform.dylib        0x393a94c0 _platform_memmove$VARIANT $Swift + 160
1   Eby Sales Order                 0x0015a2c8 0xb7000 + 668360
2   Eby Sales Order                 0x0015a8b8 0xb7000 + 669880
3   Eby Sales Order                 0x003331ee 0xb7000 + 2605550
4   Eby Sales Order                 0x0031856e 0xb7000 + 2495854
5   Eby Sales Order                 0x00338454 0xb7000 + 2626644
6   Eby Sales Order                 0x000e6ad8 0xb7000 + 195288
7   Eby Sales Order                 0x000e99a0 0xb7000 + 207264
8   Eby Sales Order                 0x000ea442 0xb7000 + 209986
9   Eby Sales Order                 0x000eb0d6 0xb7000 + 213206
10  Eby Sales Order                 0x000c13d0 0xb7000 + 41936
11  Foundation                      0x2ec93112 __NSFireDelayedPerform + 410
12  CoreFoundation                  0x2e27ef4c __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 12
13  CoreFoundation                  0x2e27eb66 __CFRunLoopDoTimer + 790
14  CoreFoundation                  0x2e27ceee __CFRunLoopRun + 1214
15  CoreFoundation                  0x2e1e7764 CFRunLoopRunSpecific + 520
16  CoreFoundation                  0x2e1e7546 CFRunLoopRunInMode + 102
17  GraphicsServices                0x331216ce GSEventRunModal + 134
18  UIKit                           0x30b4688c UIApplicationMain + 1132
19  Eby Sales Order                 0x000bd8da 0xb7000 + 26842
20  Eby Sales Order                 0x000bd89c 0xb7000 + 26780

0 个答案:

没有答案