Closed GoogleCodeExporter closed 8 years ago
This patch looks correct, the
http://wiki.developers.facebook.com/index.php/Application.getPublicInfo page
specifies that one application's info is returned, not a list.
I applied the patch to 2.0.3 and it looks fine. However, as well as the
additions
that the patch adds to the .xsd, I'd also remove the node:
<xsd:complexType name="app_info">
This complex type is not used anywhere else in the API.
Original comment by david.j....@googlemail.com
on 17 Nov 2008 at 10:39
i applied the patch.. you think it's OK? is there a unit test?
Original comment by fern...@gmail.com
on 18 Nov 2008 at 4:55
It's no problem. I have updated my local version and can provide a valid patch
with
get_app_public_info test.
Can you help me this IFacebookRestClientTest.test_dataStore and
Issue140FriendsGetJSONTest.testFriendsGetJSON? They are failure for my app.
(Should app be approved by Facebook?)
Original comment by rdmytre...@gmail.com
on 18 Nov 2008 at 9:38
Attachments:
[deleted comment]
I'm going to add a better JUnit test. Some of the tests will fail without
changing
the following method of FacebookJaxbRestClient to improve the error handling
for JAXB:
protected Object parseCallResult(InputStream data, IFacebookMethod method)
throws FacebookException, IOException {
log.debug("Facebook response: " + rawResponse);
Object res = getResponsePOJO();
if (res instanceof FacebookApiException) {
FacebookApiException error = (FacebookApiException) res;
int errorCode = error.getErrorCode();
String message = error.getErrorMsg();
throw new FacebookException(errorCode, message);
} else if (res instanceof JAXBElement) {
JAXBElement jbe = (JAXBElement) res;
if (FacebookApiException.class.equals(jbe.getDeclaredType())) {
FacebookApiException error = (FacebookApiException) jbe.getValue();
int errorCode = error.getErrorCode();
String message = error.getErrorMsg();
throw new FacebookException(errorCode, message);
}
}
return res;
}
Original comment by david.j....@googlemail.com
on 18 Nov 2008 at 10:37
I've committed the JUnit test and marked 2 of the tests with @Ignore so that the
build will work. I don't want to go committing important files like
FacebookJaxbRestClient until I have a bit more experience so I'd be grateful if
you
could review my suggested code change and uncomment the @Ignore marked tests.
The tests will be green with the changed FacebookJaxbRestClient but I just want
to be
sure I'm not screwing something else up by changing the error handling
behaviour!
Original comment by david.j....@googlemail.com
on 18 Nov 2008 at 10:57
I think it's impossible to get FacebookApiException from jaxb. it is our own
exception class and it is not declared in facebook schema.
Original comment by rdmytre...@gmail.com
on 19 Nov 2008 at 8:52
Original comment by david.j....@googlemail.com
on 19 Nov 2008 at 9:22
Oh... I made a mistake. You are right! I am sorry.
Original comment by rdmytre...@gmail.com
on 19 Nov 2008 at 9:35
i committed that change, it looks ok.
anything else you want to do for this issue?
Original comment by fern...@gmail.com
on 19 Nov 2008 at 6:28
JUnit test passes. Thanks. Issue marked as fixed.
Original comment by david.j....@googlemail.com
on 20 Nov 2008 at 9:54
Original issue reported on code.google.com by
rdmytre...@gmail.com
on 14 Oct 2008 at 10:08Attachments: