Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 132953 - Twitter module is missing xml schema for its response
Twitter module is missing xml schema for its response
Status: VERIFIED FIXED
Product: webservices
Classification: Unclassified
Component: Manager
6.x
All All
: P2 (vote)
: 6.x
Assigned To: Peter Liu
issues@webservices
61fixes1-fixed
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-16 02:18 UTC by Peter Liu
Modified: 2008-06-04 08:43 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Liu 2008-04-16 02:18:40 UTC
This is a possible candidate for 6.1 patch release.
Comment 2 Peter Liu 2008-04-23 01:40:30 UTC
additional changes:

http://hg.netbeans.org/main/rev/3150765922f8
Comment 3 Lukas Jungmann 2008-04-23 13:53:31 UTC
this code:

    public static void main(String[] args) {
        try {
             String page = null;
             String format = "xml";

             RestResponse result = TwitterWhatAreYouDoingService.getFavorites(page, format);
             twitter.whatareyoudoingservice.twitterresponse.Statuses resultObj =
result.getDataAsJaxbObject(twitter.whatareyoudoingservice.twitterresponse.Statuses.class);
             //TODO - Uncomment the print Statement below to print result.
             System.out.println("The SaasService returned: "+result.getDataAsString());
        } catch (Exception ex) {
             ex.printStackTrace();
        }
    }

ends with following exception in runtime:
javax.xml.bind.UnmarshalException: unexpected element (uri:"", local:"nil-classes"). Expected elements are
<{}authorized>,<{}direct-messages>,<{}direct_message>,<{}status>,<{}statuses>,<{}user>
        at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:556)
...

it looks like the schema is incorrect...
Comment 4 Peter Liu 2008-04-23 18:33:02 UTC
The schema is correct except that twitter returns <nil-classes> when there is no data. This is really bad design on
twitter's part. They could easily return an empty <statuses/>. 

I am not sure if there is anything we can do about this. I'll try to work on a solution. However, this shouldn't stop us
from porting this to the patch release.

Comment 5 Peter Liu 2008-04-23 19:54:10 UTC
After talking to Ayub, the only way to solve this issue is to change the way we generate the code. However, we don't
think this is worth it.  Instead, we decided to log a bug against Twitter to have them fix this problem.

Lukas, I would still like have the schema ported to the patch1 release.  We can close this one and file another one
specific to the nil-classes issue. What do you think?
Comment 6 Peter Liu 2008-04-24 17:20:28 UTC
I am discussing this issue with developers on the twitter forum and so far it does seem like this is a bug, so I am
closing this issue as fixed and I'll file another issue to track the twitter bug.
Comment 7 Lukas Jungmann 2008-04-24 17:24:54 UTC
ok then
Comment 8 rbalada 2008-04-29 14:08:23 UTC
I've transplanted the changesets into release61_fixes repository

http://hg.netbeans.org/release61_fixes/rev/a1797d730df1
http://hg.netbeans.org/release61_fixes/rev/957698d805f8
http://hg.netbeans.org/release61_fixes/rev/11905f011707

changeset:   77497:a1797d730df1
user:        PeterTLiu@netbeans.org
date:        Tue Apr 22 17:01:44 2008 -0700
summary:     Fix for IZ 132953 - add response schema for twitter.

changeset:   77498:957698d805f8
user:        PeterTLiu@netbeans.org
date:        Tue Apr 22 17:08:10 2008 -0700
summary:     minor fixes for the twitter wadl.

changeset:   77499:11905f011707
tag:         tip
user:        PeterTLiu@netbeans.org
date:        Tue Apr 22 17:37:39 2008 -0700
summary:     Change type for created_at from dateTime to string.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo