gsoap

gSOAP: How to pass info inside soap header

江枫思渺然 提交于 2019-12-11 02:20:15
问题 I wish to send some information like authentication token inside SOAP header. I am using gSOAP/c/Linux. Please help me how to pass? My SOAP_ENV__Header looks like /* SOAP Header: */ struct SOAP_ENV__Header { struct ns3__Header *ns3__MyHeader; /* mustUnderstand */ }; and ns3__Header looks like /* ns3:Header */ struct ns3__Header { char *Value; /* optional element of type xsd:string */ }; 回答1: Sorry for bothering everybody. I figured it out. I did it like: soap_init(&mysoap); mysoap.header =

gSoap: how to gracefully shutdown the webservice application?

我是研究僧i 提交于 2019-12-10 00:10:24
问题 I'm using gSoap to write a webservice. It's running as a console application. In all gSoap examples I see, that requests are dispatched in infinite loop like for(;;;) even in multi-threaded version. But how can I make my webservice to terminate gracefully when, say, user presses space on the console? Preferably: stop accepting new connections; Serve existing ones; Exit from application 回答1: The section 7.2.4 How to Create a Multi-Threaded Stand-Alone Service in the documentation has example

Asynchronous, acknowledged, point-to-point connection using gSoap

依然范特西╮ 提交于 2019-12-08 16:15:49
问题 Here's my situation: I have a wsdl , "translated" to a header file like this: wsdl2h -o file.h file.wsdl Then, I executed soapcpp2 -Icorrect_path -j file.h On "server side" I implemented the service, using soapXXXService.[h|cpp] On "server side" again, I used soap_init2 (with SOAP_IO_KEEPALIVE ), I have soap_bind , soap_accept , soap_copy , etc. and it seems to work perfectly fine (see below) On "client side", I use the generated proxy object (again using SOAP_IO_KEEPALIVE ), construct the

HTTP 401 Unauthorized error in sending GetItem Request

喜欢而已 提交于 2019-12-06 22:23:24
I'm using EWS GetItem operation to fetch data from exchange server, but i've got following error Error 401 fault: SOAP-ENV:Server[no subcode] "HTTP Error" Detail: HTTP/1.1 401 Unauthorized However my login credential are correct, since those are works well with findItem request and response, but when GetItem request goes to server it give above error. My credentials are like: soap *pSoap = proxy->soap; proxy->soap_endpoint = "https://outlook.office365.com/ews/exchange.asmx"; pSoap->userid = "abcd@abcd.onmicrosoft.com"; pSoap->passwd = "abcd1234"; And Received log are like HTTP/1.1 200 OK Cache

HTTP 401 Unauthorized error in sending GetItem Request

守給你的承諾、 提交于 2019-12-06 22:21:24
I'm using EWS GetItem operation to fetch data from exchange server, but i've got following error Error 401 fault: SOAP-ENV:Server[no subcode] "HTTP Error" Detail: HTTP/1.1 401 Unauthorized However my login credential are correct, since those are works well with findItem request and response, but when GetItem request goes to server it give above error. My credentials are like: soap *pSoap = proxy->soap; proxy->soap_endpoint = "https://outlook.office365.com/ews/exchange.asmx"; pSoap->userid = "abcd@abcd.onmicrosoft.com"; pSoap->passwd = "abcd1234"; And Received log are like HTTP/1.1 200 OK Cache

gSoap generated client-side structure initialization and use

偶尔善良 提交于 2019-12-06 14:23:33
问题 gSoap generated client-side structure initialization and use (using ANSI C bindings) First of all, I searched and although there are a number of struct initialization solutions offered, I did not find anything directly answering this issue. Also, this question is being posted simply to assist anyone else that has a similar question, as I have already worked out the solution and because of my newbie status will post it immediately at least 8 hours after posting this. However, I am still very

gSoap SSL/TLS certificate host name mismatch in tcp_connect

妖精的绣舞 提交于 2019-12-06 11:09:16
问题 My soap client is not accepting the certificate on the service I have to connect to. It gives the error: SSL/TLS certificate host name mismatch in tcp_connect . However chrome does accept the certificate. I inspected the certificate in chrome and I noticed it is a wildcard certificate in the form *.domain.nl. Are there additional configurations steps required to get gSoap/openssl to accept this? ssl init: soap_ssl_client_context(&proxy, SOAP_SSL_DEFAULT, /* use SOAP_SSL_DEFAULT in production

how to remove xsi:type information from gSoap message?

别等时光非礼了梦想. 提交于 2019-12-06 07:34:41
I am woking on windows platform, gSoap is working fine but it integrates complex type defination in the soap message. How to remove these complex type definition from soap message xsi:type="ns4:MYServerRequestDto" xsi:type="ns4:MySettingDto" how to regenerate gsoap files so it will not include type information? <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns5=

How to compile multiple gsoap client webservices into one executable?

橙三吉。 提交于 2019-12-06 05:54:07
问题 I using gSOAP for web services, but i have a problem i must compile 2 web services into one executable file, and some functions have same names instead of argument for using other prefix for function names. Compilation Error: X.o: In function `soap_get_string(soap*, char**, char const*, char const*)': X.cpp:8669: multiple definition of `soap_get_string(soap*, char**, char const*, char const*)' Y.o:Y.cpp:4763: first defined here In Makefile: wsdl2h -qlpr X.wsdl wsdl2h Y.wsdl Y.xsd soapcpp2

How to deploy a gSOAP Web Service in Ubuntu?

不打扰是莪最后的温柔 提交于 2019-12-05 15:30:06
I have a doubt concerning the deployment of a Web Service in Ubuntu. It was implemented using gSOAP and it should be deployed, e.g. be accessible from websites (which are developed in e.g. ASP .NET). I got confused with the whole CGI, Ubuntu, Apache topics. Until now I was able to implement a Web Service in ASP .NET and deploy it on Microsoft ISS. Other than that I can also access a gSOAP Web Service described in a WSDL, using ASP .NET What are the steps to deploy my own Web Service? I have some more specific questions: Do I have to compile the WS as CGI? Do I have to install Apache in Ubuntu