Click here to Skip to main content
12,398,000 members (46,363 online)
Rate this:
 
Please Sign up or sign in to vote.
//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 12-Feb-13 0:00am
Updated 12-Feb-13 0:05am
Maciej Los221.8K
v3
Comments
Maciej Los 12-Feb-13 6:06am
   
And the question is...
Guirec Le Bars 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

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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

diffgram must be null... I don't see any "diffgram" prooerty in your wsdl either..

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160721.1 | Last Updated 12 Feb 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100