Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static String requestNoticias(String str, String str2, String str3) throws HttpResponseException, IOException, XmlPullParserException {
- SoapObject soapObject = new SoapObject(NAMESPACE, str);
- soapObject.addProperty(param_cantidad, str2);
- soapObject.addProperty(param_principales, str3);
- SoapSerializationEnvelope soapSerializationEnvelope = new SoapSerializationEnvelope(110);
- soapSerializationEnvelope.dotNet = true;
- soapSerializationEnvelope.setOutputSoapObject(soapObject);
- HttpTransportSE httpTransportSE = new HttpTransportSE(URL);
- httpTransportSE.debug = true;
- ArrayList arrayList = new ArrayList();
- StringBuilder sb = new StringBuilder();
- sb.append("Basic ");
- sb.append(Base64.encode(user.getBytes()));
- arrayList.add(new HeaderProperty("Authorization", sb.toString()));
- arrayList.add(new HeaderProperty("http.keepAlive", "false"));
- arrayList.add(new HeaderProperty("Accept-Encoding", "utf-8"));
- arrayList.add(new HeaderProperty("Accept-Charset", "utf-8"));
- arrayList.add(new HeaderProperty("Content-Type", "text/xml; charset=utf-8"));
- httpTransportSE.call(SOAP_ACTION, soapSerializationEnvelope, arrayList);
- String responseDump = httpTransportSE.responseDump;
- String respuesta = StringFormatter.convertStringToUTF8(responseDump);
- Log.d("response", responseDump);
- return responseDump;
- }
Add Comment
Please, Sign In to add comment