Posting XML to wmtnreceive using java HTTP connection

We are using Trading Networks for exchanging docs with our partners.
One of our partner is trying to post the data using JAVA HttpURLConnection.
However they are getting HTTP response code 401 error. The same URL when posted thru a Internet Explorer goes thru.
The java code creating the URL is as follows:
String url = “http://SBI324:123epay@172.18.100.3:8888/invoke/wm.tn/receive?%24$xmldata=”;
String value = " “<?xml><txn-status>SUCCESS</txn-status>”
String finalurl = url + URLEncoder.encode(value);

We are completely foxed with this behavior.
Looking forward to your comments

Have you checked your logs if there is anything that helps you to investigate the problem?

Harish have you got any solution for that problem
I think you need to set the userid & password in Http Request header inder “Authorization” tab …If you get resolved in any other way let me know

Thnkx
Deepak