473,795 Members | 2,999 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to pass networkcredenti als in java client code for .Net web service?

1 New Member
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.Credential s = new NetworkCredenti al("administrat or", "Tech1234", "WORKGROUP" );"

I have to pass them in java code.

I have tried with
" System.setPrope rty("http.proxy User","Administ rator");
System.setPrope rty("http.proxy Password","Tech 1234");
"
But still I am getting 401 Unauthorized response.

How I can pass these credentials through a java code?

Thanks And Regards,
Amarja
Sep 2 '08 #1
3 13032
abhishekbrave
79 New Member
try this
Expand|Select|Wrap|Line Numbers
  1. HttpClient client = new HttpClient ();
  2. NTCredentials creds = new NTCredentials (user, password, machine, domain);
  3. client.getState().setProxyCredentials (AuthScope.ANY, creds);
  4. HostConfiguration config = new HostConfiguration ();
  5. config.setProxy (proxyHost, proxyPort);
  6. PostMethod post = new PostMethod (endPoint);
  7.  
it is not working in my case:( may be helpful to you...
Sep 22 '08 #2
numberwhun
3,509 Recognized Expert Moderator Specialist
I believe this to actually be a Java question and not an Apache question. For that reason, I am moving this to the Java forum.

Regards,

Jeff
Sep 24 '08 #3
Nepomuk
3,112 Recognized Expert Specialist
Hi Techmighty!
Is there a good reason, why you have different capitalisation?
"uin.Credential s = new NetworkCredenti al("administrat or", "Tech1234", "WORKGROUP" );"
...
" System.setPrope rty("http.proxy User","Administ rator");
System.setPrope rty("http.proxy Password","Tech 1234");
"
("administrator " vs. "Administrator" ) That could be your Problem.

Greetings,
Nepomuk
Sep 24 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
4465
by: Paul Hutchinson | last post by:
All, I wonder if anyone can help/advise with the following interoperability issue we are encountering? We have a .NET web service that takes an abstract type as parameter. Using it from a .net client works OK. However calling the method from a java client (Websphere 5.0) we see the following error being thrown on the call to the method.
2
2201
by: B Deepak | last post by:
Hi, I have a c# developed web service deployed on IIS. and I am accessing it thorogh java client. Now the problem is whenever we call a web method with a parameter list from java client, web service recieves this parameter as null. Waiting for a solution........... Thanks, Deepak
7
7118
by: David Laub | last post by:
I've also posted this issue to a Sun/java formum, but since it appears to be an integration issue, this may be the better place to posr: I have written a dot net/c# Web Services doesn't fully work with J2ME client a) c# web service works with c# WIndows Client (local & remote web service) b) c# web service works with J2ME client - when the Web Service is local c) c# web service fails with J2ME client - when the Web Service is remote ...
1
8130
by: Samudrala | last post by:
Hi, I have developed a web service developed in C#. the WSDL I gave is working fine with .net client. But when java client consumes it always raising exception. I have basic knowledge of java too but never worked on consuming/producing web services. can any body send sample source code for java client so that i can test my web service in java client. thanx in advance samudrala
0
2236
by: Alexiel | last post by:
Hi, i have a problem, I have a Java Client and i call my webservice on ..NET. This run perfectly just except when i send parameters don't work fine. I send my code : This is my java client.......... import java.io.*; import java.util.*;
0
1606
by: Alexiel | last post by:
Hi, i have a problem, I have a Java Client and i call my webservice on ..NET. This run perfectly just except when i send parameters don't work fine. I send my code : This is my java client..........
2
1765
by: maleone41 | last post by:
I have a C# web service running on a machine that I would like to connect to with a Java client. To verify the web service is working properly, i quickly made a C# client, added a web reference, and connected to the web service no problem. My problem is developing the Java client. I'm creating a socket and then just sending the soap requests through out.println() to the web service, but it's not working at all. Any advice?
5
4980
by: Nick K. | last post by:
I use wsdl.exe to generate client code to call a web service. The actual web service is generated with the BizTalk Web Services Publishing Wizard. I'm not sure this is particular to the BizTalk code but the calls to web methods pass parameters by ref so that I have to call it like: XmlDocument doc = new XmlDocument(); doc.LoadXml(message);
0
2443
by: Siyodia | last post by:
This is a java program which i need to run facing compilation error Its consuming a third party web service method I have the supported files(folder) which contain necessary class files org/apache/axis The following is what i need to do but am unable to do //////////////////////////////////////////////////////////////////////////////////////////// set classpath where the below jars are located.... axis.jar commons-discovery.jar
0
9673
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9522
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,...
0
10217
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10167
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
9046
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
7544
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
6784
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
5440
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...
1
4114
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

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.