Java getInputStream 400 errors -


When I contact the web service using the Java HTTRL connection, it only gives 400 bad requests (IOexception). How do I get XML information returning the server; It does not appear in the getErrorStream of the connection nor the exception is in notice.

When I run the following PHP code against a web service:

  & lt ;? Php $ ch = curl_init (); Curl_setopt ($ CH, CURLOPT_URL, "https://www.myclientaddress.com/here/"); Curl_setopt ($ CH, CURLOPT_RETURNTRANSFER, 1); Curl_setopt ($ CH, CURLOPT_POST, 1); Curl_setopt ($ CH, CURLOPT_POSTFIELDS, "Username = Ted and Password = Schuckler & amp; Type = Consumer & ID = 123456789 and Zip = 12345"); $ Result = curl_xac ($ CH); $ Return result; ? & Gt;  

It gives the following:

   Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Feedback & gt; & Lt; Status & gt; Failure & lt; / Status & gt; & Lt; Errors & gt; & Lt; Error Name = "RES_ZIP" & gt; Zip code is not valid. & Lt; / Error & gt; & Lt; Error Name = "Zip" & gt; Invalid zip code for home address & Lt; / Error & gt; & Lt; / Errors & gt; & Lt; / Reaction & gt;  

So I know that information is present

Answer here Found:

Yes I!


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -