Android Open Source - FrameLite Web Service Connection S E






From Project

Back to project page FrameLite.

License

The source code is released under:

GNU General Public License

If you think the Android project FrameLite listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.miku.framelite.api.webservice;
// www  .  j  a  v  a2s  . c  o  m
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;

import org.ksoap2.transport.ServiceConnection;

public class WebServiceConnectionSE implements ServiceConnection {
   private HttpURLConnection connection;
   
   public WebServiceConnectionSE(String url,int connectTimeout,int readTimeout)
     throws IOException
 {
     connection = (HttpURLConnection)(new URL(url)).openConnection();
     connection.setConnectTimeout(connectTimeout);
     if(readTimeout>0){
       connection.setReadTimeout(readTimeout);
     }
     
     connection.setUseCaches(false);
     connection.setDoOutput(true);
     connection.setDoInput(true);
     
 }

 public void connect()
     throws IOException
 {
     connection.connect();
 }

 public void disconnect()
 {
     connection.disconnect();
 }

 public void setRequestProperty(String string, String soapAction)
 {
     connection.setRequestProperty(string, soapAction);
 }

 public void setRequestMethod(String requestMethod)
     throws IOException
 {
     connection.setRequestMethod(requestMethod);
 }

 public OutputStream openOutputStream()
     throws IOException
 {
     return connection.getOutputStream();
 }

 public InputStream openInputStream()
     throws IOException
 {
     return connection.getInputStream();
 }

 public InputStream getErrorStream()
 {
     return connection.getErrorStream();
 }

}




Java Source Code List

com.miku.framelite.FrameApplication.java
com.miku.framelite.FrameBaseActivity.java
com.miku.framelite.FrameOrmBaseActivity.java
com.miku.framelite.adapter.FrameBaseAdapter.java
com.miku.framelite.annotations.ViewInject.java
com.miku.framelite.api.BaseRequest.java
com.miku.framelite.api.IRequest.java
com.miku.framelite.api.RetResult.java
com.miku.framelite.api.core.Executor.java
com.miku.framelite.api.database.AbstractDatabaseRequest.java
com.miku.framelite.api.database.AbstractOrmDatabaseRequest.java
com.miku.framelite.api.database.DatabaseQueryRequest.java
com.miku.framelite.api.database.DatabaseType.java
com.miku.framelite.api.http.AbstractHttpRequest.java
com.miku.framelite.api.http.HttpStringGetRequest.java
com.miku.framelite.api.http.HttpStringPostRequest.java
com.miku.framelite.api.http.HttpType.java
com.miku.framelite.api.webservice.AbstractWebServiceRequest.java
com.miku.framelite.api.webservice.WebServiceConnectionSE.java
com.miku.framelite.api.webservice.WebServiceHttpTransportSE.java
com.miku.framelite.api.webservice.WebServiceJsonRequest.java
com.miku.framelite.api.webservice.WebServiceStringRequest.java
com.miku.framelite.httpx.IDownloadHandler.java
com.miku.framelite.httpx.IHttpX.java
com.miku.framelite.httpx.core.DownloadHandler.java
com.miku.framelite.httpx.core.HttpX.java
com.miku.framelite.services.CrashHandler.java
com.miku.framelite.utils.BitmapUtils.java
com.miku.framelite.utils.DateUtils.java
com.miku.framelite.utils.DimensionUtils.java
com.miku.framelite.utils.EncryptionUtils.java
com.miku.framelite.utils.HttpUtils.java
com.miku.framelite.utils.Log.java
com.miku.framelite.utils.TelePhoneUtils.java
com.miku.framelite.utils.ViewUtils.java