|
Hmmm...looks like I might be able to implement IXmlSerializable and have it return the exact schema. I'm going to check that out...
I, for one, do not think the problem was that the band was down. I think that the problem may have been that there was a Stonehenge monument on the stage that was in danger of being crushed by a dwarf.
-David St. Hubbins
|
|
|
|
|
Well just in case someone's following my rambling...
I hate when I figure something out minutes after I posted .
I spent the most of the day going down the wrong path with all the attributes available for classes that control how XML serialization works. It would appear that at the end of the day, you're better off just going ahead and implementing IXmlSerializable yourself and saving yourself a lot of headaches.
I now need to make sure the proxy generators handle this type of WSDL properly (I doubt classes will enforce restrictions, but at least I'm putting it out there as a "contract" for clients). If the proxy generators (one in IDE and WSDL.exe if nothing else) handle this properly, then I should be set.
I, for one, do not think the problem was that the band was down. I think that the problem may have been that there was a Stonehenge monument on the stage that was in danger of being crushed by a dwarf.
-David St. Hubbins
|
|
|
|
|
There's a ton of attributes you can use to control a lot of this, although I'm not sure about the regex, and don't remember ever seeing anything like this - but you shouldn't rely stricly on WSDL schema validation since some clients may not do that. Always check params going into your code, so you ultimately control what goes in and out of your methods!
First, there's the attributes in the System.Xml.Serialization namespace, like the XmlRootAttribute and XmlElementAttribute that have an IsNullable property you can set to false . There's also many advanced usage attributes in System.Web.Services.Protocols that let you control the input and output of SOAP and help in the documentation generation for the WSDL, such as using different readers and writers for the generation using the HttpMethodAttribute .
You should use these when you can because it ultimately gives you more control over SOAP and WSDL, and IXmlSerialization is not supposed to be used from your code which means it could change at any time without notice (but I must confess I've used it a few times here and there! ).
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
I know that the web services don't do any sort of validation, and that I'll have to create a handler to do the validation in any event. I just want WSDL that makes sense and is tight as possible, but I'm starting to think that getting it as tight as I would like will be impossible (I'm a big fan of very explicit "contracts").
Implementing IXmlSerializable made the proxy generator (IDE and WSDL.exe) fail to generate anything for data types I tried to define myself. That means we'd have to give them assemblies for those classes or they'd have to write their own class. So I think going the attributes route is definitely the way to go again, and I'll just have to not expect too much from the WSDL . I actually didn't even notice the IXmlSerializable interface was not supposed to be used. I saw the suggestion in a post (and if I remember correctly it was from a MS VIP or a MS employee). You're right though, it shouldn't really be used.
I missed that IsNullable property. A co-worker claims to have used that and still gets a "minOccurs=0", but I'll check that out in any case.
Thanks for the help!
I, for one, do not think the problem was that the band was down. I think that the problem may have been that there was a Stonehenge monument on the stage that was in danger of being crushed by a dwarf.
-David St. Hubbins
|
|
|
|
|
I've spent a week on making COM+ ManagementTool displaying COM+ Catalog Infomation using COMAdminCatalogCollection. Most of infomation I'd like to
find was in COMAdminCatalogCollection.
But I couldn't find a way of retrieving imfomation of state of Object activated. I'd like to know how many Object is Activated as if I see the COM+ Management Tool provided in Windows 2003.
Please,Help me.
Any idea will be helpful.
kim
|
|
|
|
|
This is not a C# question. Please ask in the C/C++ or COM/ATL forums.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Currently I'm using C# language to do this work.
Is it not related to C# Question?
|
|
|
|
|
Technically not, if you're using an interop assembly to get information for the catalog. You might be using the C# language, but the question has more to do with the COM+ classes and class interfaces. If you were using a class in the .NET base class library, this would be a different matter. Since you're not, you'll find it beneficial to NOT mention which language you're using (with your problem, it's not important) and mention that you're trying to get the status for COM+ objects in the catalog. This would most likely be answered in the COM forum.
No offense is meant, just that this really isn't the right forum for a COM+-related issue.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Thank you for helping me.
I just wanted to know which forum is right for my question.
Once again....Thank you.
|
|
|
|
|
Hi All,
How do u assign a xml Schema that you created to a datatable in a dataset?
thanks,
JJ
|
|
|
|
|
So what I need is in code form, I have created an an Xml Scheme file and I want to assign it to a dataset that I create in code but don't know the right way to assign one to the other?
Thanks,
JJ
|
|
|
|
|
I'm guessing your problem is very similar to the one I was asking about above that's regarding the automatic WSDL generation for an XML web service.
In your particular case, I think you should look at creating a class derived from your base class (DataTable or maybe one for the entire DataSet?) and then implement IXmlSerializable. One of the method allows you to return an XmlSchema, which you can read from a file (or from an assembly using reflection, which is what I normally do).
I, for one, do not think the problem was that the band was down. I think that the problem may have been that there was a Stonehenge monument on the stage that was in danger of being crushed by a dwarf.
-David St. Hubbins
|
|
|
|
|
Ah alittle bit more simpler in my case. Basically I created the XML Scheme in the Schema designer then I assigned the Schema to the dataset.
DataSet ds = new DataSet();
ds.ReadXMLScheme("xsdfile.xsd");
Then I create a datarow from dataset and Add record to dataset.
Works very nicely !
JJ
|
|
|
|
|
First, the schema must conform to a DataSet -like structure, consiting of 2 to 3 levels of elements. If you use VS.NET, you can add a new DataSet item to your project (Add->Add New Item->DataSet) and design it easily like that. If you already have an XML Schema, you can use the xsd.exe /d to generate the class. This will generate a strong-typed DataSet where you can refer to the tables, columns, relationships (if you used the right namespaces, which is why it's also easier to use the VS.NET DataSet designer), etc., by name.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
i downloaded the source files and every time i try to compile them i keep getting these wird error messages can you please tell me how to compile them and in all other ways help me, HELP ME!
|
|
|
|
|
BP128 wrote:
i downloaded the source files
What source files?
BP128 wrote:
i keep getting these wird error messages
Can you be more specific? What is weird about the messages?
--Colin Mackay--
EuroCPian Spring 2004 Get Together[^]
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
|
|
|
|
|
Missing Diagnostics File And Some Other Things To Do With The Code
|
|
|
|
|
You're going to have to be much more specific if you want anyone to help you.
What code did you download? Can you cut and paste the error from the compiler (I assume you're using VS.NET?).
I, for one, do not think the problem was that the band was down. I think that the problem may have been that there was a Stonehenge monument on the stage that was in danger of being crushed by a dwarf.
-David St. Hubbins
|
|
|
|
|
Sorry I Am New To This, the first 1 is The Diagnostics File Does not Exist the other 1 is cannot generate the makefile
|
|
|
|
|
Can't generate the makefile?
Are you sure this is C#?
I, for one, do not think the problem was that the band was down. I think that the problem may have been that there was a Stonehenge monument on the stage that was in danger of being crushed by a dwarf.
-David St. Hubbins
|
|
|
|
|
yes i am i got it of a magzine (it is c#) it is called lccwin32
|
|
|
|
|
Just took a look at the LCC Win32 website.
Since the Win32 version of LCC was started in 1999, it runs on Windows 95, and the changelog on his website mentions specific .H files he fixed, it would seem impossible for it to be C#.
I'm guessing it's C++ or straight C (the product in question is a C compiler).
If the files end in .cpp or .cxx, it's almost certainly C++. If the files end in .c, then it's straight C.
If you have some files that end in .cs, then it's probably C#.
I, for one, do not think the problem was that the band was down. I think that the problem may have been that there was a Stonehenge monument on the stage that was in danger of being crushed by a dwarf.
-David St. Hubbins
|
|
|
|
|
|
Can any1 tell me where to get the c# tool (if it is not free where i can get a free trial if there is 1
:zzz
|
|
|
|
|
This isn't going to solve your problem. You can't compile C/C++ code with the C# compiler! It's not just another language but a language that targets a completely different runtime! Learn the basics of programming first.
The .NET Framework is available from http://msdn.microsoft.com/netframework/[^]. Make sure you actually READ the documentation first - especially the "Getting Started" topics - before jumping into anything.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|