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


Java SoapPrimitive类代码示例

本文整理汇总了Java中org.ksoap2.serialization.SoapPrimitive的典型用法代码示例。如果您正苦于以下问题:Java SoapPrimitive类的具体用法?Java SoapPrimitive怎么用?Java SoapPrimitive使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: Banner

import org.ksoap2.serialization.SoapPrimitive; //导入依赖的package包/类
public static String Banner(String webMethName) {
	String resTxt = null;
	// Create request
	SoapObject request = new SoapObject(NAMESPACE, webMethName);

	// 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,代码行数:27,代码来源:WebService.java

示例2: setStringValue

import org.ksoap2.serialization.SoapPrimitive; //导入依赖的package包/类
private static void setStringValue(Object originalObjec, SoapObject object, String name, Field f, boolean isAttribute) {
    try {
        SoapPrimitive trObj = isAttribute ?  (SoapPrimitive) object.getAttribute(name) : (SoapPrimitive) object.getProperty(name);
        if (trObj!=null) {
            String res = trObj.toString();
            f.set(originalObjec, res);
        }
    } catch (Exception e) {
        if (!(e instanceof ClassCastException))
            e.printStackTrace();
        try {
            f.set(originalObjec, null);
        } catch (IllegalAccessException e1) {
            e1.printStackTrace();
        }
    }
}
 
开发者ID:moltak,项目名称:Rx-Soap,代码行数:18,代码来源:SoapDeserializer.java

示例3: setBooleanValue

import org.ksoap2.serialization.SoapPrimitive; //导入依赖的package包/类
private static void setBooleanValue(Object originalObjec, SoapObject object, String name, Field f, boolean isAttribute) {
    try {
        SoapPrimitive trObj = isAttribute ?  (SoapPrimitive) object.getAttribute(name) : (SoapPrimitive) object.getProperty(name);
        if (trObj!=null) {
            boolean b = Boolean.valueOf(trObj.toString());
            f.set(originalObjec, b);
        }
    } catch (Exception e) {
        e.printStackTrace();
        try {
            f.set(originalObjec, false);
        } catch (IllegalAccessException e1) {
            e1.printStackTrace();
        }
    }
}
 
开发者ID:moltak,项目名称:Rx-Soap,代码行数:17,代码来源:SoapDeserializer.java

示例4: setDoubleValue

import org.ksoap2.serialization.SoapPrimitive; //导入依赖的package包/类
private static void setDoubleValue(Object originalObjec, SoapObject object, String name, Field f, boolean isAttribute) {
    try {
        SoapPrimitive trObj = isAttribute ?  (SoapPrimitive) object.getAttribute(name) : (SoapPrimitive) object.getProperty(name);
        if (trObj!=null) {
            double b = Double.valueOf(trObj.toString());
            f.set(originalObjec, b);
        }
    } catch (Exception e) {
        e.printStackTrace();
        try {
            f.set(originalObjec, 0);
        } catch (IllegalAccessException e1) {
            e1.printStackTrace();
        }
    }
}
 
开发者ID:moltak,项目名称:Rx-Soap,代码行数:17,代码来源:SoapDeserializer.java

示例5: setFloatValue

import org.ksoap2.serialization.SoapPrimitive; //导入依赖的package包/类
private static void setFloatValue(Object originalObjec, SoapObject object, String name, Field f, boolean isAttribute) {
    try {
        SoapPrimitive trObj = isAttribute ?  (SoapPrimitive) object.getAttribute(name) : (SoapPrimitive) object.getProperty(name);
        if (trObj!=null) {
            float b = Float.valueOf(trObj.toString());
            f.set(originalObjec, b);
        }
    } catch (Exception e) {
        e.printStackTrace();
        try {
            f.set(originalObjec, 0);
        } catch (IllegalAccessException e1) {
            e1.printStackTrace();
        }
    }
}
 
开发者ID:moltak,项目名称:Rx-Soap,代码行数:17,代码来源:SoapDeserializer.java

示例6: setIntValue

import org.ksoap2.serialization.SoapPrimitive; //导入依赖的package包/类
private static void setIntValue(Object originalObjec, SoapObject object, String name, Field f, boolean isAttribute) {
    try {
        SoapPrimitive trObj = isAttribute ?  (SoapPrimitive) object.getAttribute(name) : (SoapPrimitive) object.getProperty(name);
        if (trObj!=null) {
            int b = Integer.valueOf(trObj.toString());
            f.set(originalObjec, b);
        }
    } catch (Exception e) {
        e.printStackTrace();
        try {
            f.set(originalObjec, 0);
        } catch (IllegalAccessException e1) {
            e1.printStackTrace();
        }
    }
}
 
开发者ID:moltak,项目名称:Rx-Soap,代码行数:17,代码来源:SoapDeserializer.java

示例7: setStringValue

import org.ksoap2.serialization.SoapPrimitive; //导入依赖的package包/类
private static void setStringValue(Object originalObjec, SoapObject object, String name, Field f, boolean isAttribute) {
    try {
        SoapPrimitive trObj = isAttribute ?  (SoapPrimitive) object.getAttribute(name) : (SoapPrimitive) object.getProperty(name);
        if (trObj!=null) {
            String res = trObj.getValue().toString();
            f.set(originalObjec, res);
        }
    } catch (Exception e) {
        if (!(e instanceof ClassCastException))
            e.printStackTrace();
        try {
            f.set(originalObjec, null);
        } catch (IllegalAccessException e1) {
            e1.printStackTrace();
        }
    }
}
 
开发者ID:joaocruz04,项目名称:JSoap,代码行数:18,代码来源:SoapDeserializer.java

示例8: setBooleanValue

import org.ksoap2.serialization.SoapPrimitive; //导入依赖的package包/类
private static void setBooleanValue(Object originalObjec, SoapObject object, String name, Field f, boolean isAttribute) {
    try {
        SoapPrimitive trObj = isAttribute ?  (SoapPrimitive) object.getAttribute(name) : (SoapPrimitive) object.getProperty(name);
        if (trObj!=null) {
            boolean b = Boolean.valueOf(trObj.getValue().toString());
            f.set(originalObjec, b);
        }
    } catch (Exception e) {
        e.printStackTrace();
        try {
            f.set(originalObjec, false);
        } catch (IllegalAccessException e1) {
            e1.printStackTrace();
        }
    }
}
 
开发者ID:joaocruz04,项目名称:JSoap,代码行数:17,代码来源:SoapDeserializer.java

示例9: setDoubleValue

import org.ksoap2.serialization.SoapPrimitive; //导入依赖的package包/类
private static void setDoubleValue(Object originalObjec, SoapObject object, String name, Field f, boolean isAttribute) {
    try {
        SoapPrimitive trObj = isAttribute ?  (SoapPrimitive) object.getAttribute(name) : (SoapPrimitive) object.getProperty(name);
        if (trObj!=null) {
            double b = Double.valueOf(trObj.getValue().toString());
            f.set(originalObjec, b);
        }
    } catch (Exception e) {
        e.printStackTrace();
        try {
            f.set(originalObjec, 0);
        } catch (IllegalAccessException e1) {
            e1.printStackTrace();
        }
    }
}
 
开发者ID:joaocruz04,项目名称:JSoap,代码行数:17,代码来源:SoapDeserializer.java

示例10: setFloatValue

import org.ksoap2.serialization.SoapPrimitive; //导入依赖的package包/类
private static void setFloatValue(Object originalObjec, SoapObject object, String name, Field f, boolean isAttribute) {
    try {
        SoapPrimitive trObj = isAttribute ?  (SoapPrimitive) object.getAttribute(name) : (SoapPrimitive) object.getProperty(name);
        if (trObj!=null) {
            float b = Float.valueOf(trObj.getValue().toString());
            f.set(originalObjec, b);
        }
    } catch (Exception e) {
        e.printStackTrace();
        try {
            f.set(originalObjec, 0);
        } catch (IllegalAccessException e1) {
            e1.printStackTrace();
        }
    }
}
 
开发者ID:joaocruz04,项目名称:JSoap,代码行数:17,代码来源:SoapDeserializer.java

示例11: setIntValue

import org.ksoap2.serialization.SoapPrimitive; //导入依赖的package包/类
private static void setIntValue(Object originalObjec, SoapObject object, String name, Field f, boolean isAttribute) {
    try {
        SoapPrimitive trObj = isAttribute ?  (SoapPrimitive) object.getAttribute(name) : (SoapPrimitive) object.getProperty(name);
        if (trObj!=null) {
            int b = Integer.valueOf(trObj.getValue().toString());
            f.set(originalObjec, b);
        }
    } catch (Exception e) {
        e.printStackTrace();
        try {
            f.set(originalObjec, 0);
        } catch (IllegalAccessException e1) {
            e1.printStackTrace();
        }
    }
}
 
开发者ID:joaocruz04,项目名称:JSoap,代码行数:17,代码来源:SoapDeserializer.java

示例12: setStringValue

import org.ksoap2.serialization.SoapPrimitive; //导入依赖的package包/类
private void setStringValue(SoapObject object, String name, Field f, boolean isAttribute) {
    try {
        SoapPrimitive trObj = isAttribute ?  (SoapPrimitive) object.getAttribute(name) : (SoapPrimitive) object.getProperty(name);
        if (trObj!=null) {
            String res = trObj.getValue().toString();
            f.set(this, res);
        }
    } catch (Exception e) {
        if (!(e instanceof ClassCastException))
            e.printStackTrace();
        try {
            f.set(this, null);
        } catch (IllegalAccessException e1) {
            e1.printStackTrace();
        }
    }
}
 
开发者ID:joaocruz04,项目名称:JSoap,代码行数:18,代码来源:SOAPDeserializable.java

示例13: setBooleanValue

import org.ksoap2.serialization.SoapPrimitive; //导入依赖的package包/类
private void setBooleanValue(SoapObject object, String name, Field f, boolean isAttribute) {
    try {
        SoapPrimitive trObj = isAttribute ?  (SoapPrimitive) object.getAttribute(name) : (SoapPrimitive) object.getProperty(name);
        if (trObj!=null) {
            boolean b = Boolean.valueOf(trObj.getValue().toString());
            f.set(this, b);
        }
    } catch (Exception e) {
        e.printStackTrace();
        try {
            f.set(this, false);
        } catch (IllegalAccessException e1) {
            e1.printStackTrace();
        }
    }
}
 
开发者ID:joaocruz04,项目名称:JSoap,代码行数:17,代码来源:SOAPDeserializable.java

示例14: setDoubleValue

import org.ksoap2.serialization.SoapPrimitive; //导入依赖的package包/类
private void setDoubleValue(SoapObject object, String name, Field f, boolean isAttribute) {
    try {
        SoapPrimitive trObj = isAttribute ?  (SoapPrimitive) object.getAttribute(name) : (SoapPrimitive) object.getProperty(name);
        if (trObj!=null) {
            double b = Double.valueOf(trObj.getValue().toString());
            f.set(this, b);
        }
    } catch (Exception e) {
        e.printStackTrace();
        try {
            f.set(this, 0);
        } catch (IllegalAccessException e1) {
            e1.printStackTrace();
        }
    }
}
 
开发者ID:joaocruz04,项目名称:JSoap,代码行数:17,代码来源:SOAPDeserializable.java

示例15: setFloatValue

import org.ksoap2.serialization.SoapPrimitive; //导入依赖的package包/类
private void setFloatValue(SoapObject object, String name, Field f, boolean isAttribute) {
    try {
        SoapPrimitive trObj = isAttribute ?  (SoapPrimitive) object.getAttribute(name) : (SoapPrimitive) object.getProperty(name);
        if (trObj!=null) {
            float b = Float.valueOf(trObj.getValue().toString());
            f.set(this, b);
        }
    } catch (Exception e) {
        e.printStackTrace();
        try {
            f.set(this, 0);
        } catch (IllegalAccessException e1) {
            e1.printStackTrace();
        }
    }
}
 
开发者ID:joaocruz04,项目名称:JSoap,代码行数:17,代码来源:SOAPDeserializable.java


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