|
Hi,
I am trying to consume a java web service in c#(windows forms client not asp.net client). The wsdl file opens in inernet explorer correctly (here also I have to give my usename and password i.e. an authenctication window opens and I enter my userame and password.)
But If I try to add a web reference to the service or try to create a proxy via wsdl tool I get the "The request failed with HTTP Status 401:Unauthorized" error. I tried by supplying username,password and the domain attributes with the wsdl command, but to no use. THe WSDL coomand I am using is as follows :
wsdl /out:myproxy.cs /username:nekuma2 /password:abc123 /domain:insidelive http://tkydte3pc40441:8080/fitsl/services/SimpleFixedIncomeTokyoService?wsdl
I have been breaking my head over this for a long time. Any help would be greatly appreciated.
Regards,
Neeraj
|
|
|
|
|
Ask this in the correct forum.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
So what will be the correct forum for this?
|
|
|
|
|
"Java web service" means "Java". We have a whole freakin sub-site for java. If he doesn't want to go that far, he can try the web development form.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
John Simmons / outlaw programmer wrote: "Java web service" means "Java". We have a whole freakin sub-site for java.
Seriously, did you even read the question? He is accessing a java webservice from a C# client. A perfectly valid C# question. Not even web related.
|
|
|
|
|
newbieNeeraj wrote: /domain:insidelive
I think that will force NTLM (?) authentication, try without it.
|
|
|
|
|
Hi Leppie,
I tried without domain and it worked. Thanks for the suggestion. Though I still don't know what is NTLM authentication ( guess i'll need to read it up). SOrry for the late reply. But I didn't have access to the code at home.
Thanks again.
|
|
|
|
|
I have an MDI form and multiple child forms... If i place any controls like label, buttons or textboxes on MDI form, These controls are visible even on the child form, how do i prevent this from happening.
|
|
|
|
|
Typically, controls aren't placed on the main form in a MDI application (except maybe a MenuStrip or StatusStrip ).
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
if you have to visible that controls only when no child forms show, you can use SendToBack for that controls when child form show and assign event FormClosed for child forms to call BringToFront to show that controls again
hope it helps
dhaim
programming is a hobby that make some money as side effect
|
|
|
|
|
Hi,
I am trying to raise the events of an unmanaged ActivX control in C# Class library. My code is as follows
Inside the class I have declared a static object of the OCX
public static CtConectorXClass ctiConnecter = new CtConectorXClass();
In the constructor,
ctiConnecter.OnACSCloseStreamConf += new ICtConectorXEvents_OnACSCloseStreamConfEventHandler(ctiConnecter_OnACSCloseStreamConf);<br />
And the event handler that I need is
private void ctiConnecter_OnACSCloseStreamConf(object sender, CtConectorXControl.ICtConectorXEvents_OnACSCloseStreamConfEvent e) { }<br />
The event class is ICtConectorXEvents_OnACSCloseStreamConfEvent. But in class library project, I am not getting this class in the CtConectorXControl namespace.
In a windows project it creates an AxCtConectorXControl namespace when we add a reference and I am getting all the event classes in that namespace.
Can anybody tell me where is the problem?
Thanks
Sree
|
|
|
|
|
Hi all,
I have three byte arrays, and I want to add all of them together and make a single one. Can you tell me what's the best way to do this.
Thanks
I appreciate your help all the time...
CodingLover
|
|
|
|
|
byte[] a = new byte[2] {1, 2};
byte[] b = new byte[2] {3, 4};
byte[] c = new byte[2] {5, 6};
List<byte> d = new List<byte>();
d.AddRange(a);
d.AddRange(b);
d.AddRange(c);
byte[] newArray = d.ToArray();
|
|
|
|
|
Create a new array large enough to hold the data from the three arrays, and use the Array.Copy method to copy the data into it.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Yes, I work on it. But the question is, that way is safe. I mean may be three arrays can be large. And also in copy a bit can be shift.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
CodingLover wrote: But the question is, that way is safe. I mean may be three arrays can be large.
If you don't have enough memory for the original arrays and the combined array, you could instead make a class that contains the arrays and can be used as a single array. Someting like:
public class ArrayCombiner<T> {
private List<T[]> _arrays = new List<T[]>();
private int _length = 0;
public void Add(T[] array) {
_arrays.Add(array);
_length += array.Length;
}
public int Length { get { return _length; } }
public T this[int index] {
get {
if (index < 0 || index >= _length) {
throw new IndexOutOfRangeException();
}
int array = 0;
while (index > _arrays[array].Length) {
index -= _arrays[array].Length;
array++;
}
return _arrays[array][index];
}
}
}
CodingLover wrote: And also in copy a bit can be shift.
What?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
I am attempting to call the "ChangeDisplaySettings" function from the Win32 API which is supposed to update the display settings on the computer. It takes in a DEVMODE structure (also defined via the API) as an argument. The function is defined as:
public static extern int ChangeDisplaySettings(ref DEVMODE lpDevMode, int dwFlags);
Apparently, in C# you cannot pass the value "null" in the place of a DEVMODE because it is a nonnullable value. I am attempting to call "ChangeDisplaySettings(null, 0);" which is supposed to update the display settings strictly based on what the registry has but i get errors telling me it cannot convert "null" to a "ref DEVMODE". Does anyone know how i can either call the function in the way that i would like to in order to update the display based on the registry, or perform this same function in a different manner? Help is appreciated!!!!
THANKS!!!
-JDub
|
|
|
|
|
you can you script " " full null value
|
|
|
|
|
What do you mean by "script "" full null value"? If you dont mind, could you please provide a short example of what you mean or what i should be putting as the argument
|
|
|
|
|
Maybe something like this...
[DllImport("user32.dll")]
public static extern int ChangeDisplaySettings(ref DevMode devMode, int flags);
[DllImport("user32.dll")]
public static extern int ChangeDisplaySettings(IntPtr devMode, int flags);
...
ChangeDisplaySettings(IntPtr.Zero, 0);
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
That Worked Perfectly! I never thought about overloading the function. Thank you so much!
|
|
|
|
|
Thank you! excellent tip, that's work perfectly.
|
|
|
|
|
Just a quick overview,
I have controls which have a property of Type Type. The property grid doesn't by default support editing of it. So I have to inherit from UITypeEditor.
What my program currently does is display a form with all the types in the assembly my UITypeEditor is in and all the assemblies it references. This is not quite ideal because it should be the assembly the Form (or other control) that is being designed is in and all of it's references.
Any ideas?
Thanks in advance,
Chris
|
|
|
|
|
hi all,
i am using window.open() in C# aspx.cs the code works fine in ie6,mozilla but in ie7 and ie8 new window opens but it closes within 1 second.
here is my code.
Page.RegisterStartupScript("pop1", "window.open('" + url + "','mywindow');");
Is there any coding problem or browser ,please give some ideas regarding this.
Thanks
hivshi
|
|
|
|
|
Did you not see the ASP.NET forum ?
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|