content-type

Content type does not match binding

I'm calling a third party java web service from c#. It was working fine until they changed the server's message encoding from Mtom to Text. I changed the binding in the config file and now whenever I call the service I'm getting this error: The content type multipart/related; type="text/xml"; of the response message does not mat...

IIS website is sending multiple content-type headers for zip files

We have a problem with an IIS5 server. When certain users/browsers click to download .zip files, binary gibberish text sometimes renders in the browser window. The desired behavior is for the file to either download or open with the associated zip application. Initially, we suspected that the wrong content-type header was set on the fi...

API for developers. What Content-Type should I use?

I'm developing now API for developers feature, which gives users API access to some functions of our product. All responses are in json format. HTTP Content-Type header in our server's response is text/plain; charset=utf-8 Should I send one of this: application/json text/x-json text/json instead of text/plain. Or for API feature ...

Saving a document to SharePoint brings up "Web File Properties" dialog with incorrect metadata

Situation: A custom "Master Document" content type inherits from Document The "Master Document" content type has five additional choice fields There are five custom "Document Template" content types that inherit from the "Master Document" content type Each of the "Document Template" content types uses a different Word document template...

Set Content-Type for testing from Firefox

I need to do some REST service testing from Firefox where I set the Content-Type HTTP header to a specific value (to retrieve XML or JSON). Is there a Firefox add-on that can do this? ...

Best content-type and extension for web delivered Excel 2003 SpreadsheetML file

I am working with an API that has a report URL call. The report has an "Excel 2003 XML" format option. When that is selected they deliver it as: Content-Type: application/vnd.ms-excel content-disposition: inline; filename="report-name.xls" OpenOffice.org up to 3.0 tries to bring this in as a text import and I'm concerned that Office 2...

Why does my custom ContentType feature error on activation?

Howdy, I am creating a custom ContentType for SharePoint 2007 as a feature scoped to the site collection. When I attempt to activate the feature, I get an error page with only this clue: "Value does not fall within the expected range" Here are my XML files feature.xml: <?xml version="1.0" encoding="utf-8"?> <!--Created by STSDEV at...

Django contenttype question

I have a issue linking content type. I'm trying to pull a title out from this model class TankProfile(models.Model): user = models.ForeignKey(User) title = models.CharField(max_length=100) tank_type = models.SmallIntegerField(max_length=1, choices=TANK_TYPE, db_index=True, default=1, verbose_name="Tank Type") ts = models...

Why doesn't my upload from Flash to Rails & attachment_fu work (it has something to do with the content type)?

I am trying to upload a file from a flash widget to my rails application, which uses attachment_fu to handle uplaoded images. I am using flash to upload since it makes it easy to select and upload multiple files. However, I am getting this error when the rails controller tries to call save! on the newly created ActiveRecord object: Ac...

Listing which content types use a specified site column

Greetings, SO Experts! Is there a way to list out which Content Types use a specified Site Column in SharePoint? I'm going to have to delete a site column (it's gotten hosed under-the-hood) and re-create it, and I want to know which Content Types I need remove the Site Column from before I delete it. Any thoughts? ...

When serving JavaScript files, is it better to use the application/javascript or application/x-javascript

The whole question fits in the title. And to add some context: I'm not asking what is the best according to what the specs are saying, but rather what works the best given the mix of browsers deployed nowadays. Some data points: Google uses text/javascript for the JS used on their home page. Google uses text/javascript on Google Docs....

Is Content-Type negotiation typical or atypical in REST apps?

My feeling is that Content-Type negotiation is one of those "should do" things for REST, but most frameworks, tools and apps punt on it - and don't, as far as I know. Is this true? What REST programming frameworks support content-type negotiation? Should I expect it to broaden in usefulness? Will it become more common in REST framew...

How to display Excel content from Struts portlet on Websphere Portal

Here is the code, it don't display the .csv file: public class ForwardAction extends MultiAction { private static final String FILE_ERROR = "<h3><center>INVALID FILE</center></h3>"; public ActionForward doVizualizare(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exceptio...

Server cannot set content type after HTTP headers have been sent

I need to render a pdf while clicking a button. i am using the following js code: function RenderPDf() { //for window.open("/Resources/RenderPDF", "", 'toolbar=no,titlebar=no, directories=no, location=no,status=yes, menubar=no, resizable=yes, scrollbars=yes,width=1010, height=680,left=0,top=0'); ret...

Django Contenttypes and decorator

Hi. The site makes use of 2 objects - articles and blogs. Every time an article or blog is viewed, a related counter should increase by one. The idea is to have a "top ten" application that measures the "popularity" of the articles and entries. Because I'm using more than one object, I would like the Tracker model to use a genericFo...

How to change content type in php?

I have an image, but it keep doesn't display. I check the image properties (right-click and chose properties), and the I found the "type" is text/html not JPEG image. Is this because the type that cause my images dont show up?? How to change the "Type" value? I am using php... I display the image in a simple html [img] tag... EDIT: Ye...

NuSOAP: how to change content-type of request?

When consuming a .NET WCF webservice I get the following response (error): Unsupported HTTP response status 415 Cannot process the message because the content type 'text/xml; charset=UTF-8' was not the expected type 'application/soap+xml; charset=utf-8'. How do I change the content type? I can't find it in the NuSOAP forums/doc...

Setting mime type for excel document

MS Excel has the following acceptable mime types: application/vnd.ms-excel (official) application/msexcel application/x-msexcel application/x-ms-excel application/vnd.ms-excel application/x-excel application/x-dos_ms_excel application/xls application/x-xls Is there any one type that would work for all versions? If not, do we need to ...

What is the C# constant for "application/vnd.ms-xpsdocument" mimetype?

For "text/html" the following works: System.Net.Mime.MediaTypeNames.Text.Html ...

Enabling management of content types on SharePoint lists via web service

I can enable the management of content types in a document library's "advanced settings". Is there any web service method for this? I need to do this in an automated way, not manually. It seems like neither Lists.AddList nor Lists.UpdateList can set the value of the "Flags" attribute that is needed for this. My web service client has a...