问题:
java.net.ProtocolException: Does not support output
at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:1200)
at com.ls.mobile.address.service.WebService.getMobileAddress(WebService.java:28)
at com.ls.mobile.address.TestMobileAddress.testAddress(TestMobileAddress.java:14)
at java.lang.reflect.Method.invokeNative(Native Method)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154)
at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:520)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1447)
解决办法
httpConn.setDoOutput(true);
HttpURLConnection的签名setDoOutput(boolean);