我使用MyEclipse建立了一个webService工程下面是 ?wsdl文件
但是我发现里面并没有参数什么的,于是我发现了?xsd=1的页面
<?xml version="1.0" encoding="UTF-8" ?> 
- <!--  Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.3-hudson-390-. 
  --> 
- <!--  Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.3-hudson-390-. 
  --> 
- <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://biz/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ServiceMainService" targetNamespace="http://biz/">
- <types>
- <xsd:schema>
  <xsd:import namespace="http://biz/" schemaLocation="http://192.168.1.100:8080/ServiceOfProject/ServiceMainPort?xsd=1" /> 
  </xsd:schema>
  </types>
- <message name="selectSQL">
  <part element="tns:selectSQL" name="parameters" /> 
  </message>
- <message name="selectSQLResponse">
  <part element="tns:selectSQLResponse" name="parameters" /> 
  </message>
- <portType name="ServiceMainDelegate">
- <operation name="selectSQL">
  <input message="tns:selectSQL" /> 
  <output message="tns:selectSQLResponse" /> 
  </operation>
  </portType>
- <binding name="ServiceMainPortBinding" type="tns:ServiceMainDelegate">
  <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> 
- <operation name="selectSQL">
  <soap:operation soapAction="" /> 
- <input>
  <soap:body use="literal" /> 
  </input>
- <output>
  <soap:body use="literal" /> 
  </output>
  </operation>
  </binding>
- <service name="ServiceMainService">
- <port binding="tns:ServiceMainPortBinding" name="ServiceMainPort">
  <soap:address location="http://192.168.1.100:8080/ServiceOfProject/ServiceMainPort" /> 
  </port>
  </service>
  </definitions>
?xsd=1的页面  <?xml version="1.0" encoding="UTF-8" ?> 
- <!--  Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.3-hudson-390-. 
  --> 
- <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://biz/" targetNamespace="http://biz/" version="1.0">
  <xs:element name="selectSQL" type="tns:selectSQL" /> 
  <xs:element name="selectSQLResponse" type="tns:selectSQLResponse" /> 
- <xs:complexType name="selectSQL">
- <xs:sequence>
  <xs:element minOccurs="0" name="arg0" type="xs:string" /> 
  <xs:element minOccurs="0" name="arg1" type="xs:string" /> 
  </xs:sequence>
  </xs:complexType>
- <xs:complexType name="selectSQLResponse">
- <xs:sequence>
  <xs:element minOccurs="0" name="return" type="tns:gatherStore" /> 
  </xs:sequence>
  </xs:complexType>
- <xs:complexType name="gatherStore">
- <xs:sequence>
  <xs:element minOccurs="0" name="address" type="xs:string" /> 
  <xs:element minOccurs="0" name="ID" type="xs:string" /> 
  </xs:sequence>
  </xs:complexType
下面是eclipse的android代码
package com.bix;
import java.io.IOException;import org.ksoap2.SoapEnvelope;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapSerializationEnvelope;
import org.ksoap2.transport.HttpTransportSE;
import org.xmlpull.v1.XmlPullParserException;import dao.gather_Store;import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class SqlTempActivity extends Activity {
String s1,s2;
TextView tv1,tv2;
private static String URL = "http://192.168.1.100:8080/ServiceOfProject/ServiceMainPort";
private static String NAMESPACE = "http://biz/";
private static String METHOD_NAME = "selectSQL";

public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
tv1 = (TextView)findViewById(R.id.textView1);
tv2 = (TextView)findViewById(R.id.textView2);
SoapObject request  = new SoapObject(NAMESPACE, METHOD_NAME);
request.addProperty("arg0", "YH2010111009253721");
request.addProperty("arg1", "系统管理员");
SoapSerializationEnvelope see = new SoapSerializationEnvelope(SoapEnvelope.VER11);
see.bodyOut = request;
HttpTransportSE aht = new HttpTransportSE(URL);
try {
aht.call(null, see);
SoapObject o= (SoapObject)see.bodyIn;
gather_Store gs = (gather_Store)o.getProperty("return");
tv1.setText(gs.getID());
tv2.setText(gs.getAddress());
} catch (IOException e) {
e.printStackTrace();
} catch (XmlPullParserException e) {
e.printStackTrace();
}
}
}我设置断点,在aht.call(null,see);的时候就会跳入异常……求高人查问题……