posting twitter updates using oauth and java question

I'm trying to post to the twitter update status api using oauth and I'm getting a 401 without any other error information.  I'm posting to with a parameter of status="testing twitter!" and a access token and access secret generated by twitter/oauth.  I've tried generating new tokens both for the twitter application and the twitter user account.  I feel everything is valid, any ideas?

"<?xml version => "1.0" encoding="UTF-8"?>
  <error>Could not authenticate you.</error>

http request is:
"HTTP request => POST /1/statuses/update.xml
Content-Type: application/x-www-form-urlencoded
User-Agent: Jakarta Commons-HttpClient/3.1
Content-Length: 277


response is:
"HTTP response => HTTP/1.1 401 Unauthorized
Date: Thu, 22 Apr 2010 20:38:33 GMT
Server: hi
Status: 401 Unauthorized
WWW-Authenticate: Basic realm="Twitter API"
X-Runtime: 0.00163
Content-Type: application/xml; charset=utf-8
Content-Length: 143
Cache-Control: no-cache, max-age=1800
Set-Cookie: guest_id=127196871321167215; path=/; expires=Sat, 22 May 2010 20:38:33 GMT
Set-Cookie: _twitter_sess=BAh7CDoPY3JlYXRlZF9hdGwrCPxJPicoAToHaWQiJTg1ZjE0YzNmYjMyZjFm%250AZjM3MTdmNDM3MTAxNGEyODI5IgpmbGFzaElDOidBY3Rpb25Db250cm9sbGVy%250AOjpGbGFzaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsA--4b722ac7a438e73c757947649e1d189f1fc9f29a;; path=/
Expires: Thu, 22 Apr 2010 21:08:33 GMT
Vary: Accept-Encoding
Connection: close

<?xml version="1.0" encoding="UTF-8"?>
  <error>Could not authenticate you.</error>
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

strangely the HTTP reponse header has WWW-Authenticate: Basic realm="Twitter API",
maybe that the Twitter API asks you to Authenticate again or maybe your consumer key is wrong - i am noy sure.

to check this you may try to do a GET request using OAuth in a browser, the redirects are handled by the browser so it will be easier for your to check
cgray1223Author Commented:
The issue was I had the auth token and the token secret switched.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.