How to send a SOAP in C?

Asked

Viewed 699 times

5

How do I send a C SOAP?

I have a Web Service that consumes SOAP and have to send that SOAP in C.

How can I do that? Is there an API or I have to create a library?

  • 1

    http://en.wikipedia.org/wiki/SOAP

2 answers

3


You can use the API WWSAPI, as mentioned in Toby Mosque’s answer, to do this you must basically create a proxy service through function WsCreateServiceProxy and once created, use the function WsOpenServiceProxy passing as parameter a structure WS_ENDPOINT_ADDRESS that will contain the information necessary to connect to the service.

When the use of this service is no longer necessary, the function can be called WsCloseServiceProxy to close the communication and release the memory associated with it WsFreeServiceProxy.

On the page below you can find links for all available features to perform this type of connection. MSDN.

There are also libraries that can do this work for you. For example, the csoap, a client/server library for SOAP written in pure C.

Another alternative is the project Apache Axis of the Apache Fondation.

  • 1

    Very good answer

  • 1

    @Jorgeb. Thank you. I managed to find here an article that shows in a clearer way how to use this API, is C++, but you can capture the idea. =)

  • By the way csoap gives me mistakes on almost all headers...

1

Browser other questions tagged

You are not signed in. Login or sign up in order to post.