简体   繁体   中英

gsoap restful c++ client using streaming

How to write a gsoap restful C++/Solaris client, which should send a document(xsd__base64Binary) to webservice using streaming?

We tried writing a gsoap restful client without streaming and it is working fine. We generated a request xml (serialization- soap_begin_send(--), soap_serialize(--), soap_put(--),soap_end_send(--)) using gsoap and then used soap_post_connect(---), soap_send(---),soap_end_send(---) to send the request.

We used MTOM for streaming in gsoap client and working fine. Is it possible to stream a document in gsoap restful client? Can we use MTOM in restful case? If yes, could you please let us know, what are all the gsoap functions I should use for serialization and then to send that xml request? And also, please share if you have any sample code.

One way is take doc as string and send that string as arguments to server. soapcpp2 will generate code for client/server for you. See here for more details.

I agree with this but if you have document which is huge size than you can devide it in part. Create your own header-data combination and devide document in packet and send as string.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM