?wsdl get request sets wrong content-type header -- breaks 'Add Web Reference' 
in VS.NET.
-----------------------------------------------------------------------------------------

         Key: AXISCPP-519
         URL: http://issues.apache.org/jira/browse/AXISCPP-519
     Project: Axis-C++
        Type: Improvement
  Components: Server - Apache module  
    Versions: 1.4 Final    
 Environment: Windows
    Reporter: Bart
    Priority: Trivial


Hi,

Currently mod_axis serves all GET requests with a Content-Type of text/html, 
and all POST requests with a Content-Type of text/xml. This ignores wsdl files 
retrieved via get requests (e.g. /axis/service?wsdl requests). These should 
also be served with a Content-Type header of text/xml. Doesn't sound like a big 
issue, but VS.NET breaks on wsdl files served with a text/html header, it 
refuses to recognize it as a wsdl file unless it is served with a text/xml 
Content-Type header, this means that wsdl files served by Axis cannot be easily 
added as a 'Web Reference' in VS.NET.

I think in /ws-axis/c/src/server/apache/mod_axis.cpp that:

    req_rec->content_type = (M_POST == req_rec->method_number) ? 
    "text/xml" : "text/html";

should be rewritten to something along the lines of:

if (M_POST == req_rec->method_number) // post request
{
  req_rec->content_type = "text/xml";
}
else if (strstr(req_rec->query, "wsdl")) // wsdl get request
{
  req_rec->content_type = "text/xml";
}
else // normal get request
{
  req_rec->content_type = "text/html";
}

Disclaimer: I'm not an apache/axis module developer, and this is untested code. 
If you reply to this mail please keep me on cc as I'm not on the dev list.

Regards,
Bart

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira

Reply via email to