Click here to Skip to main content
15,883,925 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Java
//error:java.lang.RuntimeException: illegal property: NewDataSet
//(Line no.50)
//.net webservice and ksoap2 used (plz help :))

package com.hoteljobs;
import java.util.ArrayList;
import java.util.HashMap;

import org.ksoap2.SoapEnvelope;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapSerializationEnvelope;
import org.ksoap2.transport.AndroidHttpTransport;

import android.util.Log;
public class Businesslogic_GetEdu {	
	final static String JobSeekerID = "JobSeekerID";
	final static String UgQualificationID = "UgQualificationID";
	final static String UgSpecialization = "UgSpecialization";
	final static String UgInstituteID = "UgInstituteID";
	final static String PgQualificationID = "PgQualificationID";
	final static String PgSpecialization = "PgSpecialization";
	final static String PgInstituteID = "PgInstituteID"; 
	final static String DeplomaName = "DeplomaName";
	final static String InstitutionName = "InstitutionName"; 
 	final static String InstitutionName1 = "InstitutionName1";
	final static String QualificationName = "QualificationName"; 
	final static String QualificationName1 = "QualificationName1";
	public static ArrayList<hashmap><string,string>>  XMLparser_Edu_details(String JobSeekerName) {		
		ArrayList<hashmap><string,>> user_list = new ArrayList<hashmap><string,>>();
		SoapObject newob = null;
		final String METHOD_NAME = "Educational_Details";		
		final String SOAP_ACTION = "http://tempuri.org/Educational_Details";
		final String NAMESPACE = "http://tempuri.org/";
		final String URL = "http://hoteljob.wisknowtech.com/Get_Education.asmx";				
		try
		{
			Object response;
			SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
			envelope.encodingStyle = SoapEnvelope.ENC;
			SoapObject Request = new SoapObject(NAMESPACE , METHOD_NAME);			
			Request.addProperty("JobSeekerName", JobSeekerName); 			
			envelope.dotNet = true;
			envelope.setOutputSoapObject(Request);
			AndroidHttpTransport httptransport ;
			httptransport = new AndroidHttpTransport(URL);						
			httptransport.debug=true;		    
			try
			{				
				httptransport.call(SOAP_ACTION,envelope);				
				response = envelope.getResponse();				
				newob = (SoapObject)envelope.bodyIn;												
				SoapObject diettype_listResult = (SoapObject) newob.getProperty("Educational_DetailsResult") ;				
				SoapObject diffgram = (SoapObject) diettype_listResult.getProperty("diffgram") ;				
				SoapObject NewDataSet = (SoapObject) diffgram.getProperty("NewDataSet") ;				
				int totalrest=NewDataSet.getPropertyCount();				
				Log.i("Manish","totalrest:"+totalrest);
				int i=0;
				for(i=0;i<totalrest;i++)>
				{				
				Log.i("Manish","inner for i="+i);
				HashMap<string,> userprofilelist=new HashMap<string,>();
				SoapObject Table = (SoapObject) NewDataSet.getProperty(i);
				//userprofilelist.put(JobSeekerID, Table.getProperty("JobSeekerID").toString());				
				userprofilelist.put(UgQualificationID, Table.getProperty("UgQualificationID").toString());				
				userprofilelist.put(UgSpecialization, Table.getProperty("UgSpecialization").toString());				
				userprofilelist.put(UgInstituteID, Table.getProperty("UgInstituteID").toString());				
				userprofilelist.put(PgQualificationID, Table.getProperty("PgQualificationID").toString());				
				userprofilelist.put(PgSpecialization, Table.getProperty("PgSpecialization").toString());				
				userprofilelist.put(PgInstituteID, Table.getProperty("PgInstituteID").toString());				
				userprofilelist.put(DeplomaName, Table.getProperty("DeplomaName").toString());				
				userprofilelist.put(QualificationName, Table.getProperty("QualificationName").toString());				
				//userprofilelist.put(QualificationName1, Table.getProperty("QualificationName1").toString());
				userprofilelist.put(InstitutionName, Table.getProperty("InstitutionName").toString());				
				//userprofilelist.put(InstitutionName1, Table.getProperty("InstitutionName1").toString());
				user_list.add(userprofilelist);					
				Log.i("manish","Successful Education Detail");				
			    }															
			 }
			catch (Exception e) {
				Log.i("manish","inner catch");
			       e.printStackTrace();
				System.out.println("error:" + e);
			}              
		}
		catch (Exception e) {
			Log.i("manish","outer catch");		
		}
		return user_list;
	}
}</hashmap></hashmap></hashmap>
Posted
Updated 12-Feb-13 0:05am
v3
Comments
Maciej Los 12-Feb-13 6:06am    
And the question is...
Guirec 12-Feb-13 6:06am    
Do you suggest we count the lines ?
Manish Yadav 12-Feb-13 6:29am    
SoapObject NewDataSet = (SoapObject) diffgram.getProperty("NewDataSet") ;

is having the problem
kk555 3-Sep-15 9:30am    
Hi Manish i have the same problem can you plz post the solution

1 solution

Looking here http://hoteljob.wisknowtech.com/Get_Education.asmx?WSDL[^] It seems that the property you are looking for is called "DataSet" not "NewDataSet"...
 
Share this answer
 
Comments
Manish Yadav 12-Feb-13 6:31am    
I have tried with both from the morning itself but not resolved (plz help me)
Guirec 12-Feb-13 17:36pm    
diffgram.getProperty("NewDataSet") ;

diffgram must be null... I don't see any "diffgram" prooerty in your wsdl either..
congdongdientu. com 27-Aug-17 10:54am    
Can you explain more that ?
I have same error:
FATAL EXCEPTION
illegal property: NewDataSet

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900