IDENTITY AND ACCESS MANAGEMENT
[an error occurred while processing this directive]

Building a c webservice client

This may help you get a c client to work with a webservice.

  1. Use gSOAP.

    1. Make sure you always define -DWITH_OPENSSL in all builds.

  2. Process the target service's wsdl with wsdl2h.

    1. I use the options: -c, -N, -n

      "-c" to get c, rather than c++

      "-N" and "-n" to get more meaningful routine names.

      For example: $ wsdl2h -c -Neds -neds eds.wsdl

  3. Process the generated include file with soapcpp2.

    1. I use the options: -c -2 -C -L -n -w -x -p

    2. (see the man page)

  4. Write a client program.

    1. Unfortunately soapcpp2 doesn't build a test. So consult the documentation. It is extensive.

    2. In you client you only have to import the 'nsmap' file. It will import others.

    3. I've also found it necessary to map the namespaces definition, possibly because of the soapcpp2 options. For example:

      #define eds_namespaces namespaces

    4. All the calls you can make to the server, and their arguments, can be found in the *Stub.h file.

    5. gSOAP now builds two libraries: plain and ssl. Make sure you link the right one.


[an error occurred while processing this directive]
Jim Fox
UW Technology
Identity and Access Management
University of Washington
fox@washington.edu
[an error occurred while processing this directive]
[an error occurred while processing this directive]
[an error occurred while processing this directive]
Fox's Home

© 1983-2017, University of Washington