Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
M

Marcus Spitzmiller

@Marcus Spitzmiller
About
Posts
115
Topics
40
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • calling a web service at runtime
    M Marcus Spitzmiller

    Hey there, everyone. I'm a long time member, but my responsibilities don't get me into code too often...so, please go easy on me :-D I'm using .Net 4.0, WCF and my goal is to call a webservice - one that is not known at compile time. Now I know that during development, I can right click > Add Service Reference, but that's not what I'm looking for..again the web service won't be known at compile time. So, I've made it as far as to dynamically call a webservice and import all its contracts via the code below (taken from MSDN). And from that I can see all the different web service methods that are available in my webservice (in the string sWSDL at the very top). My question, then: How can I call this web service? I understand the definition, but I don't understand how to invoke it. Any help would be much appreciated.

    MetadataExchangeClient mexClient = new MetadataExchangeClient(new Uri(sWSDL), MetadataExchangeClientMode.HttpGet);
    mexClient.ResolveMetadataReferences = true;
    MetadataSet metaDocs = mexClient.GetMetadata();

            WsdlImporter importer = new WsdlImporter(metaDocs);
            ServiceContractGenerator generator = new ServiceContractGenerator();
    
            // Add our custom DCAnnotationSurrogate 
            // to write XSD annotations into the comments.
            object dataContractImporter;
            XsdDataContractImporter xsdDCImporter;
            if (!importer.State.TryGetValue(typeof(XsdDataContractImporter), out dataContractImporter))
            {
                Console.WriteLine("Couldn't find the XsdDataContractImporter! Adding custom importer.");
                xsdDCImporter = new XsdDataContractImporter();
                xsdDCImporter.Options = new ImportOptions();
                importer.State.Add(typeof(XsdDataContractImporter), xsdDCImporter);
            }
            else
            {
                xsdDCImporter = (XsdDataContractImporter)dataContractImporter;
                if (xsdDCImporter.Options == null)
                {
                    Console.WriteLine("There were no ImportOptions on the importer.");
                    xsdDCImporter.Options = new ImportOptions();
                }
            }
            
            //xsdDCImporter.Options.DataContractSurrogate = new DCAnnotationSurrogate();????
    
            // Uncomment the following code if you are going to do your work programmatically rather than add 
            // the WsdlDocumentationImporters through a configuration
    
    C# question csharp wcf help tutorial

  • SSIS Question
    M Marcus Spitzmiller

    Thanks for the help!

    Marcus Spitzmiller You will never hear me say, "I listen to pretty much everything." That is for people who don't care what goes in their ears.

    Database question sql-server

  • SSIS Question
    M Marcus Spitzmiller

    Hope this is the right place - is anyone using SSIS here? Let's say I have an input source which gives me a column of data that I'm interested in. Before inserting this data into my target, I need a couple of additional columns added to this data. One column is a sequence, 1, 2, 3, etc.. and the second column is a literal string. I'm pretty new to SSIS and I'm having some trouble getting off the ground. Can anyone point me in the right direction? Thanks! Marcus

    Marcus Spitzmiller You will never hear me say, "I listen to pretty much everything." That is for people who don't care what goes in their ears.

    Database question sql-server

  • mmorpg suggestions?
    M Marcus Spitzmiller

    Thank you! I'll keep that in mind. Also, I saw that it costs about $20 to get started, but I couldn't find the monthly charge. Any idea what that might be? This looks pretty amazing...

    Marcus Spitzmiller You will never hear me say, "I listen to pretty much everything." That is for people who don't care what goes in their ears.

    The Lounge question

  • mmorpg suggestions?
    M Marcus Spitzmiller

    awesome - thanks!

    Marcus Spitzmiller You will never hear me say, "I listen to pretty much everything." That is for people who don't care what goes in their ears.

    The Lounge question

  • mmorpg suggestions?
    M Marcus Spitzmiller

    I am way out of touch with this sort of thing, but I decided that given it's very unlikely I'll be travelling to any distant planets anytime soon, I thought maybe the next best thing would be to try out one of those space themed mmorpgs. I guess in my head it would be something where I could fly around and visit different planets/galaxies, etc..wow - I think I just earned an extra nerd badge for this post. Anyway, suggestions?

    Marcus Spitzmiller You will never hear me say, "I listen to pretty much everything." That is for people who don't care what goes in their ears.

    The Lounge question

  • SQL Server text column question
    M Marcus Spitzmiller

    Thanks, that works. - Apparently I didn't look hard enough. I guess I didn't realize that substring existed. I tried substr and when that didn't work, I guess I thought that that function didn't exist. Thanks again!

    Marcus Spitzmiller You will never hear me say, "I listen to pretty much everything." That is for people who don't care what goes in their ears.

    Database question database sql-server sysadmin help

  • SQL Server text column question
    M Marcus Spitzmiller

    I guess I misunderstood the suggestion. However, I did: select cast(NOTE as varchar(16349)) as NOTE from S_NOTE_ACCNT WHERE datalength(NOTE) > 16349 and I get: The size (16349) given to the type 'varchar' exceeds the maximum allowed for any data type (8000). So really, I need to trim the field to 16349, but apparently I can't this way...any thoughts?

    Marcus Spitzmiller You will never hear me say, "I listen to pretty much everything." That is for people who don't care what goes in their ears.

    Database question database sql-server sysadmin help

  • SQL Server text column question
    M Marcus Spitzmiller

    No - it'll still ultimately reside in the same column - I just need to trim it. any thoughts?

    Marcus Spitzmiller You will never hear me say, "I listen to pretty much everything." That is for people who don't care what goes in their ears.

    Database question database sql-server sysadmin help

  • SQL Server text column question
    M Marcus Spitzmiller

    Hi - I just have a general SQL server question I'm hoping someone can help answer. I have a table with a column of datatype TEXT called NOTE. I am trying to trim those records in the text field to say, 10000 characters where datalength(NOTE) > 10000. for example, normally i would do something like 'update notetable set note = LEFT(note, 10000) where length(note) > 10000', but of course i can't do this with this datatype. This datatype is a pain..Does anyone know the syntax for this? Thanks!

    Marcus Spitzmiller You will never hear me say, "I listen to pretty much everything." That is for people who don't care what goes in their ears.

    Database question database sql-server sysadmin help

  • CreateObject vs. New ActiveXObject
    M Marcus Spitzmiller

    Well - I'm not sure exactly where this question belongs, but I'll try here first. I've got a control inside a dll called pRaiseBox.dll - created in VB6. Originally, this control was called by a Win32 VB app using the createobject method. I can also create it in VB script just fine: 'works just fine dim box set box = CreateObject("pRaiseBox.cRaiseBox") dim reason reason = box.showform() 'works just fine Now I am trying to use this same control, but I am trying to instantiate it via Javascript: var TextEntryBox = new ActiveXObject("pRaiseBox.cRaiseBox"); //works var NoteReason = TextEntryBox.showform(); //box pops up but hangs but when I show the form, it hangs. By that I mean the control is visible, but if I put the mouse over it, I get nothing but an hourglass and ultimately I have to kill the browser. I'm not sure of the differences between CreateObject and new ActiveXObject (from what I can tell, there's very little), but can anyone think of any reason this might happen? Perhaps I need to recompile this dll with a different setting in the project? Thanks! Marcus

    Marcus Spitzmiller You will never hear me say, "I listen to pretty much everything." That is for people who don't care what goes in their ears.

    Web Development question javascript visual-studio tools

  • Dimmu Borgir has to be the best metal band
    M Marcus Spitzmiller

    Yes - they are great, and so's that album.

    Marcus Spitzmiller You will never hear me say, "I listen to pretty much everything." That is for people who don't care what goes in their ears.

    The Lounge question

  • Lost
    M Marcus Spitzmiller

    its free right now on abc.com - I just finished watching. Marcus Spitzmiller You will never hear me say, "I listen to pretty much everything." That is for people who don't care what goes in their ears.

    The Lounge question

  • Talented DUI
    M Marcus Spitzmiller

    This is from an episode of Reno 911, which is a show on Comedy Central in the US, if you've never heard of it. You are right - it is funny. :) Marcus Spitzmiller "Why must life be so hard? Why must I fail at every attempt at masonry?" - Homer

    The Lounge com question workspace

  • which platforms for a new website?
    M Marcus Spitzmiller

    This seems to be what lots of folks are saying, and I think this is a good fit for me. I'm downloading SQL Server Express right now. I've kind of fallen out of the loop lately in terms of the tools that are available to me these days, so is there some sort of 'express' edition where I can do the ASP .NET 2.0 side of things, too? Marcus Spitzmiller "Why must life be so hard? Why must I fail at every attempt at masonry?" - Homer

    The Lounge csharp php database mysql question

  • which platforms for a new website?
    M Marcus Spitzmiller

    Yeah - I didn't think I really had given enough info, but these are good suggestions nevertheless. I'm a c++ kind of guy with a little bit of exposure to c# - so I think the asp .net route is probably going to work best for me. Thanks again! Marcus Spitzmiller "Why must life be so hard? Why must I fail at every attempt at masonry?" - Homer

    The Lounge csharp php database mysql question

  • which platforms for a new website?
    M Marcus Spitzmiller

    At the risk of starting a war, I'm looking for some input as to which platforms I should use if I were to start building a site from scratch. I've never really been into building websites - I typically build desktop apps. But now I finally have an idea that I'd like to try, but I have no idea which platforms I should be using. I think the answer so far is, "that depends", so here's a little more detail: - This site would require users to register and login to use the site. - There would be a fairly complex database behind the scenes. - This would need to show lots of dynamic content. I think that's all I can really say right now, because I just don't know enough about it yet. So I guess in general, coming from a desktop guy who wants to learn something new and valuable (and potentially have a site that people would want to use), which technologies should I go with? MySql and ASP or ASP .NET, or php etc...? Any other database I should think about? Any thoughts? Can anyone suggest some reading to get my familiar with the new web technologies? Thanks! Marcus Spitzmiller "Why must life be so hard? Why must I fail at every attempt at masonry?" - Homer

    The Lounge csharp php database mysql question

  • Favorit Music / Albums...
    M Marcus Spitzmiller

    If you like almost all heavy metal - then you have to check out probably my all time favorite: IN FLAMES Other favs: Faith No More Jawbox Jawbreaker Jets to Brazil Metallica Sunny Day Real Estate The Flaming Lips Seriously though, if you like metal - not radio metal, but GOOD metal... IN FLAMES. Marcus Spitzmiller "Why must life be so hard? Why must I fail at every attempt at masonry?" - Homer

    The Lounge docker performance

  • I just invented a new sandwhich
    M Marcus Spitzmiller

    two words: taco sandwich! Marcus Spitzmiller "Why must life be so hard? Why must I fail at every attempt at masonry?" - Homer

    The Lounge java question career

  • Audio Raw Data
    M Marcus Spitzmiller

    check out waveOutOpen and waveOutWrite and http://www.codeproject.com/audio/wavefiles.asp[^] Marcus Spitzmiller "Why must life be so hard? Why must I fail at every attempt at masonry?" - Homer

    C / C++ / MFC question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups