473,398 Members | 2,812 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

401-Access Denied error when Axis client calling .Net service

Hi,

I'm using the following Axis java client to invoke a .Net web service hosted
my localhost. Although the username and password is set on the "call", client
gets (401) Access Denied" exception.

private static void testTest() {
try {
String endpoint = "http://localhost/WebService1/Service1.asmx";
String method = "Test";
String serviceName = "Service1";

Service service = new Service();
Call call = (Call) service.createCall();

call.setTargetEndpointAddress(new java.net.URL(endpoint));
//call.setOperationName(new QName(serviceName, method));
call.setOperationName( method );
call.setReturnType(XMLType.XSD_STRING);
call.setUsername("DOMAIN_NAME\\username");
call.setPassword("password");

String ret = (String) call.invoke( new Object [] { });

log.info("Got result : " + ret);
} catch (Exception e) {
log.error("testTest: " + e);
}

I can invoke the "Test" methods fine with IE brower. Note .Net web service
was installed and configured by someone else who isn't available.

Any suggestion is welcomed, as I'm .Net guy.

Thanks
Scott
Jun 6 '06 #1
1 2618
I'm not a .Net guy.

"Scott Yen" wrote:
Hi,

I'm using the following Axis java client to invoke a .Net web service hosted
my localhost. Although the username and password is set on the "call", client
gets (401) Access Denied" exception.

private static void testTest() {
try {
String endpoint = "http://localhost/WebService1/Service1.asmx";
String method = "Test";
String serviceName = "Service1";

Service service = new Service();
Call call = (Call) service.createCall();

call.setTargetEndpointAddress(new java.net.URL(endpoint));
//call.setOperationName(new QName(serviceName, method));
call.setOperationName( method );
call.setReturnType(XMLType.XSD_STRING);
call.setUsername("DOMAIN_NAME\\username");
call.setPassword("password");

String ret = (String) call.invoke( new Object [] { });

log.info("Got result : " + ret);
} catch (Exception e) {
log.error("testTest: " + e);
}

I can invoke the "Test" methods fine with IE brower. Note .Net web service
was installed and configured by someone else who isn't available.

Any suggestion is welcomed, as I'm .Net guy.

Thanks
Scott

Jun 6 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Josh | last post by:
I've just installed PHP on an IIS 5/W2K server. The installation was succesful, as I can load a test.php file in the first website I setup for PHP. However, the second website I setup for PHP...
2
by: Jayakumar | last post by:
Hi, I am trying to convert a word document to pdf file from java for this, I am using a asp file to convert doc file to pdf. I got it working when I put the url which has file name as the query...
2
by: SJS | last post by:
Argh! I know this is a simple problem, but I just can't find the answer. I have IIS running and can get it to display htm pages, but not ASP. I get 401.2, invalid config on server. I've run...
7
by: Dhwanil Shah | last post by:
We are trying to refuse data display to users based on some internal criteria. The site uses Basic Authentication for security. Through ASP.NET we can send a status of 401. The request to our site...
13
by: Patrick.O.Ige | last post by:
How can i get to redirect users if the get error 401.2 to another page? I guess i should be possible to do it in Global.asax? Or are there any better ways around it.. Any better solutions in...
2
by: Ken Yee | last post by:
First a little background: I've written an httphandler to handle wildcard extensions (i.e., I want to handle all URLs that come in rather than just URLs w/ a specific file extension so I can give...
0
by: tualbuquerque | last post by:
Hi, I am using XP PRo, .NET 2003 and IIS. I am getting a 401 and I 100% my authentication should be fine. Any thoughts? code======================== using System; using System.Drawing;...
0
by: Reporter | last post by:
<?php if (!isset($_SERVER)) { //header('WWW-Authenticate: Basic realm="My Realm"'); header('HTTP/1.0 401 Unauthorized'); echo 'Text to send if user hits Cancel button'; exit; } else { echo...
1
by: Reporter | last post by:
I can remove the 401 header line in the following code and it operates exactly the same. <?php if (!isset($_SERVER)) { //header('WWW-Authenticate: Basic realm="My Realm"'); header('HTTP/1.0...
0
by: Kai Kuehne | last post by:
Hi, I just wanted to mention that I wrote a patch for delicious.py 0.2.5 that solves the 401 "bug". The delicious guys changed their api to use ssl and stuff. I already sent the patch to the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.