title: Put the knife down and take a green herb, dude. |
descrip: One feller's views on the state of everyday computer science & its application (and now, OTHER STUFF) who isn't rich enough to shell out for www.myfreakinfirst-andlast-name.com Using 89% of the same design the blog had in 2001. |
FOR ENTERTAINMENT PURPOSES ONLY!!!
Back-up your data and, when you bike, always wear white. As an Amazon Associate, I earn from qualifying purchases. Affiliate links in green. |
|
Tuesday, June 17, 2025 | |
Okay, was looking back through WCF earlier this week for a prospective client, and figured I'd leave some notes. Here's the stock code, give or take:
And all that's in Again, this is the stock WCF project so far. Not overly fancy. I wanted to be able to hit the stock endpoint from a WCF project in Visual Studio without using a WCF client. Getting to the WSDL file was easy: You can steal that from the page the WCF Test Client refers to if nothing else. For me, that stock page was:
Here's some of the startup page's contents:
Then the WSDL itself:
What you want to be able to do to invoke a service endpoint directly is, of course, find its URL. In my case, with a little help from SoapUI, I figured out it was the same URL that started up initially:
The first key is that you have to set up two headers to the request:
But you seem to have to send it a body in a POST -- GET gives you that stock opening page again. (Since GET and POST are REST conventions, I half-way expected the WCF service not to care, especially since we know GET can have a body now.) I am not yet going to claim I know how the WSDL tells you what your input parameters should have looked like.
Again, do this all in a Postman POST request with a body that's raw with XML as its type and you're golden. Change
I do not miss XML. Update: Ha! Wish I'd talked to myself from 13 years ago first! Labels: c#, noteToSelf, wcf posted by Jalindrine at 6/17/2025 07:27:00 PM |
|
Monday, June 16, 2025 | |
Looking into updating a slew of VB.NET API to C# for a client, and figured I should brush off my VB.NET before getting too serious. And I figured that means I should make a console app, connect to a sample API URI at JsonPlaceholder, grab a collection of entities, serialize them, loop through, and access something on each individual entity instance. That's half (or more) of what any API does, right? Oh wow. Slightly larger rabbit hole than I figured. First, you can't make the top-level From stackoverflow.com:
Can confirm. The right answer is to set up an awaiter in a synchronous [sic] From stackoverflow.com:
It is somewhat amazing how few upvotes these have gotten at SO. Aka "VB.NET was never super popular, relatively speaking [to C#], was it?" Here's some working code.
and the
As I think I've mentioned before, a prof told me in college, "They're all different dialects of the same language." Or as a buddy on the ultimate team said, "It's all zeroes and ones." Nothing fancy going on here, but it does take a while to get your ears tuned to the new (ancient?) dialect. Labels: noteToSelf, VB.NET posted by Jalindrine at 6/16/2025 11:24:00 AM |
|
| |
MarkUpDown is the best Markdown editor for professionals on Windows 10. It includes two-pane live preview, in-app uploads to imgur for image hosting, and MultiMarkdown table support. Features you won't find anywhere else include...
You've wasted more than $15 of your time looking for a great Markdown editor. Stop looking. MarkUpDown is the app you're looking for. Learn more or head over to the 'Store now! |
![]() |
|
|