⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sampleservicesei_stub.java

📁 j2me简单实例,j2me教程加源码,希望大家喜欢
💻 JAVA
字号:
// This class was generated by 172 StubGenerator.// Contents subject to change without notice.// @generatedpackage com.j2medev.chapter10.sampleservice;import javax.xml.rpc.JAXRPCException;import javax.xml.namespace.QName;import javax.microedition.xml.rpc.Operation;import javax.microedition.xml.rpc.Type;import javax.microedition.xml.rpc.ComplexType;import javax.microedition.xml.rpc.Element;public class SampleServiceSEI_Stub implements com.j2medev.chapter10.sampleservice.SampleServiceSEI, javax.xml.rpc.Stub {	private String[] _propertyNames;	private Object[] _propertyValues;	public SampleServiceSEI_Stub() {		_propertyNames = new String[] {ENDPOINT_ADDRESS_PROPERTY};		_propertyValues = new Object[] {"http://ERIC:8080/wsapp/SampleService"};	}	public void _setProperty(String name, Object value) {		int size = _propertyNames.length;		for (int i = 0; i < size; ++i) {			if (_propertyNames[i].equals(name)) {				_propertyValues[i] = value;				return;			}		}		// Need to expand our array for a new property		String[] newPropNames = new String[size + 1];		System.arraycopy(_propertyNames, 0, newPropNames, 0, size);		_propertyNames = newPropNames;		Object[] newPropValues = new Object[size + 1];		System.arraycopy(_propertyValues, 0, newPropValues, 0, size);		_propertyValues = newPropValues;		_propertyNames[size] = name;		_propertyValues[size] = value;	}	public Object _getProperty(String name) {		for (int i = 0; i < _propertyNames.length; ++i) {			if (_propertyNames[i].equals(name)) {				return _propertyValues[i];			}		}		if (ENDPOINT_ADDRESS_PROPERTY.equals(name) || USERNAME_PROPERTY.equals(name) || PASSWORD_PROPERTY.equals(name)) {			return null;		}		if (SESSION_MAINTAIN_PROPERTY.equals(name)) {			return new java.lang.Boolean(false);		}		throw new JAXRPCException("Stub does not recognize property: "+name);	}	protected void _prepOperation(Operation op) {		for (int i = 0; i < _propertyNames.length; ++i) {			op.setProperty(_propertyNames[i], _propertyValues[i].toString());		}	}	// 	//  Begin user methods	// 	public com.j2medev.chapter10.sampleservice.Article getArticleByID(int int_1) throws java.rmi.RemoteException {		// Copy the incoming values into an Object array if needed.		Object[] inputObject = new Object[1];		inputObject[0] = new java.lang.Integer(int_1);		Operation op = Operation.newInstance(_qname_wsdl_getArticleByID, _type_getArticleByID, _type_getArticleByIDResponse);		_prepOperation(op);		op.setProperty(Operation.SOAPACTION_URI_PROPERTY, "");		Object resultObj;		try {			resultObj = op.invoke(inputObject);		} catch (JAXRPCException e) {			Throwable cause = e.getLinkedCause();			if (cause instanceof java.rmi.RemoteException) {				throw (java.rmi.RemoteException) cause;			}			throw e;		}		com.j2medev.chapter10.sampleservice.Article result;		// Convert the result into the right Java type.		// Unwrapped return value		Object[] resultObj2 = (Object[]) ((Object[])resultObj)[0];		if (resultObj2 == null) {			result = null;		} else {			result = new com.j2medev.chapter10.sampleservice.Article();			java.lang.String string;			Object contentObj = resultObj2[0];			string = (java.lang.String)contentObj;			result.setContent(string);			int a_int;			Object idObj = resultObj2[1];			a_int = ((java.lang.Integer)idObj).intValue();			result.setId(a_int);			java.lang.String string2;			Object titleObj = resultObj2[2];			string2 = (java.lang.String)titleObj;			result.setTitle(string2);		}		return result;	}	// 	//  End user methods	// 	protected static final QName _qname_content = new QName("", "content");	protected static final QName _qname_id = new QName("", "id");	protected static final QName _qname_int_1 = new QName("", "int_1");	protected static final QName _qname_result = new QName("", "result");	protected static final QName _qname_title = new QName("", "title");	protected static final QName _qname_getArticleByID = new QName("urn:SampleService/types", "getArticleByID");	protected static final QName _qname_getArticleByIDResponse = new QName("urn:SampleService/types", "getArticleByIDResponse");	protected static final QName _qname_wsdl_getArticleByID = new QName("urn:SampleService/wsdl", "getArticleByID");	protected static final Element _type_getArticleByID;	protected static final Element _type_getArticleByIDResponse;	static {		// Create all of the Type's that this stub uses, once.		Element _type_int_1;		_type_int_1 = new Element(_qname_int_1, Type.INT);		ComplexType _complexType_getArticleByID;		_complexType_getArticleByID = new ComplexType();		_complexType_getArticleByID.elements = new Element[1];		_complexType_getArticleByID.elements[0] = _type_int_1;		_type_getArticleByID = new Element(_qname_getArticleByID, _complexType_getArticleByID);		Element _type_content;		_type_content = new Element(_qname_content, Type.STRING, 1, 1, true);		Element _type_id;		_type_id = new Element(_qname_id, Type.INT);		Element _type_title;		_type_title = new Element(_qname_title, Type.STRING, 1, 1, true);		ComplexType _complexType_article;		_complexType_article = new ComplexType();		_complexType_article.elements = new Element[3];		_complexType_article.elements[0] = _type_content;		_complexType_article.elements[1] = _type_id;		_complexType_article.elements[2] = _type_title;		Element _type_result;		_type_result = new Element(_qname_result, _complexType_article, 1, 1, true);		ComplexType _complexType_getArticleByIDResponse;		_complexType_getArticleByIDResponse = new ComplexType();		_complexType_getArticleByIDResponse.elements = new Element[1];		_complexType_getArticleByIDResponse.elements[0] = _type_result;		_type_getArticleByIDResponse = new Element(_qname_getArticleByIDResponse, _complexType_getArticleByIDResponse);	}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -