Sending data to a webservice

Solarion

Honorary Master
Joined
Nov 14, 2012
Messages
18,249

Batista

Executive Member
Joined
Sep 2, 2011
Messages
7,901
#25
[MENTION=222878]Solarion[/MENTION]

Im a webservices expert specialising in SOAP services and C# front ends.....

Where exactly are you stuck?I write client side, server side and everything inbetween :D
 
Last edited:

Solarion

Honorary Master
Joined
Nov 14, 2012
Messages
18,249
#27
[MENTION=222878]Solarion[/MENTION]

Im a webservices expert specialising in SOAP services and C# front ends.....

Where exactly are you stuck?I write client side, server side and everything inbetween :D
Wow well let me put together a small description of I suppose would be an average Soap request/post. Some kind of starting point I can wrap my head around. Thanks for your help!
 
Last edited:

me_

Senior Member
Joined
Oct 11, 2013
Messages
647
#28
From Visual Studio, it's very easy to interface with SOAP web services. All you need to do is right-click and references and select "Add Service Reference" and then enter the URL for the SOAP service WSDL.
It will then automatically generate all your proxy classes for working with the service and setup the standard config.

You then need to create a new instance of the client / proxy class, Open a connection to the service and then execute any command.
 

Batista

Executive Member
Joined
Sep 2, 2011
Messages
7,901
#30
Dude I could have helped you do your thing in an hour.Next time you get another request like that just hit me up.
 

Solarion

Honorary Master
Joined
Nov 14, 2012
Messages
18,249
#32
Well, several months later and still have only ever been able to log into a web service. That's about it. The entire concept of SOAP just completely baffles me.

I have all the information I need but just cannot come right with this. Feel kind of cursed when it comes to web services.

I might actually make a giant poster that reads: "The remote server returned an error: (400) Bad Request." and hang it in my room as a eulogy to my ordeal.
 

Thor

Honorary Master
Joined
Jun 5, 2014
Messages
35,881
#33
Well, several months later and still have only ever been able to log into a web service. That's about it. The entire concept of SOAP just completely baffles me.

I have all the information I need but just cannot come right with this. Feel kind of cursed when it comes to web services.

I might actually make a giant poster that reads: "The remote server returned an error: (400) Bad Request." and hang it in my room as a eulogy to my ordeal.
Did you check my library?
 

Hamster

Resident Rodent
Joined
Aug 22, 2006
Messages
30,520
#34
The entire concept of SOAP just completely baffles me.
Think of it as a company's web service stuck in the early 2000's that like spending excessive bandwidth and man-hours with convoluted XML messages.

Anyway, there's not much to it...it's a piece of XML in a specific format sent to a server. It's got a HEADER section with all sorts of metadata in it and a BODY section where you dump your XML into (usually they'll give you an XSD to work with).

You send them a SOAP message and they send you a response. If it is async you'll find some sort of correlation ID in the HEADER to match it with whatever you sent earlier.

Enterprises that spent too much money on Websphere MQ love SOAP messages because that's what their manual says is the gold standard in building distributed systems that scale to levels only ever witnessed before in Ancient Rome. Or the architect is kanniedood 70 year old from the COBOL days.

If you are using C# via Visual Studio you can point it to the webservice and it will magically generate all the classes for you.

TL;DR: SOAP is a simple JSON message's fat cousin with diabetes one broker away from having a stroke.
 
Last edited:

Solarion

Honorary Master
Joined
Nov 14, 2012
Messages
18,249
#35
Did you check my library?
Thanks Thor I'm not ignoring you I will check it out thanks buddy, however I think I may need to go back to basics, rewind a bit and figure out what I missed. Something vital.

Think of it as a company's web service stuck in the early 2000's that like spending excessive bandwidth and man-hours with convoluted XML messages.

Anyway, there's not much to it...it's a piece of XML in a specific format sent to a server. It's got a HEADER section with all sorts of metadata in it and a BODY section where you dump your XML into (usually they'll give you an XSD to work with).

You send them a SOAP message and they send you a response. If it is async you'll find some sort of correlation ID in the HEADER to match it with whatever you sent earlier.

Enterprises that spent too much money on Websphere MQ love SOAP messages because that's what their manual says is the gold standard in building distributed systems that scale to levels only ever witnessed before in Ancient Rome. Or the architect is kanniedood 70 year old from the COBOL days.

If you are using C# via Visual Studio you can point it to the webservice and it will magically generate all the classes for you.

TL;DR: SOAP is a simple JSON message's fat cousin with diabetes one broker away from having a stroke.
I understand that you need a header and a XML string, serialized from a class. I was able to achieve this with a Order > Line Items type class; to serialize it into XML.

I seem to hit a brick wall at the Action to send to the server (Insert, Update, Delete). Somewhere between CRUD and Post etc it all falls apart.

Someone on the forum is helping me at the moment with wrapping my head around it.

Web services are so important and it's a vital too to have in your toolbox. I'm kind of OCD about learning it now because it's been bugging me a while, possibly about 5 years now.

I've put everything else on hold at the moment until I crack this.
 

_kabal_

Expert Member
Joined
Oct 24, 2005
Messages
2,666
#36
Download SoapUI
Load the WSDL into SoapUI
It will generate the requests
Run a request
View the raw tab, it will show you exactly what was sent, including the action.
SoapAction is just an HTTP header name/value
 

kolaval

Expert Member
Joined
May 13, 2011
Messages
2,949
#39
@Solarion
As much hate as the guys here has for SOAP it's still the most prevalent form of communication we use.
I have written a huge number of webservices and consume just as many from other companies, so it's second nature at this stage.

What language are you running on the server hosting the webservice?
What language is your website in?
Is the webservice already written or do you have to write it?
 
Top