I am working on a project with SOAP in Android Studio. I am new to SOAP and I have researched some articles. I am about to solve SOAP but I am stuck on something. I have a XML structure and I cannot get data from this XML tag. Actually I dont have any idea about the tags that start with "tem:...".
SOAP XML Tag
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
<soapenv:Header/>
<soapenv:Body>
<tem:GetForexStocksandIndexesInfo>
<tem:request>
<tem:IsIPAD>true</tem:IsIPAD>
<tem:DeviceID>test</tem:DeviceID>
<tem:DeviceType>ipad</tem:DeviceType>
<tem:RequestKey>%%UmVxdWVzdElzVmFsaWQxNjowNToyMDEyIDExOjU0%%</tem:RequestKey>
<tem:Period>Day</tem:Period>
</tem:request>
</tem:GetForexStocksandIndexesInfo>
</soapenv:Body>
</soapenv:Envelope>
And my Class to consume data
public void CallWebService() {
final Date date = new Date();
final String getCurrentDate = new SimpleDateFormat("dd:MM:yyyy HH:mm", Locale.ROOT).format(date);
Thread thread = new Thread(new Runnable() {
@Override
public void run() {
key = encryptManager.PushData("RequestIsValid" + getCurrentDate);
Log.i("Key: ", key);
key2 = sharesandIndexesListManager.PushData2("true","test","ipad",key,"Day");
Log.i("Key2: ", key2);
}
});
thread.start(); }
I see "key" var in log cause I see type of the variable in the web url but I dont see types of the variables, -for instance tem:DeviceType- in the web url. In addition Key2 returns null. Please help me:) Thanks.
And the error: org.xmlpull.v1.XmlPullParserException: unexpected type (position:END_DOCUMENT null@1:1 in java.io.InputStreamReader@21da6108)