0

I am using Net Beans for developing an application on S60. I made one page for user authentication and using .net wcf service to authenticate user. i am able to send data on .net service by HttpGet method but not able to get response back on java page.

I have tested it on fiddler with this url its working fine and returning response code 200, but not getting response code by java code. Following code i am using. Is some thing wrong here ?

httpConn = (HttpConnection)Connector.open(url);
httpConn.setRequestMethod(HttpConnection.GET);
httpConn.setRequestProperty("User-Agent",
"Profile/MIDP-2.1 Confirguration/CLDC-1.1");

int respCode = httpConn.getResponseCode();
Lucifer
  • 29,392
  • 25
  • 90
  • 143
Rishabh
  • 175
  • 3
  • 14
  • Are you saying that getResponseCode() never returns? – michael aubert Apr 27 '10 at 09:28
  • I am not able to get control back on the line "int respCode = httpConn.getResponseCode();" from web server. – Rishabh Apr 28 '10 at 04:32
  • can you still run a completely separate java thread while getResponseCode() is blocked? something that doesn't use any kind of GCF API. update a Canvas on the screen or a RecordStore. – michael aubert Apr 28 '10 at 11:09
  • Hi QuickRecipesOnSymbianOS, i am new in j2me development i didnt get how can i do it. basically my whole scenario is as given:-when I debug "httpConn = (HttpConnection)Connector.open(url);" line.It asks me for allow connection for this session on s60 simulator, after allowing, control is on "int respCode = httpConn.getResponseCode();" line and asks for connection with IIS server by 1 access point "winsock", after connect control goes on wcf service but never come back on client side/java page. – Rishabh Apr 29 '10 at 04:10

1 Answers1

0

try user agent "Profile/MIDP-2.1 Configuration/CLDC-1.1"

Vivart
  • 14,900
  • 6
  • 36
  • 74
  • this is just a get http request. i will suggest that use this url on your mobile web browser and see the result. sometimes in organizations, admin blocks the requests from other user agents. – Vivart Apr 27 '10 at 09:33
  • Please give me the url where i can achive the response from iis server. – Rishabh Apr 28 '10 at 04:35