gsoap with ssl – Part 2
The gsoap issue wasn’t as straight forward as expected, surprise! As I stated last time “wsdl2h” worked fine when connecting the to the external server either with or without ssl. But the service address wasn’t correct. The JBoss server is running behind Apache and this must be causing the service name to use the localhost address.
From the wsdl:
“<service name=”MyWebService”>
<port binding=”tns:MyWebBinding” name=”MyWebPort”>
<soap:address location=”http://127.0.0.1:8080/Myweb/MyWebService”/>
</port>
</service>”
In the MyWeb.h file created from running wsdl2h I found:
“@section MyWebBinding_ports Endpoints of Binding “MyWebBinding”
-http://127.0.0.1:8080/Myweb/MyWebService”
I changed the url to: “@section MyWebBinding_ports Endpoints of Binding “MyWebBinding”
-http://university.edu/Myweb/MyWebService”
and ran soapcpp2. It didn’t work. The endpoint in the WebBindingProxy file still defaulted to the local host. To get around this I initialized the endpoint to the correct value in the MyWebBindingProxy_init method:
“void MyWebBindingProxy::MyWebBindingProxy_init(soap_mode imode, soap_mode omode)
{
soap_imode(this, imode);
soap_omode(this, omode);
soap_endpoint = “http://university.edu/myweb/MyWebService“;
static const struct Namespace namespaces[] =……..”
and it works..almost. The ssl connection still isn’t working. so much for my hoping this would “just work”. Back to ssl……
P.S.
I started out using gsoap without any options. I’d suggest using the “-nname and -Nname” options with wsdl2h to rename the prefix. As it is now all of objects and methods default to “ns__”. While this is fine for now it make for ugly code and in the future some will hate me if I don’t change it.




Buy:Lasix.Acomplia.Lipitor.Benicar.Female Pink Viagra.Aricept.Amoxicillin.Zetia.Prozac.Wellbutrin SR.Advair.Ventolin.Lipothin.Nymphomax.Buspar.Cozaar.Female Cialis.SleepWell.Zocor.Seroquel….
Buy:VPXL.Propecia.Cialis Soft Tabs.Zithromax.Viagra Super Force.Cialis.Tramadol.Viagra Soft Tabs.Soma.Super Active ED Pack.Levitra.Viagra.Viagra Professional.Maxaman.Cialis Professional.Cialis Super Active+.Viagra Super Active+….