Sending data to a webservice

Solarion

Honorary Master
Joined
Nov 14, 2012
Messages
18,316
So I'm wondering if programming is my thing anymore. I've been googling for 13 hours straight and feel like I've been tumbled down a rabbit hole several times with thousands of people telling me different things.

I've come across everything from soap headers to http requests to binary strings and encoding etc etc etc.

All I wanted was a simple form to capture and order and post it. And now I am just completely despondent and haven't been this down in years.

Should I just quit programming?
 

crackersa

Honorary Master
Joined
May 31, 2011
Messages
29,032
So I'm wondering if programming is my thing anymore. I've been googling for 13 hours straight and feel like I've been tumbled down a rabbit hole several times with thousands of people telling me different things.

I've come across everything from soap headers to http requests to binary strings and encoding etc etc etc.

Should I just quit programming?
No, take a break, go to sleep, do something else for another day and comeback with fresh eyes
 

crackersa

Honorary Master
Joined
May 31, 2011
Messages
29,032
Good plan tbh!
I have been working with devs for many years and I have seen many eureka moments when the dev gets their mind focused on something else.

Hopefully someone here reaches out to you to help you talk through the problem.
 

[)roi(]

Executive Member
Joined
Apr 15, 2005
Messages
5,930
Missing quite a bit of specifics; suggest you detail exactly what you are trying to do.
 

Kosmik

Honorary Master
Joined
Sep 21, 2007
Messages
18,931
Work through a basic tutorial. You need to read and research but it's all gibberish until you actually do it, especially for someone new. Practical application helps a lot!
 

Spacerat

Senior Member
Joined
Jul 29, 2015
Messages
874
Just HTTP POST a JSON object to a WebAPI MVC Controller.

But it depends on what you are actually trying to do. Let's say you want to generate an email from that data, then an Azure Function triggered on an HTTP POST request will literally take you a few minutes to do (Asuming you gonna want to host it in the cloud). Very little to code. However if your goal is to learn programming then less coding is not always good :eek:
 

Solarion

Honorary Master
Joined
Nov 14, 2012
Messages
18,316
[)roi(];21627525 said:
Missing quite a bit of specifics; suggest you detail exactly what you are trying to do.
I have had to turn the job down sadly, thought I could just pick this up but it turns out web services is not something you can just pick up.

The client wanted a form to capture an Order and several Line Items in that order. The idea was to post this order to a SOAP web service.

So I needed a class, say Orders and a list (array or list object) of items. I thought maybe I needed to populate the class then serialize into XML and send it to the web server. This I think was the way to go. It's too late now but I think this is the way it should have been done.

Turns out web services, json, soap, serialization all that gibberish is not something you can just pick up and do on the fly :p

DO I really need to learn any of this for future I mean, is it stuff good to know?
 

mercurial

MyBB Legend
Joined
Jun 12, 2007
Messages
37,952
You will find it hard to land a job if you don't know web services. It's part and parcel of almost everything these days.
 

Solarion

Honorary Master
Joined
Nov 14, 2012
Messages
18,316
Last edited:

rorz0r

Executive Member
Joined
Feb 10, 2006
Messages
7,852
All programmers have points where they struggle, don't make progress, start wondering if they should have done something else, etc.

That being said what you needed to do sounds fairly simple and you'll likely need to figure that out. You could serialise to xml yourself and post to a soap endpoint but generally everyone is going to use some sort of soap client library. This usually depends on your language of choice. Did they provide you with a wsdl file/link? You can normally auto generate a client based off of that definition and then posting to it is a basic as just calling a method.
 

zippy

Executive Member
Joined
May 31, 2005
Messages
9,750
As suggested take a break.

Also, any reason it has to be SOAP? RESTful services are much easier to get to grips with when you are learning. There are a gazillion YouTube videos with tutorials. The only gotcha is matching library versions.

One of the easiest methods is to knock up a java maven project with Eclipse(I use the paid version of IntelliJ, for free version, Eclipse is better)

Even though java may not be your thing, IMO it’s the easiest and cheapest way to learn about web services. Ofc, others may disagree, but try it if you are stuck.
 

Solarion

Honorary Master
Joined
Nov 14, 2012
Messages
18,316
All programmers have points where they struggle, don't make progress, start wondering if they should have done something else, etc.

That being said what you needed to do sounds fairly simple and you'll likely need to figure that out. You could serialise to xml yourself and post to a soap endpoint but generally everyone is going to use some sort of soap client library. This usually depends on your language of choice. Did they provide you with a wsdl file/link? You can normally auto generate a client based off of that definition and then posting to it is a basic as just calling a method.
This is pretty spot on.

I think maybe also at some point a programmer needs to hit the reset button and go and study again. Windows Forms has become somewhat obsolete. I don't want to do web development. Someone said here WPF/MVVM is the way forward. If I could study that alongside cloud/web services perhaps it would be beneficial?

I wish someone could give me some direction, some course to do, just some way forward it would really be gold right now. I have the rest of the year to do something, I have some time atm.
 

rorz0r

Executive Member
Joined
Feb 10, 2006
Messages
7,852
Personally I really like pluralsight courses. You get 3 months free (they offer a subscription and you get access to everything) if you register as a Microsoft developer (needed to download visual studio). Microsoft offer quite a few courses around azure etc as well with a custom EdX site.
Udacity courses are also pretty good.
There's plenty more out there.
 

animal531

Expert Member
Joined
Nov 12, 2013
Messages
1,437
This is pretty spot on.

I think maybe also at some point a programmer needs to hit the reset button and go and study again. Windows Forms has become somewhat obsolete. I don't want to do web development. Someone said here WPF/MVVM is the way forward. If I could study that alongside cloud/web services perhaps it would be beneficial?

I wish someone could give me some direction, some course to do, just some way forward it would really be gold right now. I have the rest of the year to do something, I have some time atm.
No one can give you a great answer as to what you want to do...only you can figure that out.

WinForms are still in use everywhere and as a generic SA developer you'll probably need to do some web dev here and there (although not necessarily). WPF is just another way to do what WinForms+Web dev does, it won't be a magical bullet to fix your woes. You could learn many many other programming stacks as well, go check what recruiters are looking for and see if you see something you like more.

The other trick is to learn/google/do the right things in order
1. Languages you can focus on and learn very well. I'm going to use C# as my example since that's what you were on
2. Then figure out what's needed to fix the client's problem
3. What does the client's server setup look like
4. Possibly he needs only a web site (e.g. C# ASP.NET), why did he need to connect via service? If he does for e.g. scaling purposes then you need a web site + web service
5. If the latter, then google ways to communicate between the two, for e.g. SOAP get some basic examples of how to make a site connect to the web service (via xml or binary or whatever else)

Programming is basically just breaking any problem down into manageable pieces until you can beat it.
 
Last edited:

[)roi(]

Executive Member
Joined
Apr 15, 2005
Messages
5,930
I have had to turn the job down sadly, thought I could just pick this up but it turns out web services is not something you can just pick up.

The client wanted a form to capture an Order and several Line Items in that order. The idea was to post this order to a SOAP web service.

So I needed a class, say Orders and a list (array or list object) of items. I thought maybe I needed to populate the class then serialize into XML and send it to the web server. This I think was the way to go. It's too late now but I think this is the way it should have been done.

Turns out web services, json, soap, serialization all that gibberish is not something you can just pick up and do on the fly :p

DO I really need to learn any of this for future I mean, is it stuff good to know?
Yip; not quite something that you could just improvise a way to a solution; well not without prior experience. As some suggested start with the youtube tutorials, and then build a few of your own.
 

Spacerat

Senior Member
Joined
Jul 29, 2015
Messages
874
I would rather poke my eyes out than use SOAP again :mad:.
But JSON/REST WebAPIs are easy to understand and implement and I think they are crucial to the way forward. If you want to do minimal coding, delve into Azure. You can get a free account. Mess around with Service Bus, Event Hub, Azure Functions and Storage. Just a massive rabbit hole though. Tons of info out there.
 
Top