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 "Samisa Abeysinghe (JIRA)" <ax...@ws.apache.org> on 2005/07/27 06:40:21 UTC

[jira] Assigned: (AXISCPP-519) ?wsdl get request sets wrong content-type header -- breaks 'Add Web Reference' in VS.NET.

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

Samisa Abeysinghe reassigned AXISCPP-519:
-----------------------------------------

    Assign To: Samisa Abeysinghe

> ?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
>  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