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.

Comments (2)

HAROLDSeptember 5th, 2010 at 11:23 am


CheapTabletsOnline.Com. Canadian Health&Care.No prescription online pharmacy.Best quality drugs.Special Internet Prices. Low price pills. Buy drugs online

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….

SALVADORSeptember 6th, 2010 at 7:43 am


CheapTabletsOnline.com. Canadian Health&Care.No prescription online pharmacy.Special Internet Prices.Best quality drugs. No prescription drugs. Order drugs online

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+….

Leave a comment

Your comment