当前位置: 首页>>代码示例>>Java>>正文


Java PropertyInfo.setValue方法代码示例

本文整理汇总了Java中org.ksoap2.serialization.PropertyInfo.setValue方法的典型用法代码示例。如果您正苦于以下问题:Java PropertyInfo.setValue方法的具体用法?Java PropertyInfo.setValue怎么用?Java PropertyInfo.setValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.ksoap2.serialization.PropertyInfo的用法示例。


在下文中一共展示了PropertyInfo.setValue方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createRequestParameter

import org.ksoap2.serialization.PropertyInfo; //导入方法依赖的package包/类
SoapObject createRequestParameter(String code, String methodName){
	SoapObject request = new SoapObject(NAMESPACE, methodName);
	PropertyInfo name = new PropertyInfo();
    name.setNamespace(NAMESPACE);
    name.setName("numer");
    name.setValue(code);
    name.setType(String.class);
    request.addProperty(name);
    
    return request;
}
 
开发者ID:mmprog,项目名称:wspocztapolska,代码行数:12,代码来源:WSPoczta.java

示例2: doInBackground

import org.ksoap2.serialization.PropertyInfo; //导入方法依赖的package包/类
@Override
protected Integer doInBackground(Integer... arg0) {
	Integer result = null;
	//Creamos un objeto para la peticion
	SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
	//A�adimos los parametros
	PropertyInfo param1 = new PropertyInfo();
	param1.setName("a");
	param1.setValue(arg0[0]);
	PropertyInfo param2 = new PropertyInfo();
	param2.setName("b");
	param2.setValue(arg0[1]);
	request.addProperty(param1);
	request.addProperty(param2);
	//Creamos el mensaje a enviar
	SoapSerializationEnvelope env = new SoapSerializationEnvelope(SoapSerializationEnvelope.VER11);
	env.setOutputSoapObject(request);
	//Cliente HTTP que usaremos
	HttpTransportSE http = new HttpTransportSE(URL);
	try {
		//LLamada al web service
		http.call(NAMESPACE+METHOD_NAME, env);
		//REcogida del resultado
		SoapPrimitive prim = (SoapPrimitive) env.getResponse();
		result = Integer.valueOf(prim.toString());
	} catch (Exception e) {
		e.printStackTrace();
	}
	return result;
}
 
开发者ID:zerasul,项目名称:betabeers29nov,代码行数:31,代码来源:AsyncSoapCall.java

示例3: FCommitFlight

import org.ksoap2.serialization.PropertyInfo; //导入方法依赖的package包/类
public Boolean FCommitFlight(String szAuthToken, LogbookEntry le, PostingOptions po, Context c) {
    SoapObject Request = setMethod("CommitFlightWithOptions");
    Request.addProperty("szAuthUserToken", szAuthToken);
    PropertyInfo piLe = new PropertyInfo();
    PropertyInfo pipo = new PropertyInfo();
    piLe.name = "le";
    piLe.type = "LogbookEntry";
    piLe.setValue(le);
    piLe.namespace = NAMESPACE;
    pipo.name = "po";
    pipo.type = "PostingOptions";
    pipo.setValue(po);
    pipo.namespace = NAMESPACE;
    Request.addProperty(piLe);
    Request.addProperty(pipo);

    // The date of flight is done in local time; need to convert it to
    // a UTC time that looks like the correct local time so that it records
    // correctly over the wire (same as in iPhone version.

    // save the date, since we're making a live copy
    Date dtSave = le.dtFlight;

    le.dtFlight = MFBUtil.UTCDateFromLocalDate(le.dtFlight);

    if (le.rgFlightImages == null)
        le.getImagesForFlight();

    MFBImageInfo[] rgmfbii = le.rgFlightImages;

    if (rgmfbii == null)
        throw new NullPointerException("le.rgFlightImages is null");

    le.rgFlightImages = new MFBImageInfo[0];
    SoapObject result = (SoapObject) Invoke(c);

    if (result == null) {
        le.rgFlightImages = rgmfbii; // restore the images.
        setLastError("Failed to save flight - " + getLastError());
    } else {
        try {
            LogbookEntry leReturn = new LogbookEntry();
            leReturn.FromProperties(result);
            le.szError = leReturn.szError;

            int iImg = 1;
            for (MFBImageInfo mfbii : rgmfbii) {
                String szFmtUploadProgress = c.getString(R.string.prgUploadingImages);
                String szStatus = String.format(szFmtUploadProgress, iImg, rgmfbii.length);
                if (m_Progress != null)
                    m_Progress.NotifyProgress((iImg * 100) / rgmfbii.length, szStatus);
                // skip anything that is already on the server.
                if (!mfbii.IsOnServer()) {
                    mfbii.setKey(leReturn.idFlight);
                    mfbii.UploadPendingImage(mfbii.getID(), c);
                }
                iImg++;
            }
            le.DeletePendingImagesForFlight();
        } catch (Exception e) {
            setLastError(getLastError() + e.getMessage());
        }
    }

    le.dtFlight = dtSave;

    le.szError = getLastError();
    return getLastError().length() == 0;
}
 
开发者ID:ericberman,项目名称:MyFlightbookAndroid,代码行数:70,代码来源:CommitFlightSvc.java

示例4: doInBackground

import org.ksoap2.serialization.PropertyInfo; //导入方法依赖的package包/类
@Override
protected Void doInBackground(String... params) {

    SoapObject soapObject = new SoapObject(NAMESPACE, METHOD_NAME);

    PropertyInfo propertyInfo = new PropertyInfo();
    propertyInfo.setName("strPrijemniBroj");
    propertyInfo.setValue(params[0]);
    propertyInfo.setType(String.class);

    soapObject.addProperty(propertyInfo);

    SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER12);
    envelope.setOutputSoapObject(soapObject);
    envelope.dotNet = true;

    HttpTransportSE httpTransportSE = new HttpTransportSE(URL);

    try {
        httpTransportSE.call(SOAP_ACTION, envelope);
        SoapObject res = (SoapObject) envelope.getResponse();

        PropertyInfo diffGram = res.getPropertyInfo(1);
        SoapObject anyType = (SoapObject) diffGram.getValue();
        PropertyInfo documentElement = anyType.getPropertyInfo(0);
        SoapObject anyType2 = (SoapObject) documentElement.getValue();

        for (int i = 0; i < anyType2.getPropertyCount(); i++) {
            PropertyInfo tableName = anyType2.getPropertyInfo(i);
            SoapObject anyType3 = (SoapObject) tableName.getValue();
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
            SimpleDateFormat output = new SimpleDateFormat("HH:mm:ss dd/MM/yyyy");
            Date d = sdf.parse(anyType3.getPropertyInfo(5).getValue().toString());
            String formattedTime = output.format(d);

            messages.add(new StatusMessage(formattedTime,
                    anyType3.getPropertyInfo(1).getValue().toString(),
                    anyType3.getPropertyInfo(2).getValue().toString(),
                    anyType3.getPropertyInfo(7).getValue().toString(),
                    anyType3.getPropertyInfo(4).getValue().toString()
                    ));
        }

    } catch (Exception e) {

    }

    return null;
}
 
开发者ID:vualeks,项目名称:PostarV2,代码行数:50,代码来源:StatusActivity.java

示例5: ChkAct

import org.ksoap2.serialization.PropertyInfo; //导入方法依赖的package包/类
public static String ChkAct(String ActId, String Tel, String webMethName) {
	String resTxt = null;
	// Create request
	SoapObject request = new SoapObject(NAMESPACE, webMethName);
	// Property which holds input parameters
	PropertyInfo id = new PropertyInfo();
	// Set Name
	id.setName("ActId");
	// Set Value
	id.setValue(ActId);
	// Set dataType
	id.setType(String.class);
	// Add the property to request object
	request.addProperty(id);

	// Property which holds input parameters
	PropertyInfo telphone = new PropertyInfo();
	// Set Name
	telphone.setName("Tel");
	// Set Value
	telphone.setValue(Tel);
	// Set dataType
	telphone.setType(String.class);
	// Add the property to request object
	request.addProperty(telphone);

	// Create envelope
	SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
	envelope.dotNet = true;
	// Set output SOAP object
	envelope.setOutputSoapObject(request);
	// Create HTTP call object
	HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
	try {
		// Invole web service
		androidHttpTransport.call(SOAP_ACTION + webMethName, envelope);
		// Get the response
		SoapPrimitive response = (SoapPrimitive) envelope.getResponse();
		// Assign it to fahren static variable
		resTxt = response.toString();

	} catch (Exception e) {
		e.printStackTrace();
		resTxt = "Error occured";
	}
	return resTxt;
}
 
开发者ID:devonEdison,项目名称:videoMerge,代码行数:48,代码来源:WebService.java

示例6: buildPropertyInfo

import org.ksoap2.serialization.PropertyInfo; //导入方法依赖的package包/类
private PropertyInfo buildPropertyInfo(String name, KvmSerializable val) {
    PropertyInfo propertyInfo = new PropertyInfo();
    propertyInfo.setName(name);
    propertyInfo.setValue(val);
    propertyInfo.setType(val.getClass());
    return propertyInfo;
}
 
开发者ID:prashant31191,项目名称:meets-android,代码行数:8,代码来源:SoapApiMethod.java

示例7: doInBackground

import org.ksoap2.serialization.PropertyInfo; //导入方法依赖的package包/类
@Override
protected Integer doInBackground(PostParcel... params) {

    parcel = params[0];

    SoapObject soapObject = new SoapObject(NAMESPACE, METHOD_NAME);

    PropertyInfo propertyInfo = new PropertyInfo();
    propertyInfo.setName("strPrijemniBroj");
    propertyInfo.setValue(params[0].getParcelNo());
    propertyInfo.setType(String.class);

    soapObject.addProperty(propertyInfo);

    SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER12);
    envelope.setOutputSoapObject(soapObject);
    envelope.dotNet = true;

    HttpTransportSE httpTransportSE = new HttpTransportSE(URL);

    try {
        httpTransportSE.call(SOAP_ACTION, envelope);
        SoapObject res = (SoapObject) envelope.getResponse();

        PropertyInfo diffGram = res.getPropertyInfo(1);
        SoapObject anyType = (SoapObject) diffGram.getValue();
        PropertyInfo documentElement = anyType.getPropertyInfo(0);
        SoapObject anyType2 = (SoapObject) documentElement.getValue();

        return anyType2.getPropertyCount();

    } catch (Exception e) {

    }

    return 0;
}
 
开发者ID:vualeks,项目名称:PostarV2,代码行数:38,代码来源:LocalService.java


注:本文中的org.ksoap2.serialization.PropertyInfo.setValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。