You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "Yampolsky, Robert" <ry...@harris.com> on 2005/05/28 00:37:32 UTC

RE: Wrong content type for ?wsdl - mod_axis2.cpp always s

>As you have said, there is no place other than in the mod_axis2.cpp
>where "text/html" is hard coded.

>I am not sure why content type stuff is commented out in
>Apache2Transport::setTransportProperty().
>However, if you want to change it and test for side effects, please
send
>me over the patch, I could test it out for you.

>Thanks,
>Samisa...

I tried it, and it seems to work.

Just uncommented the CONTENT_TYPE case in
Apache2Transport::setTransportProperty().  (There is no equivalent case
in the Apache1 transport, however, so I guess this will just work with
apache2).

Then, in src/engine/Axis.cpp, where it decides to send out a wsdl file,
I inserted this call:
	pStream->setTransportProperty(CONTENT_TYPE, "text/xml");

I now get content_type text/xml, and Firefox displays it okay.  Does
this email constitute a 'patch'?


By the way, it turns out that the problem I was having before of the
wsdls code segfaulting because
		sServiceName =
g_pConfig->getAxisConfProperty(AXCONF_AXISHOME);
was not working was my fault.  It was caused by my forgetting to export
AXISCPP_DEPLOY in my /etc/init.d/httpd script after setting it.  (thanks
to AxisLog for showing me this).  Apparently everything else works using
the compiled-in /usr/local/axiscpp_deploy path.  But in AxisConfig.cpp,
it explicitly sets a default value of "\0" for AXCONF_AXISHOME, assuming
that readConf will replace it later.  But readConf just returns
AXIS_SUCCESS if getenv("AXISCPP_DEPLOY") fails.  So AXCONF_AXISHOME
never gets set, and everything else works until you try to use it
(assuming you're installed in the default location).

Thanks,
Rob