databinding in gSoap

Joined
Sep 24, 2010
Messages
1
Reaction score
0
I am trying to use the databinding functionality of gSoap to create an XML string in C to pass onto another application via a message queue. I have managed to get an small applicaiton to combine my XSD and data and output to the screen the resultant XML but I need to capture it in a char string to be able to use it - any help ???

Am using C on HPUX - below is the small sample I have managed to get working - I am REALLY new to this - like 3 days worth of effort !

int xml_test_main(char *AppName, FILE *fpLog )
{
char LogString[ DEF_ARRAY_LEN ]; /* String to go to log file */


struct soap *soap = soap_new1(SOAP_XML_STRICT | SOAP_XML_INDENT | SOAP_XML_CANONICAL);
struct ns2__trackingNumberType X;

X.trackId = "1234567890";
X.trackIdTypeCd = "ABC";
X.formTypeCode = "0400";



if (soap_write_ns2__trackingNumberType(soap, &X) != SOAP_OK)
PrintToLog( fpLog, "Error!!!\n");


soap_destroy(soap); // clean up allocated class instances
soap_end(soap); // clean up allocated temporaries
soap_free(soap); // delete context

return(OK);
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top