[ http://issues.apache.org/jira/browse/AXISCPP-519?page=all ]
     
Samisa Abeysinghe closed AXISCPP-519:
-------------------------------------

    Fix Version: 1.6 Alpha
     Resolution: Fixed

I updated the code to check for "req_rec->args" and if the arg is "wsdl" the 
content type would be set to "text/xml"


if (req_rec->args)
    {
        if( strcmp("wsdl", req_rec->args) == 0 )
            req_rec->content_type = "text/xml";
    }


> ?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
>     Assignee: Samisa Abeysinghe
>     Priority: Trivial
>      Fix For: 1.6 Alpha
>  Attachments: VS.NET2003 Add Web Reference.jpg
>
> 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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to