Re: [android-developers] soap webservice(xml pull parser exception )
Thanks for reply I done the debugging in this line am getting problem androidHttpTransport.call(SOAP_ACTION, envelope); In my url soapAction= is given like this..but i find in the google soapAction willbe in the form(saopAction=NAMESPACE/METHODNAME) does this is the problem or soapAction can also be defined like (soapAction= ) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] soap webservice(xml pull parser exception )
On Sat, Oct 29, 2011 at 3:13 AM, arun kumar arun.kata...@gmail.com wrote: Hi , am getting xml pull parser exception while consuming webservice from the sap server...PLZ any one tell me where am making the mistake.thanks in advance Debug your app and the data you're trying to parse - no one here is going to wade through your code to fix your problem for you. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] soap webservice(xml pull parser exception )
[image: In new window] [image: Print all] [image: Expand all] [image: Collapse all] [image: More]| Hi , am getting xml pull parser exception while consuming webservice from the sap server...PLZ any one tell me where am making the mistake.thanks in advance static StringBuilder sb; private static final String SOAP_ACTION = urn:sap-com:document:sap:soap:functions:mc-style/zemptrack_overview; private static final String METHOD_NAME = zemptrack_overview; private static final String NAMESPACE = urn:sap-com:document:sap:soap:functions:mc-style; private static String URL = http://tracking.dataaccess.eu/sap/bc/srt/wsdl/bndg_9ADFF19D0400221969C2CB/wsdl11/allinone/ws_policy/document ; TextView usernameEditText; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); final String username = arun; final String password = arun; Authenticator.setDefault(new Authenticator() { protected PasswordAuthentication getPasswordAuthentication() { PasswordAuthentication pa = new PasswordAuthentication (username, password.toCharArray()); return pa; } }); BufferedReader in = null; StringBuffer sb = new StringBuffer(); try { URL url = new URL(URL); URLConnection connection = url.openConnection(); in = new BufferedReader(new InputStreamReader(connection .getInputStream())); String line; while ((line = in.readLine()) != null) { sb.append(line); } } catch (java.net.ProtocolException e) { sb.append(User Or Password is wrong!); e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (in != null) { in.close(); } } catch (Exception e) { System.out.println(Exception); } } System.out.println(The Data is: + sb.toString()); Log.i(first, track); final TextView usernameEditText = (TextView) findViewById(R.id.textView1); final SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); // request.addProperty(ZemptrackEarnOview, lblResult); request.addProperty(Userid,SRINIS); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); System.out.println(hell) ; envelope.dotNet = true; envelope.setOutputSoapObject(request); HttpTransportSE androidHttpTransport = new HttpTransportSE(URL); try { Log.i(fourth, track); androidHttpTransport.call(SOAP_ACTION, envelope); androidHttpTransport.debug = true; SoapObject response = (SoapObject)envelope.getResponse(); Log.i(third, track); int MnthTotal = Integer.parseInt(response.toString()); String Name = response.toString(); Log.i(second, track); return; } catch (XmlPullParserException ex) { ex.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } } } -- wsdl:definitions targetNamespace=urn:sap-com:document:sap:soap:functions:mc-style wsdl:documentation sidl:sidl/ /wsdl:documentation wsp:UsingPolicy wsdl:required=true/ wsp:Policy wsu:Id=BN_BN_zemptrack_overview saptrnbnd:OptimizedXMLTransfer uri= http://xml.sap.com/2006/11/esi/esp/binxml; wsp:Optional=true/ saptrnbnd:OptimizedXMLTransfer uri= http://www.w3.org/2004/08/soap/features/http-optimization; wsp:Optional=true/ wsp:ExactlyOne wsp:All sp:TransportBinding wsp:Policy - sp:TransportToken - wsp:Policy sp:HttpsToken/ /wsp:Policy /sp:TransportToken - sp:AlgorithmSuite - wsp:Policy sp:TripleDesRsa15/ /wsp:Policy /sp:AlgorithmSuite - sp:Layout - wsp:Policy sp:Strict/ /wsp:Policy /sp:Layout /wsp:Policy /sp:TransportBinding /wsp:All /wsp:ExactlyOne /wsp:Policy - wsp:Policy wsu:Id=IF_IF_zemptrack_overview - sapsession:Session sapsession:enableSessionfalse/sapsession:enableSession /sapsession:Session - sapcentraladmin:CentralAdministration wsp:Optional=true
[android-developers] soap webservice(xml pull parser exception )
Hi , am getting xml pull parser exception while consuming webservice from the sap server...PLZ any one tell me where am making the mistake.thanks in advance static StringBuilder sb; private static final String SOAP_ACTION = urn:sap-com:document:sap:soap:functions:mc-style/zemptrack_overview; private static final String METHOD_NAME = zemptrack_overview; private static final String NAMESPACE = urn:sap-com:document:sap:soap:functions:mc-style; private static String URL = http://tracking.dataaccess.eu/sap/bc/srt/wsdl/bndg_9ADFF19D0400221969C2CB/wsdl11/allinone/ws_policy/document ; TextView usernameEditText; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); final String username = arun; final String password = arun; Authenticator.setDefault(new Authenticator() { protected PasswordAuthentication getPasswordAuthentication() { PasswordAuthentication pa = new PasswordAuthentication (username, password.toCharArray()); return pa; } }); BufferedReader in = null; StringBuffer sb = new StringBuffer(); try { URL url = new URL(URL); URLConnection connection = url.openConnection(); in = new BufferedReader(new InputStreamReader(connection .getInputStream())); String line; while ((line = in.readLine()) != null) { sb.append(line); } } catch (java.net.ProtocolException e) { sb.append(User Or Password is wrong!); e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (in != null) { in.close(); } } catch (Exception e) { System.out.println(Exception); } } System.out.println(The Data is: + sb.toString()); Log.i(first, track); final TextView usernameEditText = (TextView) findViewById(R.id.textView1); final SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); // request.addProperty(ZemptrackEarnOview, lblResult); request.addProperty(Userid,SRINIS); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); System.out.println(hell) ; envelope.dotNet = true; envelope.setOutputSoapObject(request); HttpTransportSE androidHttpTransport = new HttpTransportSE(URL); try { Log.i(fourth, track); androidHttpTransport.call(SOAP_ACTION, envelope); androidHttpTransport.debug = true; SoapObject response = (SoapObject)envelope.getResponse(); Log.i(third, track); int MnthTotal = Integer.parseInt(response.toString()); String Name = response.toString(); Log.i(second, track); return; } catch (XmlPullParserException ex) { ex.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } } } -- wsdl:definitions targetNamespace=urn:sap-com:document:sap:soap:functions:mc-style wsdl:documentation sidl:sidl/ /wsdl:documentation wsp:UsingPolicy wsdl:required=true/ wsp:Policy wsu:Id=BN_BN_zemptrack_overview saptrnbnd:OptimizedXMLTransfer uri= http://xml.sap.com/2006/11/esi/esp/binxml; wsp:Optional=true/ saptrnbnd:OptimizedXMLTransfer uri= http://www.w3.org/2004/08/soap/features/http-optimization; wsp:Optional=true/ wsp:ExactlyOne wsp:All sp:TransportBinding wsp:Policy - sp:TransportToken - wsp:Policy sp:HttpsToken/ /wsp:Policy /sp:TransportToken - sp:AlgorithmSuite - wsp:Policy sp:TripleDesRsa15/ /wsp:Policy /sp:AlgorithmSuite - sp:Layout - wsp:Policy sp:Strict/ /wsp:Policy /sp:Layout /wsp:Policy /sp:TransportBinding /wsp:All /wsp:ExactlyOne /wsp:Policy - wsp:Policy wsu:Id=IF_IF_zemptrack_overview - sapsession:Session sapsession:enableSessionfalse/sapsession:enableSession /sapsession:Session - sapcentraladmin:CentralAdministration wsp:Optional=true sapcentraladmin:BusinessApplicationIDE0503D400221969C2CB/sapcentraladmin:BusinessApplicationID /sapcentraladmin:CentralAdministration /wsp:Policy - wsp:Policy