0
도움이 필요합니다.Android 클라이언트 웹 서비스
웹 서비스에 바이트 배열과 하나의 문자열을 보내는 하나의 응용 프로그램 인 android를 개발 중입니다. 내 안드로이드 코드의
부품 :
private static final int SELECT_VIDEO = 100;
private static final String NAMESPACE = "org.me.WebService";
private static final String URL = "http://192.168.1.4:8084/MyTubeWebService/MyTubeService?wsdl";
private static final String SOAP_ACTION = "MyTubeService";
private static final String METHOD_NAME = "upArquivoVideo";
//(...)
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
SoapSerializationEnvelope envelope =
new SoapSerializationEnvelope(SoapEnvelope.VER11);
request.addProperty("arquivoVideo",video);
request.addProperty("descricao", "teste");
envelope.setOutputSoapObject(request);
HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
try {
androidHttpTransport.call(SOAP_ACTION, envelope);
//androidHttpTransport.call(NAMESPACE+"/"+METHOD_NAME,envelope);
SoapObject resultsRequestSOAP = (SoapObject) envelope.bodyIn;
text.setText("Received :" + resultsRequestSOAP.toString());
} catch (Exception e) {
e.printStackTrace();
}
및 웹 서비스 코드 :
@WebService(serviceName = "MyTubeService")
public class MyTubeService {
/**
* Operação de serviço web
*/
@WebMethod(operationName = "upArquivoVideo")
@Oneway
public void upArquivoVideo(@WebParam(name = "arquivoVideo") byte[] arquivoVideo, @WebParam(name = "descricao") String descricao) {
if (arquivoVideo.length > 0){
System.out.println("OK!");
}else{
System.out.println("Erro");
}
System.out.println("desricao = " + descricao);
}
로그 고양이 한 번에 파견 예외 소켓 시간 초과 ... 그리고 내 마지막 시험 파견에 the RuntimeException : 직렬화 할 수 없습니다
내가 뭘 잘못하고있어? 그것은 안드로이드 측면에 있습니까? 또는 웹 서비스 측면에서?