Hi there,

I'm new to this.
This is my code:

        public static void main(String[] args) {

                GoogleBaseService service = new GoogleBaseService("Google-
Tutorial-1.0");
                try {
                        service.setUserCredentials(myusername, mypassword);
                } catch (AuthenticationException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                }

                GoogleBaseEntry entry = new GoogleBaseEntry();
                entry.setTitle(TextConstruct.create(TextConstruct.Type.TEXT, 
"Fujio
Mitarai Canon Inc.", null));
                entry.setContent(TextConstruct.create(TextConstruct.Type.TEXT, 
"The
corporate philosophy of Canon is kyosei. A concise definition of this
word would be \"Living and working together for the common good,\" but
our definition is broader: \"All people, regardless of race, religion
or culture, harmoniously living and working together into the future.
\" Unfortunately, the presence of imbalances in our world in such
areas as trade, income levels and the environment hinders the
achievement of kyosei. Addressing these imbalances is an ongoing
mission, and Canon is do ...", null));
                entry.getGoogleBaseAttributes().setItemType("personals");
                entry.getGoogleBaseAttributes().addTextAttribute("gender", 
"male");

                try {
                        GoogleBaseEntry asInserted = service.insert
(FeedURLFactory.getDefault().getItemsFeedURL(), entry);
                        URL myEntryId = new URL(asInserted.getId());
                        System.out.println(myEntryId.toString());

                } catch (IOException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                } catch (ServiceException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                        System.err.println("error: " + e.getMessage());

                        ServiceErrors errors = new ServiceErrors(e);
                        for (ServiceError error : errors.getAllErrors()) {
                                String scope;
                                if (error.getField() != null) {
                                        scope = error.getField();
                                } else {
                                        scope = "global error";
                                }
                                System.err.println(scope + ": " + 
error.getReason());
                        }
                }
        }


Every time I execute my code I get this error:

com.google.gdata.util.ResourceNotFoundException: Not Found
<errors>
<error type="request" reason="Service not found"/>
</errors>

        at com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse
(HttpGDataRequest.java:500)
        at com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse
(GoogleGDataRequest.java:562)
        at com.google.gdata.client.http.HttpGDataRequest.checkResponse
(HttpGDataRequest.java:481)
        at com.google.gdata.client.http.HttpGDataRequest.execute
(HttpGDataRequest.java:460)
        at com.google.gdata.client.http.GoogleGDataRequest.execute
(GoogleGDataRequest.java:534)
        at com.google.gdata.client.Service.insert(Service.java:1243)
        at com.google.gdata.client.GoogleService.insert(GoogleService.java:
561)
        at com.google.gdata.client.media.MediaService.insert
(MediaService.java:337)
        at com.google.api.gbase.client.GoogleBaseService.insert
(GoogleBaseService.java:409)
        at com.nterra.tkosmos.google.GoogleBaseTest.main(GoogleBaseTest.java:
84)
error: Not Found
global error: Service not found

What am I doing wrong?

Thanks in advance.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Base Data API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Base-data-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to