Issue 24 in android-xmlrpc: XMLRPC Fault Code

11 views
Skip to first unread message

android...@googlecode.com

unread,
Oct 16, 2010, 2:12:28 AM10/16/10
to android-x...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 24 by bhavyakilari: XMLRPC Fault Code
http://code.google.com/p/android-xmlrpc/issues/detail?id=24

I am developing an android application that handles data from XMLRPC web
services.I have successfully used web services with level1 authentication
but when I am trying to connect to level2 web services, I encounter a fault
code. How do I look at this issue? What could be the possible reasons and
how do I go about it?

android...@googlecode.com

unread,
Oct 20, 2010, 12:06:24 AM10/20/10
to android-x...@googlegroups.com

Comment #5 on issue 24 by bhavyakilari: XMLRPC Fault Code
http://code.google.com/p/android-xmlrpc/issues/detail?id=24

The XMLRPC web services I use in my application are implemented with two
levels of security. Level1 services do not need basic authentication for
retrieving data but level2 services do. I get a fault code for not being
able to implement basic authentication correctly when I try to connect to
level2 services.
For implementing basic authentication, I have an additional constructor in
XMLRPCClient.java class as follows:

public XMLRPCClient(URI uri, String username, String password) {
this(uri);
System.out.println("Extra");
((DefaultHttpClient) client).addRequestInterceptor(preemptiveAuth,
0);
((DefaultHttpClient)
client).getCredentialsProvider().setCredentials(
new AuthScope(uri.getHost(), uri.getPort(),AuthScope.ANY_REALM),
new UsernamePasswordCredentials(username, password));
}

and the following inner class:

HttpRequestInterceptor preemptiveAuth = new HttpRequestInterceptor() {

public void process(final HttpRequest request, final HttpContext
context) throws HttpException, IOException {
AuthState authState = (AuthState)
context.getAttribute(ClientContext.TARGET_AUTH_STATE);
CredentialsProvider credsProvider = (CredentialsProvider)
context.getAttribute(ClientContext.CREDS_PROVIDER);
HttpHost targetHost = (HttpHost)
context.getAttribute(ExecutionContext.HTTP_TARGET_HOST);

if (authState.getAuthScheme() == null) {
AuthScope authScope = new
AuthScope(targetHost.getHostName(), targetHost.getPort());
Credentials creds =
credsProvider.getCredentials(authScope);
if (creds != null) {
authState.setAuthScheme(new BasicScheme());
authState.setCredentials(creds);
}
}
}
};

I am still unable to manage to crack the level2 services. It gives a
security fault code. Do I need something more in the code?

android...@googlecode.com

unread,
Nov 19, 2010, 11:33:46 AM11/19/10
to android-x...@googlegroups.com
Updates:
Labels: Usability

Comment #6 on issue 24 by j...@sprig.gs: XMLRPC Fault Code
http://code.google.com/p/android-xmlrpc/issues/detail?id=24

Hi Bhavyakilari,

Sorry, this dropped completely off my radar, I'm following up with a few of
these issues now.

You said there are "level1" and "level2" security levels - do these both
use the same URL (is one http://xmlrpc.example.com and the other
https://xmlrpc.example.com, or is one http://xmlrpc.example.com and the
other http://username:pass...@xmlrpc.example.com, or, is it a combination
of both)?

Do you get an error from the Java side of things, or is there an HTTP
error, and if so, do you know what the HTTP error is (is it 404, 500, or
something else)?

android...@googlecode.com

unread,
Feb 22, 2013, 3:38:06 AM2/22/13
to android-x...@googlegroups.com

Comment #7 on issue 24 by a...@india.biztechconsultancy.com: XMLRPC Fault
Code
http://code.google.com/p/android-xmlrpc/issues/detail?id=24

Hello

I am using XMLRPC for android to fetch data from magento server.
It works fine for retrieving customer , product list.
But I am facing problem while fetching products information as well as
address information.
I am using customer_address.info and catalog_product.info respectively.

The code which I have tried is as follow.

[code]
//For address of customer
Object[] addressInfo=(Object[])
client.call("call",session,"customer_address.info","customerid");

//For product Info
Object[] productsGroupList = (Object[])
client.call("call",session,"catalog_product.info",product_id);

[/code]

Thanks and waiting for your reply

Amit Thakkar

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
Reply all
Reply to author
Forward
0 new messages