|
thanks this should work perfectly.
|
|
|
|
|
I have to access the .net web service methods using java as a client. I am using SOAP API to do this. I do not have any problems when the return type from web service is a simple string, int or arrays.
But my .net web service is returning an object of a particular Class that java does not know about. How can I make java understand the return type and access the object being returned from web service?
Thanks in advance.
|
|
|
|
|
Hello i am trying to use TLS session on normal port (110 for pop and 143 for imap).It got stuck while giving command "STARTTLS" for IMAP OR "STLS" for POP.
i run under telnet session:
C: Client
S: Server
C:Tetlnet server 143
C: a001 CAPABILITY
S: * CAPABILITY IMAP4rev1 STARTTLS
S: a001 OK CAPABILITY completed
C: a002 STARTTLS
S: a002 OK Begin TLS negotiation now
it got stuck here
actuall it should display following respose:
"TLS negotiation, further commands are under TLS layer"
Same for POP commands
Ant help on this would be great help.
Is it something to do with server configuration or imap server limitations.?
I creating c# code based on this.
regards,
Uhs
urvishshelat@yahoo.co.in
Uhs
urvishshelat@yahoo.co.in
-- modified at 10:06 Wednesday 28th June, 2006
|
|
|
|
|
Hi champs!
I'm wondering what I'm doing wrong here. I've created an XmlDocument, added a couple of Nodes to it and called Save(). A while after that, I want to delete the file again, but I get an Exception telling me that the file specified cannot be deleted because it is beeing used by another thread.
XmlDocument xml = new XmlDocument();
xml.Save(@"C:\temp\fun.xml");
System.IO.File.Delete(@"C:\temp\fun.xml");
Can anyone help? Thanks a ton in advance!
/matthias
I love deadlines. I like the whooshing sound they make as they fly by. [Douglas Adams]
|
|
|
|
|
Are you sure you are using that overload of Save , or are you really using one that takes a Stream which you have not Dispose d of?
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
Hi J4amieC,
thanks for your reply. I'm using exactly this overload. Should I use a Stream instead? Or is there an easier way?
Thanks again!
/matthias
I love deadlines. I like the whooshing sound they make as they fly by. [Douglas Adams]
|
|
|
|
|
You could try this:
using System.IO;<br />
<br />
XmlDocument xml = new XmlDocument();<br />
<br />
using(FileStream fileStream = File.OpenWrite(@"C:\temp\fun.xml"));<br />
{<br />
xml.Save(fileStream);<br />
fileStream.Close();<br />
}<br />
File.Delete(@"C:\temp\fun.xml");
Im not sure that will remidy the situation - that would depend whether it was actually the call to Save(string) that is locking the file or something else.
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
I am doing somewhat similar. I was just opening the XML document and appending the elements to it and saving it. I just tried the delete part after saving and it works for me. Below is the code:
XmlDocument oXmlDocument = new XmlDocument();
oXmlDocument.Load( "C:\\TestXML.xml" ); // load xml file
// adding elements and attributes to XML file
// save the changes to the file
oXmlDocument.Save(m_relativePath+"\\TestXML.xml");
// I do not need this but just tried this part
File.Delete("C:\\TestXML.xml");
It works fine.
Hope it helps you in some way.
|
|
|
|
|
This should work!!
XmlDocument xmldoc = new XmlDocument();<br />
xmldoc.Load(@".\ConfigurationXML.xml");<br />
...do some operation<br />
xmldoc.Save(@".\ConfigurationXML.xml");<br />
<br />
xmldoc = null;<br />
<br />
File.Delete(".\\ConfigurationXML.xml");
|
|
|
|
|
Lot of thanks to you. All solved now!
/matthias
I love deadlines. I like the whooshing sound they make as they fly by. [Douglas Adams]
|
|
|
|
|
Does anyone know if the main programming language for windows Vista is C# and if the Windows Vista is based of .Net Framework 3.0 or it has its own Api and if not is there going to be any windows that will be based completely on .Net Framework?
I just want to know the future of C#, C++, and .Net Framework(winfx)!?
Sojaner!
|
|
|
|
|
WinFX is a set of windows libraries in managed APIs. This is a key feature in Vista development and has been renamed to .Net 3.0. There is no "main programming language". The closest thing to an all .Net framework-based OS is Singularity[^].
Logifusion[^]
|
|
|
|
|
So you mean, Microsoft is still working on the unmanaged c++ libraries to develop the next version of its OS and the WinFX is still a key feature?! But is visual c++ going to be there in next Visual Studio version or not, I'm a C# developer and I don't know the C++ language, I've tried to learn but because I learnt C# first and I'm really comfortable with it, I could not continue learning C++, so I'm trying to understand if C# is going to take the place of Visual C++ ro not, and if the microsoft going to plane its OS based on the managed code or not! Because somewhere, that I cann't find the url right now, I read that the next Visual C++ would not include the ATL and MFC templates, and without them C# is really a nicer language than the C++ I think!
And so because of all these I'm looking for the future!
Sojaner!
|
|
|
|
|
I think that C++ will be around for a while because of driver development. I am not sure that you can write a video driver in C# for Vista. You need low level access to things and since that means C/C++ that will probably not go away.
Steve Maier, MCSD MCAD
|
|
|
|
|
Acording to fat_boy, most driver work is still done in plain C because there's less chance for abstraction to do something undesired behind the scenes.
|
|
|
|
|
When I wrote printer drivers we did them in C++. And we even shared some of the code and data with Mac drivers that we wrote too.
Steve Maier, MCSD MCAD
|
|
|
|
|
Well, I can understand them wanting to remove ATL and MFC. But an unmanaged development language is still needed. Which means C++ will be around for a long time.
Logifusion[^]
|
|
|
|
|
Game development will insure that. All about performance and C++ is fast. Especially with embeded assembly language.
Try code model generation tools at BoneSoft.com.
|
|
|
|
|
I totally agree on the assembly language issue, but I thought that there was a managed DirectX in C#. Don't you think this will take over in game development in the next few years?
Besides, I thought that managed code should be faster than unmanaged C++ code due to the "just in time" compilation thing!! I aven't read much about it, any ideas??
Also, why don't we combine the power of C++ into C#? Inline assembly, low level API & hardware access?? We could even make a managed assembly integrated into C# compiler?? why not?
Personally, I'm willing to contribute -as much as I can- to any project that combines these 3 languages -C#, C++, & Assembly- together. With the ease of C#, & power of C++, & assembly, programming will be a game.;)
|
|
|
|
|
Oh yeah, DirectX 9.0 has managed classes. But I don't expect the gaming industry to pounce on it anytime soon. I think they are a little set in their ways, and JIT compiling is slower than unmanaged code. Java is a HUGE testament to that. And technically, though it may be small now, object oriented language tend to loose some performace in the trade off with better organization. More procedural programming is faster, because instructions are right there. It's a horible way to organize code, but it's faster.
I'd love to see the Gaming industry move to C#, then I might have a fighting chance in hell of getting into it. Until then, I'll have to restrict mine gaming fun to killin brown people in BattleField2. (No offence to brown people that may be reading )
Try code model generation tools at BoneSoft.com.
|
|
|
|
|
Nader Elshehabi wrote: I totally agree on the assembly language issue, but I thought that there was a managed DirectX in C#. Don't you think this will take over in game development in the next few years?
No. The need for an occasional full garbage collect on a gig of memory will kill gaming uses, because stopping for a second or three is completely unacceptable.
|
|
|
|
|
I am attempting to access functions from an unmanaged C DLL. One of these is generating an Unhandled Exception: "attempt to read or write protected memory".
I have examples similar to mine on the web, all of which come down to the need for manual intervention in Marshaling. However, the function causing the problem for me returns void, and I can find no examples which deal with this case. Is this because I am barking up the wrong tree?
DLL function prototype:
<br />
void GetRNGstate(void);<br />
C# Code:
<br />
class TestLink<br />
{<br />
[DllImport("X.dll")]<br />
[return: MarshalAs(UnmanagedType.IUknown)]<br />
public static extern void GetRNGstate();<br />
<br />
...<br />
<br />
static void Main()<br />
{<br />
<br />
GetRNGstate();
<br />
...<br />
}<br />
}<br />
Any assistance appreciated.
|
|
|
|
|
Hi!
At first I have to say that I'm not that expert, but some experiences:
I sometimes face the same problem, and when I search for the answer, I get the point: I just assigned or passed the wrong type of arguments or didn't pass the necessary arguments, as you said the function prototype is like this:
void GetRNGstate(void);
so I think you should do this:
[DllImport("X.dll")]
public static extern void GetRNGstate(delegate yourDelegate);
There is a really useful tool that I sometimes use and will help you undrestand how to use DllImport method and attribute (It uses windows API): ApiViewer 2004
Forgive me if I'm wrong! But just test it!
Sojaner!
|
|
|
|
|
farquem8 wrote: [return: MarshalAs(UnmanagedType.IUknown)]
Remove that!
|
|
|
|
|
Do you mean what I told is that wrong that should be removed?
Sojaner!
|
|
|
|