How Do I Set XML Content-type in Flex 3

Hi,
My Flex 3 project makes an ExternalInterface call to some Javascript. The Javascript is then turned into XML.
But, my xml isn't parsing in IE. It works in all other browsers. I think that the problem is that I haven't set the XML's content-type. As I understand it IE requires that the Content-type be set. Is this correct?
My code looks like:
myReturn =  '<myXMLReturn>' + myReturn + '</myXMLReturn>';
myReturn = '<?xml version="1.0" encoding="UTF-8"?>' + myReturn;
xmlReturn = new XML(myReturn);
How would I set: header('Content-type: application/xml'); for an ExternalInterface call?
Thank you.
-Laxmidi

Okay. I figured it out. I don't need to set the Content-type.
I had a case sensitivity problem in parsing the xml. Thank you.
-Laxmidi

Similar Messages

  • How do I set the content type ?

    Hi
    I have to upload a file from my Java Application to a remote servlet.
    I have used the HTTPConnection class to connect to the remote servlet and made it call the POST method explicitly.
    How do I set the content type of the file I am uploading from my Java apllication?
    I tried to change the content type in the doPost method. by giving
    req.setContentType("multipart/form-data"); in the doPost.
    It still doesnt work..
    Is there any way to set the content type in the Java application?
    Thanks in advance

    What class is your req variable? If your using a HttpServletRequest, then there is no method req.setContentType("");
    In the HttpServletResponse this is for telling the web browser or receving medium what kind of mime type to expect.
    And what package is the HttpConnection class from?
    I think more precise info is required before this question can be answered.

  • Setting the content type inside the ABAP mapping.

    Hello All,
    Can any one help me by telling me how to set the content-type inside ABAP mapping. I have searched a large no of blogs and help.sap.com for the same.
    My requirement is I want to change the MIME type of the Main Document in side SXMB_MONI so that can change the content type of Main document which is application\xml by default.
    I would appreciate an early response regarding the same.
    Abinash

    Hello Raj,
    The output of my ABAP mapping is a flat file. So when I try to open the file with content type application/xml in the message monitor it shows the file has some error which is natural. The way to get around this problem is change the content type to application\txt from application\xml.
    I am not finding an option to set the content type inside the ABAP mapping for the same.
    Abinash

  • Urgent!!! How to convert received mail 'content type?

    How to convert received mails 'content type from text/plain to multipart/*?

    you cannot change the content type of a Message object which has been received. What you can do is create an instance of a MimeMessage class and set the content type as multipart and then add the received message as a bodypart to that message.
    You can look at the javamail example codes as to how to create a new MimeMessage with multipart content.
    anurag

  • Document Set default content type

    When defining a document set, you can define what content types can be used in a document set.  If, after uploading a document, the user cancels the properties page, the default content type for the library is assigned to the document (even though the
    document set does not permit the content type).  This is obviously a bug.  There have been several posts on this and it appears 2013 has the bug as well as 2010.
    We are seeking a work around to this bug. 
    Is it possible in in the client object model by placing a CEWP in the editform.aspx to force a content type on the item when the form is loaded?
    The other option is to modifiy the url that opens EditForm.aspx to force the content type.  Unfortunately the link that opens the EditForm.aspx page cannot be modified in the document library.

    Hi Clem_FRB,
    I did a test in my environment and I reproduce this issue.
    As a workaround, I suggest you change the content type or return an error in ItemAdded Event Receiver for document library.
    Here is a similar thread for you reference:
    http://sharepoint.stackexchange.com/questions/21986/document-sets-dont-enforce-allowed-content-types-when-multiple-doc-set-ct-are-a
    More information for your reference:
    http://www.niteenbadgujar.com/2013/05/change-default-content-type.html
    https://social.technet.microsoft.com/Forums/en-US/281fa281-7071-4beb-b275-e3179ce2cc08/how-to-set-default-content-type-in-document-library-using-client-object-model?forum=sharepointdevelopmentprevious
    Best Regards
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Zhengyu Guo
    TechNet Community Support

  • Using Forms that don't set the content type charset

    The Servlet API 2.3 has a new method, request.setCharacterEncoding(), to
              deal with the fact that almost no browsers set the content type. When I call
              this method passing "Shift_JIS" using weblogic 6.1, it works fine when the
              content type is not set by the browser. That is, after calling
              setCharacterEncoding when I call request.getParameter("testparam") I get the
              correct translated value. However, if the content type is
              "application/x-www-form-urlencoded; charset=Shift_JIS" and I call
              request.setCharacterEncoding("Shift_JIS"), getParameter("testparam") returns
              null.
              Can anyone shed some light on this?
              It looks like I'll have to not set the character encoding if it is already
              set. That, of course, opens the possibility that the character set used for
              translation is different than was used in the form.
              Russ Cole
              [email protected]
              

    It might not be the new 3G network. Though I've heard the major metropolitan cities can have slower responses due to congestion.
    Have you upgraded to the new operating system? Have you tried resetting your phone? You can do that by holding the "Home" and "Power" buttons down together, through the shut down screen and until the apple appears on the screen.
    You might also try this:
    http://www.roughlydrafted.com/2010/07/07/how-to-speed-up-your-iphone-3g-running- ios4/
    It's called a cold reboot.
    Sharon

  • Cfhttp and setting the content-type for a request

    Hi,
    I am trying to set the content-type for a cfhttp request like this (on coldfusion 9):
    <cfhttp redirect="no" method="get" timeout="120" url="http://10.0.0.1/test2.cfm">
        <cfhttpparam type="HEADER" name="Content-Type" value="application/json; charset=utf-8">
    </cfhttp>
    // coding on test2.cfm:
    <cfset x = GetHttpRequestData()>
    <cfdump var=#x#>
    // Output on test2.cfm
    content
    [empty string]
    headers
    struct
    Accept-Encoding
    deflate, gzip, x-gzip, compress, x-compress
    Connection
    TE
    Host
    10.0.0.1:80
    Proxy-Connection
    close
    TE
    trailers, deflate, gzip, compress
    User-Agent
    ColdFusion
    X-REWRITE-URL
    http://10.0.0.1:80/test2.cfm
    method
    GET
    protocol
    HTTP/1.1
    As you can see no content-type is send through. I also tried the sniffer.exe:
    GET http://10.0.0.1:80/test2.cfm HTTP/1.1
    Host: 127.0.0.1
    Proxy-Connection: close
    Connection: TE
    TE: trailers, deflate, gzip, compress
    User-Agent: ColdFusion
    Accept-Encoding: deflate, gzip, x-gzip, compress, x-compress
    Here you can also see that no content-type was passed through. The sniffer should report back
    GET http://10.0.0.1:80/test2.cfm HTTP/1.1
    Host: 127.0.0.1
    Proxy-Connection: close
    Connection: TE
    TE: trailers, deflate, gzip, compress
    User-Agent: ColdFusion
    Accept-Encoding: deflate, gzip, x-gzip, compress, x-compress
    Content-Type: application/json; charset=utf-8
    But is does not, what do i need todo to set the content-type in a cfhttp request.
    Kind regards,
    Nebu

    12Robots - are you sure about your statement that GET method requests cannot have Content-Type headers?  I don't think that that is correct.  I've always thought that it was valid (maybe unusual, but ...) and this W3C link weems to agree, especially in the context of its comment about what Content-Type means in a HEAD method request: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
    The big problem with trying to get around the CFHTTP limitation by using the CGI scope is that the dash is illegal in a CF varname.
    There is a custom tag called CFHTTP5 that getsaround a lot of the CFHTTP limitations, including cookie preservation across multiple requests.  I haven't used it for a long time (CF5), but it is still actively developed.  Costs $50 - http://www.cftagstore.com/tags/cfxhttp5.cfm
    -reed

  • How to know whether the Content Type at Library level is Inheriting Parent Content type or not Using Powershell?

    Hi,
    How to know whether the Content Type at Library level is Inheriting Parent Content type or not using Powershell?
    Is there any property for that? Or Do I need to compare the Content type Id's at Site collection level and Library level?
    Any help would be greatly appreciated.
    Thank you,
    AA.

    Hi Ashok,
    For a content type, there is an attribute called Inherits, the value of this attribute determines whether the content type inherits fields from its parent content type when it is created.
    If Inherits is TRUE, the child content type inherits all fields that are in the parent, including fields that users have added.
    If Inherits is FALSE or absent and the parent content type is a built-in type, the child content type inherits only the fields that were in the parent content type when SharePoint Foundation was
    installed. The child content type does not have any fields that users have added to the parent content type.
    More information, please refer to the link:
    https://msdn.microsoft.com/en-us/library/office/aa544268.aspx?f=255&MSPPError=-2147217396
    Best Regards,
    Wendy
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Setting DCP content type in Premiere

    Hey all,
    I'm trying to export a trailer in DCP form from Premiere using the Wraptor DCP format -- no problems with the end result except the cinema are saying it's coming up as a feature on their system, rather than a trailer or advertisement. Is there a way to specify the content type within the Premiere export settings? Cheers.

    Frank,
    Thanks you for you help.
    What i would like to do is to use a JSF library components to build YahooGO pages (Yahoo mobile widgets).
    For this my server needs to return an xml document with the application/x-ywidget+xml content type.
    Regarding you question i don't think that the target device understand the HTML.. on my mobile, it's J2ME application...
    Perhaps you can provide me some advices.
    Regards,
    Fred

  • How to change the HTTP Response as XML (Content Type "text\xml") ?

    Hi Friends ,
                     I have created one RFC Destination TYPE H . When i am trying to post some XML Message to that particular HTTP Service using POST method . It succesfully accepted the XML File but , it is returning the String as  " OK" . In the connection test trace i have seen the Content Type as "text/html" but *  I need to get as "text\xml" .* 
                     I need to get response back as XML not plain text . 
            1  Any Configuration setting  do we need to do on Service (SICF )  ?
             2. Or any other place we need to modify to get the HTTP Response as XML not plain text
                  Can you please help to solve the problem . Any clue ?
    Thanks & Regards.,
    V.Rangarajan
    Edited by: ranga rajan on Jan 2, 2008 2:07 PM

    Dear users,
    we have requirement sending SMS to the customers mobiles. I am successfully sending the messages to the customers mobiles by using the above method. Facing issues with response message. The response messages is in plain text fromat in single line like...Sent
    Using HTTP_AAE Receiver adapter.
    The response message was failed while excution of the message mapping with the error
    Mapping failed in runtimeRuntime Exception when executing application mapping program com/sap/xi/tf/_MM_SMS_CUST_RES_; Details: com.sap.aii.utilxi.misc.api.BaseRuntimeException; Content is not allowed in prolog.
    please share the comments how to pass the Status of the message to SAP ECC from SAP HTTP adapter
    Regards,
    Sudir.

  • How to change the HTTP Response as XML (Content Type "text\xml")  When Post

    Hi Friends ,
    I have created one RFC Destination TYPE H . When i am trying to post some XML Message to that particular HTTP Service using POST method . It succesfully accepted the XML File but , it is returning the String as " OK" . In the connection test trace i have seen the Content Type as "text/html" but * I need to get as XML format no Srting    ( Type "text\xml" . ) *
    I need to get response back as XML not plain text .
    1 Any Configuration setting do we need to do on Service (SICF ) ?
    2. Or any other place we need to modify to get the HTTP Response as XML not plain text
    Can you please help to solve the problem . Any clue ?
    Thanks & Regards.,
    V.Rangarajan

    Dear users,
    we have requirement sending SMS to the customers mobiles. I am successfully sending the messages to the customers mobiles by using the above method. Facing issues with response message. The response messages is in plain text fromat in single line like...Sent
    Using HTTP_AAE Receiver adapter.
    The response message was failed while excution of the message mapping with the error
    Mapping failed in runtimeRuntime Exception when executing application mapping program com/sap/xi/tf/_MM_SMS_CUST_RES_; Details: com.sap.aii.utilxi.misc.api.BaseRuntimeException; Content is not allowed in prolog.
    please share the comments how to pass the Status of the message to SAP ECC from SAP HTTP adapter
    Regards,
    Sudir.

  • How to  get rid of "Content-type: text/html; charset=UTF-8 Set-Cookie..." ?

    Hi
    I have several applications and I am working on making some kind of APEX "SSO".
    An user is authentified in one application. Then he may go to another application. The cookie has the same name from one application to another. The session ID is preserved from one application to another : i use this kind of URL : "f?p=109:1:&SESSION.:"
    I have seen that I need to authentify automatically the user when he swap to another application. For that i have a process in the welcome page that authentify the user, using the :app_user and the password, a PL/SQL after header:
    wwv_flow_custom_auth_std.login(
        P_UNAME       => :APP_USER,
        P_PASSWORD    => :P1_PASSWORD,
        P_SESSION_ID  => v('APP_SESSION'),
        P_FLOW_PAGE   => :APP_ID||':1'
        );So far so good. User is authenticated. The problem I face is that this message appears :
    Content-type: text/html; charset=UTF-8 Set-Cookie: TELEGESTION_AUTH=-1; path=/; Location: /pls/apex/f?p=109:1How to get rid of this message ?
    Thank you for your kind help !
    Christian
    PS: My question has not been answered... I hope somebody could help me on this topic.
    Edited by: Christian from France on Mar 4, 2010 2:02 AM

    Hi
    Have you tried using "f?p=109:1:&APP_SESSION.:" instead of "f?p=109:1:&SESSION.:".
    I don't see why you need to reauthenticate if they're in the same workspace?
    Cheers
    Ben

  • Document Set custom content type - welcome page missing

    Sharepoint 2013. 404 error on welcome page for a following content type based on document
    set:
    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <Field ID="{B9B7D98D-A2D3-4191-9B30-C516C8EDD9F4}" DisplayName="Fieldpr41" Name="Fieldpr41" Type="Note" RichText="false" NumLines="3" Group="pr41" Overwrite="TRUE" />
    <!-- Parent ContentType: Document Set (0x0120D520) -->
    <ContentType ID="0x0120D5200062FEFD4873814585B3EFD57010F1F8AE"
    Name="ContentType41"
    Group="Custom Content Types"
    Description="My Content Type"
    Inherits="FALSE"
    ProgId="SharePoint.DocumentSet"
    Version="0">
    <FieldRefs>
    <FieldRef ID="{B9B7D98D-A2D3-4191-9B30-C516C8EDD9F4}" DisplayName="Fieldpr41" Name="Fieldpr41" />
    </FieldRefs>
    <XmlDocuments>
    <XmlDocument
    NamespaceURI=
    "http://schemas.microsoft.com/office/documentsets/welcomepagefields">
    <wpFields:WelcomePageFields
    xmlns:wpFields=
    "http://schemas.microsoft.com/office/documentsets/welcomepagefields"
    LastModified="1/1/2010 08:00:00 AM">
    <WelcomePageField id="83729202-DCA7-4BF8-A75B-56DDDE53189C" />
    </wpFields:WelcomePageFields>
    </XmlDocument>
    </XmlDocuments>
    </ContentType>
    </Elements>
    Here's
    what i did after changing Inherits parameter to FALSE: 1) added ProgId parameter 2) added wpFields section 
    Any ideas?

    Hi,
    According to your post, my understanding is that you got an error while creating custom document set content type.
    The issue is that you set the Inherits=”FALSE” in the element. If you set the Inherits=”TRUE”, the content type would work.
    Based on the article form MSDN:
    If Inherits is TRUE, the child content type inherits all fields that are in the parent, including fields that users have added.
    If Inherits is FALSE or absent and the parent content type is a built-in type, the child content type inherits only the fields that were in the parent content type when SharePoint Foundation was installed.
    The child content type does not have any fields that users have added to the parent content type.
    If Inherits is FALSE or absent and the parent content type was provisioned by a sandboxed solution, the child does not inherit any fields from the parent.
    It means if you set the Inherits to true, we would lose all our customization there.
    If we set Inherits="FALSE", which means you then have to remember to explicitly add into the definition all the stuff you should be inheriting, like the default Doc Set event receivers. 
    More reference:
    http://morefunthanapokeintheeye.blogspot.com/2012/10/how-to-successfully-provision-and.html
    http://ybbest.wordpress.com/2012/07/04/how-to-deploy-document-set-using-caml-in-sharepoint2010-solution-package/
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Save Dialog in Office Application does not set the Content Type to the one selected on Document Creation.

    We have a Library that supports 4 Content Types  ("Content Type 1","Content Type 2","Content Type 3","Content Type 4")
    The user clicks new and selects "Content Type 3"
    Word is started
    The user edits the document
    Clicks Save
    "Choose Content Type" dialog is shown set to the Content Type "Content Type 1" because the Document content type is ordered as First (which also means Default)
    What is expected is the "Choose Content Type" dialog to show "Content Type 3" as selected
    Any ideas?

    Hi,
    According to your description, there is a library with four content types, you create a document with one of the content types, click save button in Office application,
    then a “Choose Content Type” dialog will show up for selecting a content type.
    I tried to reproduce as below:
    1. Create a library with four content types;
    2. In the ribbon of this library, “FILES”->”New Document”->”Content Type 1”, then the Office application with the predefined template will be opened for editing;
    3. Click the “Save” button, choose the save path as the current library, click “OK” to finish the process;
    4. Refresh the library in browser, the newly created document appears there.
    In my test, there is no “Choose Content Type” dialog showing up when save the document in Office application.
    I would suggest you provide more details about how to reproduce this issue(screenshot would be better) for further research.
    Thanks
    Patrick Liang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support,
    contact [email protected]
    Patrick Liang
    TechNet Community Support

  • How to customise and navigate Content Type - SharePoint 2013 List

    I need some advice here. I'm customizing forms that have list built using Content Types. I noticed the difference in the links is something like this below I have one default content list type called item and the other one is called College Form
    Item is ContentTypeId=0x01003FF12EB7EAB88340BEE53D34C38A906200147E508F34B9164ABE555FF698569C27
    College Form is ContentTypeId=0x01003FF12EB7EAB88340BEE53D34C38A906200147E508F34B9164ABE555FF698569C27
    When doing my customization of the form I would like to hide some fields and show some based on the content type. I know by default the content type does that. But im using JS to hide some fields but don't know how i can do this or what values to use to
    make this happen.
    Any ideas and thanks in advance

    WPQ2FormCtx.ItemContentTypeId will give the content type ID of the item in each of the forms newform.aspx, ediform.aspx and displayform.aspx. You can also use WPQ2FormCtx.ItemContentTypeName, if you want to compare name instead of Id. Here is a JQuery
    code to hide fields in the forms:
    <script type="text/javascript">
    jQuery(document).ready(function($) {
        if(WPQ2FormCtx.ItemContentTypeId == '0x010400C36D463A4788AD4AAF5F85C02DA29F8E') {
        $("h3.ms-standardheader:contains('Body')").closest("tr").hide();
    </script>
    Note that this script assumes the JQuery is already referenced in the site. You can place above code in Script Editor web part in each of the forms. 
    Also, beware that this way you can hide the field from UI, but user can still open the page source and find the actual information in the hidden field. 
    If the requirement is to completely hide the field data then you will need to set the field properties like showInEditForm, showInDisplayForm and showInNewForm
    Nadeem Yousuf

Maybe you are looking for

  • Creation of Group for Order type

    Dear All, I have created the stage wise order types ,now I am trying to create a group for each order type, while doing this I maintained  text & no.range for the same, but system is not creating new group, it replaced the existing group.(OPJH ) plea

  • Define a path to save my converted pdf word document

    Hello, I would like to be able to define a specific place to save the pdf document I have converted from Word. The script I'm writing should normally able me to send to my customer a personalised mail with an attach pdf document. The mail and the pdf

  • Database and JTree

    I have table in access entitled employees and wish to generate a JTree to show the organizational heirarchy of the company. I feel like I've followed the steps properly but the Jtrees either don't work or they work with the wrong data. "Perform a que

  • Latest PC Suite problem

    Hi there I have the latest version of Nokia PC Suite installed and recently I've updated my Nokia E50 to the latest software version 7.13.00 When I try to make backup of the memory with Nokia Content Copier, everything is ok, but when I have to resto

  • Jms sender parallelism

    Hi In the tunning guide i read that parallelism for jms adapter when you have sync calls can be implemented with 2 channels. But this is not possible because you can't create 2 sender agrrements with the same sender,interface but different channels.