*
Hi for .net webservices (currency converter and temperature converter) am
able to get response using the below code .But for the webservice which are
generated from SAP am not getting the response .am getting this error.

11-11 09:55:13.113: WARN/System.err(272):
org.xmlpull.v1.XmlPullParserException: expected: START_TAG {
http://schemas.xmlsoap.org/soap/envelope/}Envelope (position:START_TAG
<html>@1:6 in java.io.InputStreamReader@44e9e580)

while debugging am getting struck in the line

androidHttpTransport.call(SOAP_ACTION, envelope);

so can any one having idea how to consume webservice which are generated
from sap ....plz share with me








public* *class* EmployeeTracking *extends* Activity {
TextView tv;
*private* String METHOD_NAME = "ZemptrackEarnOview"; //
*public* *final* String SOAP_ACTION ="";
*private* String NAMESPACE =
"urn:sap-com:document:sap:soap:functions:mc-style";
*

private* *static* *final* String *URL* = "myurl";

/** Called when the activity is first created. */
@Override
*public* *void* onCreate(Bundle savedInstanceState) {
*super*.onCreate(savedInstanceState);
setContentView(R.layout.*main*);
String Username = "username";
String Password = "12345";
Log.*i*("one", "track");
tv = (TextView) findViewById(R.id.*tv*);

*try* {
AuthScope as = *new* AuthScope(host, 8000);
UsernamePasswordCredentials upc = *new* UsernamePasswordCredentials(
Username, Password);
((AbstractHttpClient) httpclient).getCredentialsProvider().setCredentials(as,
upc);
} *catch* (Exception e) {
// *TODO*: handle exception
}
Log.*i*("two", "track");
*try*
**{
SoapObject request = *new* SoapObject(NAMESPACE, METHOD_NAME);
Log.*i*("three", "track");
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.bodyOut=request;
HttpTransportSE androidHttpTransport = *new* HttpTransportSE(*URL*);
androidHttpTransport.debug =*true*;
Log.*i*("five", "track");
// Log.i("demo", demo);
androidHttpTransport.call(SOAP_ACTION, envelope);
//Object result = envelope.getResponse();
SoapPrimitive result = (SoapPrimitive)envelope.getResponse();
Log.*e*("httpResponse","Referral_Request" +result);
Log.*i*("six", "track");
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="service location"/ <http://%22/>>
</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

Reply via email to