my webservice is created in sap server .i want to authenticate to the server and fetch the response.while am doing am getting ORG.XML PULL PARSER EXCEPTION ..am attaching my code and wsdl file ...
thanks in advance TextView tv; private String METHOD_NAME = "ZemptrackEarnOview"; // private static final String URL = " http://76.10.226.133:8000/sap/bc/srt/rfc/sap/zemptrack_earn_oview02/800/zemptrack_earn_oview02/zemptrack_earn_oview02"; private static final String URL = " http://76.10.226.133:8000/sap/bc/srt/wsdl/bndg_E0EE4EE62A0739F19D0400221969C2CB/wsdl11/allinone/ws_policy/document?sap-client=800"; private String NAMESPACE = "urn:sap-com:document:sap:soap:functions:mc-style"; private String soapAction = ""; private AbstractHttpClient httpclient; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Log.i("one", "track"); tv = (TextView) findViewById(R.id.tv); try { UsernamePasswordCredentials creds = new UsernamePasswordCredentials("arun", "12345"); ((AbstractHttpClient) httpclient).getCredentialsProvider().setCredentials(new AuthScope(" http://76.10.226.133:8000/sap/bc/srt/rfc/sap/zemptrack_earn_oview02/800/zemptrack_earn_oview02/zemptrack_earn_oview02",8000 ),creds); } catch (Exception e) { // TODO: handle exception } try { SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); PropertyInfo propertyInfo = new PropertyInfo(); propertyInfo.setType(PropertyInfo.STRING_CLASS); propertyInfo.setName("Userid"); propertyInfo.setValue("SRINIVASUS"); request.addProperty(propertyInfo); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.dotNet = false; envelope.setOutputSoapObject(request); //envelope.getResponse(); envelope.bodyOut=request; HttpTransportSE androidHttpTransport = new HttpTransportSE(URL); androidHttpTransport.debug =true; androidHttpTransport.call(soapAction,envelope); //Object result = envelope.getResponse(); SoapPrimitive result = (SoapPrimitive)envelope.getResponse(); Log.e("httpResponse","Referral_Request" +result); System.out.println("Result : " + result.toString()); ((TextView) findViewById (R.id.tv)).setText("Tracking : "+result.toString()); } catch (Exception E) { E.printStackTrace(); ((TextView) findViewById (R.id.tv)).setText("ERROR:" + E.getClass().getName() + ":" + E.getMessage()); } } wsdl file <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_EARN_OVIEW02"> <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_EARN_OVIEW02"> - <sapsession:Session> <sapsession:enableSession>false</sapsession:enableSession> </sapsession:Session> - <sapcentraladmin:CentralAdministration wsp:Optional="true"> <sapcentraladmin:BusinessApplicationID>E050E0E32D50BFF1A3D400221969C2CB</sapcentraladmin:BusinessApplicationID> </sapcentraladmin:CentralAdministration> </wsp:Policy> - <wsp:Policy wsu:Id="OP_IF_OP_ZemptrackEarnOview"> <sapcomhnd:enableCommit>false</sapcomhnd:enableCommit> <sapblock:enableBlocking>true</sapblock:enableBlocking> <saptrhnw05:required>no</saptrhnw05:required> <saprmnw05:enableWSRM>false</saprmnw05:enableWSRM> </wsp:Policy> - <wsdl:types> - <xsd:schema attributeFormDefault="qualified" targetNamespace="urn:sap-com:document:sap:rfc:functions"> - <xsd:simpleType name="char12"> - <xsd:restriction base="xsd:string"> <xsd:maxLength value="12"/> </xsd:restriction> </xsd:simpleType> - <xsd:simpleType name="char4"> - <xsd:restriction base="xsd:string"> <xsd:maxLength value="4"/> </xsd:restriction> </xsd:simpleType> - <xsd:simpleType name="char80"> - <xsd:restriction base="xsd:string"> <xsd:maxLength value="80"/> </xsd:restriction> </xsd:simpleType> - <xsd:simpleType name="cuky5"> - <xsd:restriction base="xsd:string"> <xsd:maxLength value="5"/> </xsd:restriction> </xsd:simpleType> - <xsd:simpleType name="curr15.2"> - <xsd:restriction base="xsd:decimal"> <xsd:totalDigits value="15"/> <xsd:fractionDigits value="2"/> </xsd:restriction> </xsd:simpleType> - <xsd:simpleType name="numeric4"> - <xsd:restriction base="xsd:string"> <xsd:maxLength value="4"/> <xsd:pattern value="\d*"/> </xsd:restriction> </xsd:simpleType> </xsd:schema> - <xsd:schema attributeFormDefault="qualified" targetNamespace="urn:sap-com:document:sap:soap:functions:mc-style"> <xsd:import namespace="urn:sap-com:document:sap:rfc:functions"/> - <xsd:complexType name="ZbillStr1"> - <xsd:sequence> <xsd:element name="Name" type="n0:char80"/> <xsd:element name="MnthTotal" type="n0:curr15.2"/> <xsd:element name="Unit" type="n0:cuky5"/> <xsd:element name="Yearlist" type="tns:ZyearListTt"/> </xsd:sequence> </xsd:complexType> - <xsd:complexType name="ZyearListS"> - <xsd:sequence> <xsd:element name="Year" type="n0:numeric4"/> <xsd:element name="Monthlist" type="tns:ZmnthListTt"/> </xsd:sequence> </xsd:complexType> - <xsd:complexType name="ZmnthListS"> - <xsd:sequence> <xsd:element name="Monthno" type="n0:numeric4"/> <xsd:element name="Monthname" type="n0:char4"/> </xsd:sequence> </xsd:complexType> - <xsd:complexType name="ZbillTabType2"> - <xsd:sequence> <xsd:element name="item" type="tns:ZbillStr1" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> - <xsd:complexType name="ZyearListTt"> - <xsd:sequence> <xsd:element name="item" type="tns:ZyearListS" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> - <xsd:complexType name="ZmnthListTt"> - <xsd:sequence> <xsd:element name="item" type="tns:ZmnthListS" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> - <xsd:element name="ZemptrackEarnOview"> - <xsd:complexType> - <xsd:sequence> <xsd:element name="Userid" type="n0:char12" minOccurs="0"/> </xsd:sequence> </xsd:complexType> </xsd:element> - <xsd:element name="ZemptrackEarnOviewResponse"> - <xsd:complexType> - <xsd:sequence> <xsd:element name="NameAndMontotal" type="tns:ZbillTabType2"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema> </wsdl:types> - <wsdl:message name="ZemptrackEarnOview"> <wsdl:part name="parameters" element="tns:ZemptrackEarnOview"/> </wsdl:message> - <wsdl:message name="ZemptrackEarnOviewResponse"> <wsdl:part name="parameter" element="tns:ZemptrackEarnOviewResponse"/> </wsdl:message> - <wsdl:portType name="ZEMPTRACK_EARN_OVIEW02"> - <wsp:Policy> <wsp:PolicyReference URI="#IF_IF_ZEMPTRACK_EARN_OVIEW02"/> </wsp:Policy> - <wsdl:operation name="ZemptrackEarnOview"> - <wsp:Policy> <wsp:PolicyReference URI="#OP_IF_OP_ZemptrackEarnOview"/> </wsp:Policy> <wsdl:input message="tns:ZemptrackEarnOview"/> <wsdl:output message="tns:ZemptrackEarnOviewResponse"/> </wsdl:operation> </wsdl:portType> - <wsdl:binding name="ZEMPTRACK_EARN_OVIEW02" type="tns:ZEMPTRACK_EARN_OVIEW02"> - <wsp:Policy> <wsp:PolicyReference URI="#BN_BN_ZEMPTRACK_EARN_OVIEW02"/> </wsp:Policy> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/> - <wsdl:operation name="ZemptrackEarnOview"> <soap:operation soapAction="" style="document"/> - <wsdl:input> <soap:body use="literal"/> </wsdl:input> - <wsdl:output> <soap:body use="literal"/> </wsdl:output> </wsdl:operation> </wsdl:binding> - <wsdl:service name="service"> - <wsdl:port name="ZEMPTRACK_EARN_OVIEW02" binding="tns:ZEMPTRACK_EARN_OVIEW02"> <soap:address location=" http://Sapserver06.mouritech.solutions.local:8000/sap/bc/srt/rfc/sap/zemptrack_earn_oview02/800/zemptrack_earn_oview02/zemptrack_earn_oview02 "/> </wsdl:port> </wsdl:service> </wsdl:definitions> -- 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