Using Linux / gcc / gsoap to call MBT SoapInput Node in Message Flow

Firstly download, configure, compile and install gsoap

Step 1: get up and running
mkdir gsoap
cd /root/gsoap/gsoap-2.7
yum install byacc
yum install bison
yum install flex
./make install

Step 2: Setup working folder and create stubs from remote wsdl via URL. Note I'm just using plain old C and not C++.

mkdir ./OrderService

wsdl2h -c -o OrderService.h
soapcpp2 -c OrderService.h

Step 3: Create your test C client using your fav editor (mine vi)
#include "soapH.h"
#include "OrderServiceSOAP.nsmap"

   struct soap *soap = soap_new();
   struct _ns1__submitPORequest  request;
   struct _ns1__submitPOResponse response;



   printf("\nPart No: %s",response.partNo);
   printf("\nQuantity: %d",response.partQuantity);
   printf("\nOrder Status: %s",response.orderStatus);
   printf("\nOrder Amount: %d",response.orderAmt);


Step 4: Compile
 gcc TestSoap.c soapC.c soapClient.c -lgsoap -o TestSoap

Step 5: Run

The output
Part No: 1234
Quantity: 1
Order Status: AVAILABLE
Order Amount: 50


Popular posts from this blog

ActiveMQ, easy to use open source message oriented middleware (MOM)

Basic Send Message to MQ with Java and IBM MQ JMS

Apache Apollo