Apple MAF iOS应用程序被Apple拒绝 - IPV6网络兼容问题

时间:2016-07-07 05:51:27

标签: java ios web-services ipv6 oracle-maf

当网络与IPV6兼容时,我开发了一个Oracle MAF iOS移动应用及其失败的呼叫网络服务。

我使用下面的代码进行网络服务调用 -

String restPayload = "";

RestServiceAdapter restServiceAdapter = Model.createRestServiceAdapter();
restServiceAdapter.clearRequestProperties();
restServiceAdapter.setConnectionName("PortPassConn");

//set GET, POST, DELETE, PUT
restServiceAdapter.setRequestType(httpMethod);

restServiceAdapter.addRequestProperty("Content-Type", "application/x-www-form-urlencoded");

restServiceAdapter.setRequestURI(requestURI);        
restServiceAdapter.setRetryLimit(0);    

//variable holding the response
String response = "";

//set payload if there is payload passed with the request
if(payload != null){   
     //send with empty payload
     restPayload  = payload;
}

try {
    response = (String) restServiceAdapter.send(restPayload);

} catch (Exception e) {

    MessageUtils.handleError("We encounter server side error, "+ e.getLocalizedMessage());
    //We encounter server side error, with http status code - 
    //log error
  //  Trace.log("REST_JSON",Level.SEVERE, this.getClass(),"invokeRestRequest", "Invoke of REST Resource failed for "+httpMethod+" to "+requestURI);
   // Trace.log("REST_JSON",Level.SEVERE, this.getClass(),"invokeRestRequest", e.getLocalizedMessage());
}

将错误视为:

  

“我们遇到服务器端错误,网络无法访问。”

0 个答案:

没有答案