안드로이드 개발 질문/답변
(글 수 45,052)
안녕하세요
구글 API를 이용하여 구글 Calendar 내용을 받아오려고 코드를 작성중입니다.
코드는 아래 참고 바랍니다.
캘린더 서비스에 접속까지는 했으나
feed를 가져오는 부분에서 ServiceException이 발생합니다.
더 구체적으로 말씀드리자면
javax.xml.parsers.ParserConfigurationException: org.xml.sax.SAXNotRecognizedException: http://xml.org/sax/features/external-parameter-entities 이 발생합니다.
이와 같은 예외사항이 발생하는 경우 어떤 사항이 원인이 될까요?
혹시 해결방법도 알려주시면 감사하겠습니다. (__)
참고로 개발OS는 Ubuntu 9.10입니다
구글 API를 이용하여 구글 Calendar 내용을 받아오려고 코드를 작성중입니다.
코드는 아래 참고 바랍니다.
캘린더 서비스에 접속까지는 했으나
feed를 가져오는 부분에서 ServiceException이 발생합니다.
더 구체적으로 말씀드리자면
javax.xml.parsers.ParserConfigurationException: org.xml.sax.SAXNotRecognizedException: http://xml.org/sax/features/external-parameter-entities 이 발생합니다.
이와 같은 예외사항이 발생하는 경우 어떤 사항이 원인이 될까요?
혹시 해결방법도 알려주시면 감사하겠습니다. (__)
참고로 개발OS는 Ubuntu 9.10입니다
package ymin.won.googletest;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import com.google.gdata.client.*;
import com.google.gdata.client.calendar.*;
import com.google.gdata.data.*;
import com.google.gdata.util.AuthenticationException;
import com.google.gdata.util.ServiceException;
import android.app.Activity;
import android.os.Bundle;
public class GoogleTestActivity extends Activity {
private static final String mLoginAddr = "??????@gmail.com";
private static final String mPassword = "?????";
CalendarService mService = null;
URL mPostURL = null;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mService = new CalendarService ("GoogleCalendarTest");
try {
mService.setUserCredentials( mLoginAddr , mPassword);
} catch (AuthenticationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
try {
mPostURL = new URL( "http://www.google.com/calendar/feeds/default/private/full" );
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Query myQuery = new Query( mPostURL);
myQuery.setFullTextQuery("test");
Feed myResultsFeed = null;
try {
myResultsFeed = mService.query( myQuery , Feed.class);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (ServiceException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
if ( myResultsFeed.getEntries().size() > 0 ){
Entry firstMatchEntry = myResultsFeed.getEntries().get(0);
}
}
}


