Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Invalid DATASET responce

Status
Not open for further replies.

botatun

Programmer
Mar 7, 2006
40
US
I try to sent online request to get some data.
This is what I sent:
type="extra" id="password">Xxxxx</DATA><DATA type="email">mycustomer@aol.com</DATA></DATASET>
I've got a responce:
<DATASET><TYPE>error</TYPE><DATA>Invalid DATASET</DATA></DATASET>
If I use this string on IE, it return my data without a problem.
This is how I send it:
URL url = new URL(sQry);
HttpURLConnection urlConn;
DataOutputStream printout;
BufferedReader input;

urlConn =(HttpURLConnection)url.openConnection();
urlConn.setDoInput(true);
urlConn.setDoOutput(true);
urlConn.setUseCaches(true);

System.out.println("Qry ==>\n" + sQry);

input = new BufferedReader(new InputStreamReader(urlConn.getInputStream()));

String resp = null;
while( null != ((resp = input.readLine())))
sResponse = resp;
input.close ();
What am I doing wrong?
 
Your URL uses https but I don't see any credentials being passed"
Please, tell me what do you mean? I am not familiar with it.
My other requests to that site work fine.
 
You're using HttpURLConnection
You should try using HttpsURLConnection

That way then you can set credentials for the secure connection.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top