473,795 Members | 3,440 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

.NET WS client connecting to Axis WS - credentials problem

I am writing a .NET web services client that is calling an Axis web service.
I have two questions.

1. The following code should set the authentication; when I call a method
on the web service, the call fails with "bad username/password".

// wrWorkReq is the name of the service
wrWorkReq.Crede ntials = new System.Net.Netw orkCredential(" adolph.ramirez" ,
"xxx");

A developer managing the Axis side says that the server is receiving a blank
username and password, and not the populated fields they should be. Any idea
what I am doing wrong?

2. I could save time if I could debug the HTTP headers that are being sent
out. I am using VS 2005. Any suggestions on the best way to do this?

Thanks,

David
Jul 17 '06 #1
2 3574
Hi David,

That property sets the credentials for the transport (In case you are using
Http, it sets the credentials when Basic authentication or Windows
authentication is being used). In other words, as you said, adds a http
header with the credentials.
Maybe the service is being protected with the WS-Security, and they are
expecting a security header in the SOAP message. (The security header
contains a Usernametoken with user and password). In this case, you need to
add a SOAP-Header and not a Http Header.

You should first ask to the web service team whether they are using
WS-Security or not.

Regards,
Pablo Cibraro.
"David R" <Da****@discuss ions.microsoft. comwrote in message
news:CE******** *************** ***********@mic rosoft.com...
>I am writing a .NET web services client that is calling an Axis web
service.
I have two questions.

1. The following code should set the authentication; when I call a method
on the web service, the call fails with "bad username/password".

// wrWorkReq is the name of the service
wrWorkReq.Crede ntials = new System.Net.Netw orkCredential(" adolph.ramirez" ,
"xxx");

A developer managing the Axis side says that the server is receiving a
blank
username and password, and not the populated fields they should be. Any
idea
what I am doing wrong?

2. I could save time if I could debug the HTTP headers that are being sent
out. I am using VS 2005. Any suggestions on the best way to do this?

Thanks,

David

Jul 18 '06 #2
Thanks for the response. Basic authentication is being used, and since the
Axis developer said that the blank username was appearing in the http header,
then ws-security is not being used.

If I could view the header information of the request coming from my client
application (debugging on the client, not the server), using VS2005 or
something else, then I might be able to resolve the problem myself.

Thanks,

David
"Pablo Cibraro" wrote:
Hi David,

That property sets the credentials for the transport (In case you are using
Http, it sets the credentials when Basic authentication or Windows
authentication is being used). In other words, as you said, adds a http
header with the credentials.
Maybe the service is being protected with the WS-Security, and they are
expecting a security header in the SOAP message. (The security header
contains a Usernametoken with user and password). In this case, you need to
add a SOAP-Header and not a Http Header.

You should first ask to the web service team whether they are using
WS-Security or not.

Regards,
Pablo Cibraro.
"David R" <Da****@discuss ions.microsoft. comwrote in message
news:CE******** *************** ***********@mic rosoft.com...
I am writing a .NET web services client that is calling an Axis web
service.
I have two questions.

1. The following code should set the authentication; when I call a method
on the web service, the call fails with "bad username/password".

// wrWorkReq is the name of the service
wrWorkReq.Crede ntials = new System.Net.Netw orkCredential(" adolph.ramirez" ,
"xxx");

A developer managing the Axis side says that the server is receiving a
blank
username and password, and not the populated fields they should be. Any
idea
what I am doing wrong?

2. I could save time if I could debug the HTTP headers that are being sent
out. I am using VS 2005. Any suggestions on the best way to do this?

Thanks,

David


Jul 18 '06 #3

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

Similar topics

0
2206
by: Anand Natrajan | last post by:
Hi! I have a VB .NET client that is accessing an rpc/encoded service deployed in Axis 1.2. One of the operations, whoami, returns a string array. The server-side Java signature of this method is String whoami(MyPrincipal principal) My .NET client is unable to access the results of that array. The odd thing is that the very same client was able to access the results when the same service was deloyed in Axis 1.1. I've asked the Axis folks...
3
2707
by: Jacky Zhu | last post by:
Hi all, I am having a problem trying to consume a webservice that is developed on ..Net. I can access it without any problem using a .net client, but when I use a java client (based on Axis 1.1), some methods work, some don't. The error message I got is "org.apache.axis.types.URI$MalformedURIException: No scheme found in URI..."
0
2189
by: CS | last post by:
Hi I need to connect to an AXIS server using SSL. I've registered their certificate in trusted roots, added the web reference and tried both this: Dim oService As New <webservice> oService.PreAuthenticate = True oService.Credentials = New System.Net.NetworkCredential(<username>,<password>)
1
6741
by: Lakshmi | last post by:
Hi All, I am having performance issues with the .NET client calling the Java Webservice running on axis. Have detailed the problem below. Please help. I wrote a webservice in Java. Lets name this WebService1. (using Apache Axis 1.1) Scenario 1: -----------
4
3783
by: Khalique | last post by:
I have built a web service whose purpose is to copy files from a secure place to client machine and vice versa. The problem I am having is perhaps related to permissions and access rights. For testing purposes, the secure place is setup on the client machine. The client (window app) calls the web service (on a different machine) and connects successfully to the web service. However, when client calls a method that copies the file from...
1
1377
by: Cindy Lee | last post by:
I get a readtimeout error when I send a webservice over 80k. I don't think a c# string can handle that lengh, or do i need to reserve memory for it? It's not a time out error, because if I send a file that's 70k, it returns in 1-2 seconds. It's connecting to a java apache axis server, and when I use a java client, it sends the string perfectly. In my .cs file, is there another data type I should change it to, or This is my cs code
0
4533
by: karazy | last post by:
I have been reading all the forums and understand whats going wrong but am not sure how to fix it. I have written a basic doc/literal web service. But when it is called by a .net client it will return NULL. I used proxytrace to check the data that goes back and forward. I can see my request and response. See below at the bottom. I believe that this error occurs because of a problem .Net has in reading my doc/literal WSDL. Or my Axis...
0
1797
by: mrcl87 | last post by:
Ok so here is my problem... im a little new in axis so please explain as simple as possible. First an error: "This is an operation implementation gererated fault" and its generated in call.class , becouse "operation.getReturnClass() != javax.xml.soap.SOAPMessage.class" is true, (its from InvokeEngine function). I totaly dont have idea what to do. Im connecting to server, and when i try to call any function it brings me this error. I dont...
3
13032
by: Techmighty | last post by:
Hello All, I want to invoke the .Net Based webservice from a java client code using axis api. As we pass the credentials in .Net "uin.Credentials = new NetworkCredential("administrator", "Tech1234", "WORKGROUP");" I have to pass them in java code. I have tried with
0
9519
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10164
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9042
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7538
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6780
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5437
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2920
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.