[gsoap] Re: gSoap multiple-server
I am dealing with same problem ... As I can't use your solution (GPL ed) I was wondering if there is a different way to chain the multi services. I read through the user documentation http://www.cs.fsu.edu/~engelen/soapdoc2.html section 7.2.8 Where they provide a sample (below) that doesn't actualy work as: 1. the soap object is changed after abc.serve so uvw cannot find the method AND 2. when the soap servce doesn't find the method, it faults closing the connection Has anyone worked a work around? soapABCService abc; soapUVWService uvw; abc.bind(NULL, 8080, 100); abc.accept(); if (abc.serve() == SOAP_NO_METHOD) // HERE the soap object is changed! { soap_copy_stream(uvw, abc); if (uvw.dispatch() == SOAP_NO_METHOD) --- In gsoap@yahoogroups.com, Moshe mos...@... wrote: Hi, I have developed a solution that could help you. you may try this link: http://multixtpm.sourceforge.net/MultiXTpm%20gSoap%20Enhancer.htm thanks Moshe --- In gsoap@yahoogroups.com, Joseph PvtHudson@ wrote: Agreed - but on page 56 of the 2.7.17 doc it explains how to chain servers - and I've tried that but am still not getting past the first server, because it'll just send an error. I'm going to experiment with the .dispatch method before sending. Anyone have luck with chaining servers? TIA. --- In gsoap@yahoogroups.com, rabidcicada rabidcicada@ wrote: The problem is clearly that the services have now way of knowing which service you really want. Each is made to run as a service on a certain port. You need to change your design. Run each server on a different port---or---put both service's code in the same soap object and put logic in there to differentiate. If you think about how SOAP is designedit's validates the format, and namespace of the messsage. If you have two services responding on the same port and you send a message to that port then both will try to interpret what's coming in. --- In gsoap@yahoogroups.com, Joseph PvtHudson@ wrote: When I converted the Onvif source xml files, I created one big project. Up till now, I've only used the DeviceBindingService soap object, and have had good results. As you can see from the code snippit for main(), I'm using the serve() method running as a CGI application - and all is well. Now, I'm moving along with the Onvif testing and I now need to code responses for the MediaBindingService soap object. I can create a new object I can call the serve() method MediaDevice.serve(), and while it compiles fine, both of the soap objects respond! Using Wireshark, I can see the response has both - a pass from the service that it's intended for, and a fail from the other service. I know that I can have multiple soap objects, do you have any suggestions on how to get mulitple soap objects working at same time? Do I need to setup threads? How can I prevent one from responding as a error to the other? Thanks in advance for your help ideas. -JF Joseph Fitzgerald Vicon Industries code - file onvif_namespace.cpp - #include soapDeviceBindingService.h #include DeviceBinding.nsmap //gobal namespaces #include soapMediaBindingService.h //#include MediaBinding.nsmap int main(int argc, char **argv) { DeviceBindingService OnvifDevice ; MediaBindingService MediaDevice; if (argc 2) { OnvifDevice.serve(); /* serve as CGI application */ //MediaDevice.serve(); /* when added - causes the errors for device messages */ } ...
[gsoap] Re: gSoap multiple-server
Agreed - but on page 56 of the 2.7.17 doc it explains how to chain servers - and I've tried that but am still not getting past the first server, because it'll just send an error. I'm going to experiment with the .dispatch method before sending. Anyone have luck with chaining servers? TIA. --- In gsoap@yahoogroups.com, rabidcicada rabidcic...@... wrote: The problem is clearly that the services have now way of knowing which service you really want. Each is made to run as a service on a certain port. You need to change your design. Run each server on a different port---or---put both service's code in the same soap object and put logic in there to differentiate. If you think about how SOAP is designedit's validates the format, and namespace of the messsage. If you have two services responding on the same port and you send a message to that port then both will try to interpret what's coming in. --- In gsoap@yahoogroups.com, Joseph PvtHudson@ wrote: When I converted the Onvif source xml files, I created one big project. Up till now, I've only used the DeviceBindingService soap object, and have had good results. As you can see from the code snippit for main(), I'm using the serve() method running as a CGI application - and all is well. Now, I'm moving along with the Onvif testing and I now need to code responses for the MediaBindingService soap object. I can create a new object I can call the serve() method MediaDevice.serve(), and while it compiles fine, both of the soap objects respond! Using Wireshark, I can see the response has both - a pass from the service that it's intended for, and a fail from the other service. I know that I can have multiple soap objects, do you have any suggestions on how to get mulitple soap objects working at same time? Do I need to setup threads? How can I prevent one from responding as a error to the other? Thanks in advance for your help ideas. -JF Joseph Fitzgerald Vicon Industries code - file onvif_namespace.cpp - #include soapDeviceBindingService.h #include DeviceBinding.nsmap //gobal namespaces #include soapMediaBindingService.h //#include MediaBinding.nsmap int main(int argc, char **argv) { DeviceBindingService OnvifDevice ; MediaBindingService MediaDevice; if (argc 2) { OnvifDevice.serve(); /* serve as CGI application */ //MediaDevice.serve(); /* when added - causes the errors for device messages */ } ...
[gsoap] Re: gSoap multiple-server
Wow - that's a good solution - and well documented too. I haven't had a chance to read it all, but if I understand - you have one server act as the director who can verify credentials and then pass messages to other servers. I will look it over more, thanks. --- In gsoap@yahoogroups.com, Moshe mos...@... wrote: Hi, I have developed a solution that could help you. you may try this link: http://multixtpm.sourceforge.net/MultiXTpm%20gSoap%20Enhancer.htm thanks Moshe --- In gsoap@yahoogroups.com, Joseph PvtHudson@ wrote: Agreed - but on page 56 of the 2.7.17 doc it explains how to chain servers - and I've tried that but am still not getting past the first server, because it'll just send an error. I'm going to experiment with the .dispatch method before sending. Anyone have luck with chaining servers? TIA. --- In gsoap@yahoogroups.com, rabidcicada rabidcicada@ wrote: The problem is clearly that the services have now way of knowing which service you really want. Each is made to run as a service on a certain port. You need to change your design. Run each server on a different port---or---put both service's code in the same soap object and put logic in there to differentiate. If you think about how SOAP is designedit's validates the format, and namespace of the messsage. If you have two services responding on the same port and you send a message to that port then both will try to interpret what's coming in. --- In gsoap@yahoogroups.com, Joseph PvtHudson@ wrote: When I converted the Onvif source xml files, I created one big project. Up till now, I've only used the DeviceBindingService soap object, and have had good results. As you can see from the code snippit for main(), I'm using the serve() method running as a CGI application - and all is well. Now, I'm moving along with the Onvif testing and I now need to code responses for the MediaBindingService soap object. I can create a new object I can call the serve() method MediaDevice.serve(), and while it compiles fine, both of the soap objects respond! Using Wireshark, I can see the response has both - a pass from the service that it's intended for, and a fail from the other service. I know that I can have multiple soap objects, do you have any suggestions on how to get mulitple soap objects working at same time? Do I need to setup threads? How can I prevent one from responding as a error to the other? Thanks in advance for your help ideas. -JF Joseph Fitzgerald Vicon Industries code - file onvif_namespace.cpp - #include soapDeviceBindingService.h #include DeviceBinding.nsmap //gobal namespaces #include soapMediaBindingService.h //#include MediaBinding.nsmap int main(int argc, char **argv) { DeviceBindingService OnvifDevice ; MediaBindingService MediaDevice; if (argc 2) { OnvifDevice.serve(); /* serve as CGI application */ //MediaDevice.serve(); /* when added - causes the errors for device messages */ } ...
[gsoap] Re: gSoap multiple-server
The problem is clearly that the services have now way of knowing which service you really want. Each is made to run as a service on a certain port. You need to change your design. Run each server on a different port---or---put both service's code in the same soap object and put logic in there to differentiate. If you think about how SOAP is designedit's validates the format, and namespace of the messsage. If you have two services responding on the same port and you send a message to that port then both will try to interpret what's coming in. --- In gsoap@yahoogroups.com, Joseph pvthud...@... wrote: When I converted the Onvif source xml files, I created one big project. Up till now, I've only used the DeviceBindingService soap object, and have had good results. As you can see from the code snippit for main(), I'm using the serve() method running as a CGI application - and all is well. Now, I'm moving along with the Onvif testing and I now need to code responses for the MediaBindingService soap object. I can create a new object I can call the serve() method MediaDevice.serve(), and while it compiles fine, both of the soap objects respond! Using Wireshark, I can see the response has both - a pass from the service that it's intended for, and a fail from the other service. I know that I can have multiple soap objects, do you have any suggestions on how to get mulitple soap objects working at same time? Do I need to setup threads? How can I prevent one from responding as a error to the other? Thanks in advance for your help ideas. -JF Joseph Fitzgerald Vicon Industries code - file onvif_namespace.cpp - #include soapDeviceBindingService.h #include DeviceBinding.nsmap //gobal namespaces #include soapMediaBindingService.h //#include MediaBinding.nsmap int main(int argc, char **argv) { DeviceBindingService OnvifDevice ; MediaBindingService MediaDevice; if (argc 2) { OnvifDevice.serve(); /* serve as CGI application */ //MediaDevice.serve(); /* when added - causes the errors for device messages */ } ...