Calling a SOAP Web service

Hello everyone

I want to do a project where I want to send some mails using the hydra mainboard, a touch screen display and the ethernet module via the microsoft exchange server. In order to communicate with the exchange server i need to call soap based web services (EWS).

I have seen some projects using REST Web services. Is SOAP also possible?

Thanks in advance and Greets!

@ stanbe - It is possible, as long as you are able to implement this. If needed, you can drop down to raw sockets and handle the incoming and outgoing data as required.

Taking a shot in the dark here.

See if the following is of any help

Hi James

Thanks for your quick reply.

Can you maybe provide me with some input how to best get started? I don’t expect a solution to the problem of how to send and receive data (XML) to and from a soap based web service (Microsoft Exchange) but maybe some hints of how the more experience Gadgeteer-Users would start implementing that?

For instance, which classes Do I need? Is there some tutorial out there that you could recommend etc.?

Thanks a lot!



@ Rajesh: Thank you for your link. But I am wondering, since I do not have the classes from the Microsoft Exchange EWS Managed API in the .NET Micro Framework (I guess it is not possible to run those on the hydra?) I would need to be able setup a simple http request with some xml content and get some xml content back. Any ideas on how to get started there?

An option will be to create a Windows server application to use the Exchange EWS API and coomunicate with the Hydra using strings or XML.

Did you look at

to get started with Networking and then advance from there ?

The classes used for networking in NETMF/Gadgeteer are more or less the same as in Windows.
It’s mainly about using the Socket class to connect to the server (or listen as a server) and then read and write binary data to and from the socket.
For XML messages you just create the plain xml strings and convert them to binary data using the Encoding.UTF8 class.
IF you can find a simple SOAP client for C# that is targeted to a Windows .NET framework, it should not be to hard to port it to NETMF (or at least take some hints from it).
The only thing that’s missing is a fully object oriented XML framework.
All you have is XmlReader and XmlWriter.
But for simple xml strings I would create them directly from code.

And your network interface has to be initialized properly.
What device / network module do you want to use here?

Just saw you want/need to use HTTP:
Look in Codeshare and Support/Documents for WebClient samples.

Correct me if I am wrong … isn’t SOAP, just HTTP calls wrapped in a specific XML structure with a HTTP Header indicator ?

Example from wiki:

POST /InStock HTTP/1.1
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 299
SOAPAction: ""
<!- ->
<?xml version="1.0"?>
<soap:Envelope xmlns:soap="">
    <m:GetStockPrice xmlns:m="">

1 Like

Thank you everyone for your quick answers. I really appreciate the good support and help one can get in the forum.

I will look at the docu posted by you (@ Rajesh) and the Support/Documents for client examples (@ Reinhard). If it is possible to send a HTTP request wrapped with a specific xml structure (@ mhectorgato: ,yes that is soap, as far is i know), then everything is good :slight_smile: I can start on that.

@ Reinhard: I have the Ethernet ENC28 Module and the Hydra mainboard. Is there a limitation to that?

If I have more questions I will gladly get back here (and I am sure they will pop up :-)).


@ stanbe - I have no hydra, but I think this should be no problem.
I would start with HTTP client sample, and then add some soap to it.

btw. Isn’t its the soap that’s wrapped into a http frame!?

@ Reinhard: Yes, I think it is exactly that. :slight_smile: