CFHTTP request with content-type "application/atom+xml"

Is it possible to send a HTTP request (method="post")  with a body that has a set content-type (such as "application/atom+xml")?
using CFHTTP and CFHTTPPRAM, it seems the tag does not accept a content-type.
<cfhttpparam type="body" value="#myAtomXML#">
is there anyway to have CFHTTP , post the body with a given content-type?
IF NOT, could anyone point me to the right direction to accompolish this using Java?

Hi,
Have you tried the "mimetype" attribute of the <cfhttpparam> tag?.
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_g-h_10.html

Similar Messages

  • Unsupported Content-Type: application/soap+xml

    I've created a simple composite application with a bpel jbi module using glassfishesbv21.
    The bpel process starts when I invoke a webservice (soap-binding).
    When I run a test case for the ca everything works fine.
    When I call the webservice from an external web application, the client (created with netbeans wizard bundled in glassfishesbv21) obtains the response as expected and doesn't report any exception while the server rises a com.sun.xml.ws.server.UnsupportedMediaException.
    Googoling I found that this maybe caused by the use of soap1.1 and soap1.2 but is also true that JAX-WS runtime should look into the WSDL to determine the binding being used and configures itself accordingly.
    the stacktrace is:
    Finished processing outbound messages.
    Request doesnt have a Content-Type
    com.sun.xml.ws.server.UnsupportedMediaException: Request doesnt have a Content-Type
    at com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:267)
    at com.sun.xml.ws.transport.http.HttpAdapter.decodePacket(HttpAdapter.java:276)
    at com.sun.xml.ws.transport.http.HttpAdapter.invokeAsync(HttpAdapter.java:341)
    at com.sun.jbi.httpsoapbc.embedded.JAXWSGrizzlyRequestProcessor.processAsynchRequest(JAXWSGrizzlyRequestProcessor.java:386)
    at com.sun.jbi.httpsoapbc.embedded.JAXWSGrizzlyRequestProcessor.service(JAXWSGrizzlyRequestProcessor.java:220)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:647)
    at com.sun.jbi.httpsoapbc.embedded.JBIGrizzlyAsyncFilter.doFilter(JBIGrizzlyAsyncFilter.java:95)
    at com.sun.enterprise.web.connector.grizzly.async.DefaultAsyncExecutor.invokeFilters(DefaultAsyncExecutor.java:175)
    at com.sun.enterprise.web.connector.grizzly.async.DefaultAsyncExecutor.interrupt(DefaultAsyncExecutor.java:153)
    at com.sun.enterprise.web.connector.grizzly.async.AsyncProcessorTask.doTask(AsyncProcessorTask.java:92)
    at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
    at com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:116)
    Unsupported Content-Type: application/soap+xml Supported ones are: [text/xml]
    com.sun.xml.ws.server.UnsupportedMediaException: Unsupported Content-Type: application/soap+xml Supported ones are: [text/xml]
    at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:291)
    at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:128)
    ====[com.sun.xml.ws.assembler.server:request]====
    <?xml version="1.0" ?>
    <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing">
    <soap-env:Header>
    <wsa:Action>http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</wsa:Action>
    <wsa:To>http://localhost:19081/coreAnagrafeUpdateService/coreAnagrafeUpdatePort</wsa:To>
    <wsa:ReplyTo>
    <wsa:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa:Address>
    </wsa:ReplyTo>
    <wsa:MessageID>uuid:778b135f-3fdf-44b2-b53e-ebaab7441e40</wsa:MessageID>
    </soap-env:Header>
    <soap-env:Body></soap-env:Body>
    </soap-env:Envelope>
    ============
    ====[com.sun.xml.ws.assembler.server:response]====
    <?xml version="1.0" ?>
    <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
    <S:Body>
    <S:Fault xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns="">
    <faultcode>S:Server</faultcode>
    <faultstring>javax.jbi.messaging.MessagingException: HTTPBC-E00798: Message normalization failed</faultstring>
    </S:Fault>
    </S:Body>
    </S:Envelope>
    ============
    Unsupported Content-Type: application/soap+xml Supported ones are: [text/xml]
    com.sun.xml.ws.server.UnsupportedMediaException: Unsupported Content-Type: application/soap+xml Supported ones are: [text/xml]
    at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:291)
    at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:128)
    at com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:287)
    ====[com.sun.xml.ws.assembler.server:request]====
    <?xml version="1.0" ?>
    <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing">
    <soap-env:Header>
    <wsa:Action>http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</wsa:Action>
    <wsa:To>http://localhost:19081/coreAnagrafeUpdateService/coreAnagrafeUpdatePort/mex</wsa:To>
    <wsa:ReplyTo>
    <wsa:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa:Address>
    </wsa:ReplyTo>
    <wsa:MessageID>uuid:778b135f-3fdf-44b2-b53e-ebaab7441e40</wsa:MessageID>
    </soap-env:Header>
    <soap-env:Body></soap-env:Body>
    </soap-env:Envelope>
    ============
    the wsdl is:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <definitions name="coreAnagrafeUpdateService"
    targetNamespace="http://service.box.nexus.com/"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:tns="http://service.box.nexus.com/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <types>
         <xsd:schema>
    <xsd:import namespace="http://service.box.nexus.com/" schemaLocation="core_anagrafe.xsd"/>
    </xsd:schema>
    </types>
    <message name="coreAnagrafeUpdateOperationRequest">
    <part name="parameters" element="tns:requestParameter"/>
    </message>
    <message name="coreAnagrafeUpdateOperationResponse">
    <part name="parameters" element="tns:coreAnagrafeResponse"/>
    </message>
    <message name="coreAnagrafeUpdateOperationFault">
    <part name="part1" element="tns:faultMessage"/>
    </message>
    <portType name="coreAnagrafeUpdatePortType">
    <operation name="coreAnagrafeUpdateOperation">
    <input message="tns:coreAnagrafeUpdateOperationRequest"/>
    <output message="tns:coreAnagrafeUpdateOperationResponse"/>
    <wsdl:fault name="fault1" message="tns:coreAnagrafeUpdateOperationFault"/>
    </operation>
    </portType>
    <binding name="coreAnagrafeUpdateBinding" type="tns:coreAnagrafeUpdatePortType">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
    <operation name="coreAnagrafeUpdateOperation">
    <soap:operation soapAction=""/>
    <input>
    <soap:body use="literal" />
    </input>
    <output>
    <soap:body use="literal" />
    </output>
    <wsdl:fault name="fault1">
    <soap:fault use="literal" name="fault1"/>
    </wsdl:fault>
    </operation>
    </binding>
    <service name="coreAnagrafeUpdateService">
    <port name="coreAnagrafeUpdatePort" binding="tns:coreAnagrafeUpdateBinding">
    <soap:address location="http://localhost:19081/coreAnagrafeUpdateService/coreAnagrafeUpdatePort"/>
    </port>
    </service>
    </definitions>
    Can anyone help me to understand the problem and solve it?
    Thanks in advance.

    Hi,
    Content-Type: application/xml
    ...check for the content type of the message that is sent ot the WS.....with the above mentioned content-type going to the WS currently...WS is not able to parse the req and hence the error....in other words wrong format being being passed.
    Regards,
    ABhishek.

  • Content-Type=application/x-www-form-urlencoded with UTF-8  data which servlet fails to interpret correctly .

    My Environment is Weblogic 6.1 SP2 on WIN2K.
    I have an HTTP client sending an HTTP request with
    Content-Type=application/x-www-form-urlencoded
    the data in HTTP request is in UTF-8. Note that HTTP client does not specify charset=UTF-8
    as part of the Content-Type.
    I have a servlet "VosXmlEvents" processing this HTTP request.
    The HTTP request contains data like &#8220;Zoë&#8221; which the servlet below
    interprets as &#8220;Zoë&#8221; causing me to think that my deployment settings
    might be wrong.
    My Deployment settings:
    In weblogic.xml deployment descriptor I have specified following:
    <charset-params>
    <!-- I specified this so that I can tell to weblogic that HTTP request data is
    UTF-8 so weblogic can successfully convert it to ISO-8859-1 as per Java servlet
    spec.-->
    <input-charset>
    <resource-path>/vos/events/xml/*</resource-path>
    <!-- I tried both UTF8 and UTF-8 and got same results-->
    <java-charset-name>UTF8</java-charset-name>
    </input-charset>
    <!-- I specified the the settings below just to be on the safe side, as I have
    seen java documentation, newsgroups etc. using slightly different, names for the
    same char encoding/canonical names . Java uses MIME preferred names,I think I
    dont have to do this but I hope specifying these should not do any harm either,
    am I correct in assuming it? (see reference 1 and 2. below for details)-->
    <charset-mapping>
    <iana-charset-name>ISO_8859-1:1987</iana-charset-name>
    <java-charset-name>ISO-8859-1</java-charset-name>
    </charset-mapping>
    <charset-mapping>
    <iana-charset-name>ISO_8859-1:1987</iana-charset-name>
    <java-charset-name>ISO8859_1</java-charset-name>
    </charset-mapping>
    <charset-mapping>
    <iana-charset-name>UTF-8</iana-charset-name>
    <java-charset-name>UTF-8</java-charset-name>
    </charset-mapping>
    <charset-mapping>
    <iana-charset-name>UTF-8</iana-charset-name>
    <java-charset-name>UTF8</java-charset-name>
    </charset-mapping>
    </charset-params>
    My web.xml has:
    <servlet>
    <servlet-name>VosXmlEvents</servlet-name>
    <servlet-class>some class name</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>VosXmlEvents</servlet-name>
    <url-pattern>/vos/events/xml/*</url-pattern>
    </servlet-mapping>
    According to Servlet spec. 2.3 sec. SRV.4.9 Request data encoding, cut pasting
    from spec below:
    "Currently, many browsers do not send a char encoding qualifier with the Content-Type
    header, leaving open the determination of the character encoding for reading HTTP
    requests. The default encoding of a request the container uses to create the request
    reader and parse POST data must be &#8220;ISO-8859-1&#8221;, if none has been
    specified by the client request. However, in order to indicate to the developer
    in this case the failure of the client to send a character encoding, the container
    returns null from the getCharacterEncoding method.
    If the client hasn&#8217;t set character encoding and the request data is encoded
    with a different encoding than the default as described above, breakage can occur.
    To remedy this situation, a new method setCharacterEncoding(String enc) has been
    added to the ServletRequest interface. Developers can override the
    character encoding supplied by the container by calling this method. It must be
    called prior to parsing any post data or reading any input from the request. Calling
    this method once data has been read will not affect the encoding."
    Q1. Should not <input-charset> related settings in weblogic.xml for a servlet
    helps container actually do some thing like setCharacterEncoding(String enc) on
    HTTP Request before it call the servlet?
    Q2. If not then that would mean I have to programatically call setCharacterEncoding(String
    enc)to correctly interpret my HTTP Request?
    Q3. If the answer to Q1 is "yes" then I will assume that getInputStream() or getReader()
    methods on the HttpServletRequest will give the chacter in the client encoded
    format which in this case is UTF-8, i.e I will get "Zoë" as in this example. Am
    I correct here?
    Reference:
    1. http://edocs.bea.com/wls/docs70/webapp/components.html#139932
    2. http://java.sun.com/j2se/1.3/docs/guide/intl/encoding.doc.html

    Stefan,
    Thanks for the information. I have the following question then.
    The Webserver I am interacting with does not recognize user and password provided in the channel. It accepts user and pwd in payload and in application/x-www-form-urlencoded  content type only.
    Sample Raw Post that server server requires looks like this
    User=yourname&Password=yourpassword&INPUT_XML=%3C%3Fxmlversion%3D%221.0%22standalone%3D%22no%22%3F%3E%3CDELIVERY%3E%3CMESSAGE%3E%0D%0A++++%3CDESTINATION_ADDR%3E%2B447900570205%3C%2FDESTINATION_ADDR%3E%%3C%2FMESSAGE%3E%0D%0A%0D%0A%3C%2FDELIVERY%3E%
    What i have done is that constructed the post manually in Java code in un encoded form and expected the HTTP Adapter to do the encoding. Having done this, the HTTP Server is able to scuccessfully parse the xml except for & and < , > chars which err out as invalid XML.
    Is there an elegant way of doing above scenario using XML post and standard HTTP Adapter.
    Best Regards,
    Sudharshan N A

  • Content-type: application/xml and Application server 9

    I have a web service running on Application server 9, implemented using netbeans and JAX-WS.
    When a client sends a request to it with:
    Content-type: application/xml
    the request is rejected because the server does not recognise the mime type.
    Specifically, the response is:
    HTTP/1.1 415 Unsupported Media Type
    X-Powered-By: Servlet/2.5
    Content-Type: text/plain; charset=iso-8859-1
    Date: Fri, 01 Sep 2006 14:49:04 GMT
    Server: Sun Java System Application Server Platform Edition 9.0
    Connection: close
    Everything works fine when the request has:
    Content-type: text/xml
    Is there a way to make my web service accept content type of 'application/xml'?
    -Tony Beaumont
    Aston University
    beaumoaj

    I have fixed this for myself, i.e. decompile, replace in jar.
    My problem was that most tools define the encoding but code was simply testing
    if( contentType.equalsIgnoreCase( "text/xml" ) )
    so sending xml from other tools that send contentType
    "text/xml;encoding=UTF-8" or some such, like soap tools, would mean no XML was seen.
    Is the proper source available for XSQL?

  • What is RFC for "Content-Type: application/HTTP-Kerberos-session-enc"

    Does anybody know how to process HTTP request with content type "Content-Type: application/HTTP-Kerberos-session-enc" ?
    I cannot decode HTTP request:
    -- Encrypted Boundary
         Content-Type: application/HTTP-Kerberos-session-encrypted
         OriginalContent: type=application/soap+xml;charset=UTF-16;Length=1624
    -- Encrypted Boundary
         Content-Type: application/octet-stream
    <octet-stream>-- Encrypted Boundary
    Where <octet-stream> starts with four bytes [47, 0, 0, 0]
    other bytes from <octet-stream> I am trying to decode "context.unwrap()" method ("context" was created on previous request):
                                            GSSHeader gssHeader = new GSSHeader(new ByteArrayInputStream(content));
                                            log.debug("Incoming warped content length: " + content.length);
                                            log.debug("Incoming GSS header OID: " + gssHeader.getOid());
                                            log.debug("Incoming GSS header length: " + gssHeader.getLength());
                                            log.debug("Incoming GSS header MechTokenLength: " + gssHeader.getMechTokenLength());
                                       byte[] newBytes = context.unwrap(content, 0, content.length, msgProp);
    "content" - byte array which was created from <octet-stream> without first four bytes (without [47, 0, 0, 0]).
    "gssHeader" is created correctly because in debug log I see:
    Incoming warped content length: 1671
    Incoming GSS header OID: 1.2.840.113554.1.2.2
    Incoming GSS header length: 15
    Incoming GSS header MechTokenLength: 1656
    but on "unwrap" operation I've got exception:
    GSSException: Defective token detected (Mechanism level: Invalid padding on Wrap Token)
         at sun.security.jgss.krb5.CipherHelper.arcFourDecrypt(CipherHelper.java:1226)
         at sun.security.jgss.krb5.CipherHelper.decryptData(CipherHelper.java:532)
         at sun.security.jgss.krb5.WrapToken.getDataFromBuffer(WrapToken.java:230)
         at sun.security.jgss.krb5.WrapToken.getData(WrapToken.java:195)
         at sun.security.jgss.krb5.WrapToken.getData(WrapToken.java:168)
         at sun.security.jgss.krb5.Krb5Context.unwrap(Krb5Context.java:941)
         at sun.security.jgss.GSSContextImpl.unwrap(GSSContextImpl.java:384)
         at com.myproject.ws_management.WSServer$MyHandler.handle(WSServer.java:361)
         at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:65)
         at sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:65)
         at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:68)
         at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:552)
         at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:65)
         at sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:524)
         at sun.net.httpserver.ServerImpl$DefaultExecutor.execute(ServerImpl.java:119)
         at sun.net.httpserver.ServerImpl$Dispatcher.handle(ServerImpl.java:349)
         at sun.net.httpserver.ServerImpl$Dispatcher.run(ServerImpl.java:321)
         at java.lang.Thread.run(Thread.java:619)
    KeyTab instance already exists

    It looks like [47, 0, 0, 0] (hex [2F, 0, 0, 0]) is cipher suite, but on http://www.iana.org/assignments/tls-parameters
    I fount that it is:
    0x00,0x2F TLS_RSA_WITH_AES_128_CBC_SHA [RFC3268]
    So... what does this bytes can mean ?

  • Accessing Java webservice (XML over http) via WCF or HTTP adapter with content-type and authorization HTTP headers with POST method

    Hi Team,
    I need to access Java web service which is simple service and accepts and returns XML over HTTP. No credentials are needed to access the service. We need to pass following two HTTP headers (Content-Type and Authorization) along with XML request message:
    <GetStatus> message is being constructed in the orchestration and URI is constant to access.
    Which adapter shall I use to get the response back? I tried using WCF-WSHttp with Security Mode = Transport, and different options of client credential types but every time, error returned stating:
    System.Net.WebException:
    The HTTP request is unauthorized with client authentication scheme 'Basic'. The
    authentication header received from the server was 'Basic realm='.
    Authentication failed for principal Basic. Message payload is of type:
    String 
    In Fiddler, request looks line following
    POST <https://URL/GetServiceReopnse HTTP/1.1
    Content-Type: application/xml
    Authorization: Basic cmVmU3RhdHN2Y19kgeRfsdfs=
    Host: <Server name>
    <GetStatus XMLNS="http://server.com/.....">
    <OrgId>232323</OrgId>
    <HubId>3232342323</HubId>
    </GetStatus>
    MMK-007

    First, you should not use the HTTP Adapter because it's been deprecated and replaced by WCF.
    Start with the WCF-Custom Adapter and select the customBinding.
    You should start with the textMessageEncoder and httpTransport and go from there.

  • Content type is text\xml - 400 Bad Request, Content Type - Blank - success

    Hi,
    I have a send port subscribing to a message from the Message Box and sending the message to a service.
    The content type is text\xml, and it fails with a 400-Bad Request.
    If the send port picks up the message from a folder , Content Type is Blank, the service returns a response.
    How do I make the message picked up from the Message Box ( with Content Type text\xml)  work. Can I change the Content Type of the message at the Send Port (WCF-Custom, Basic HTTP Binding).
    Regards,
    Sharmishtha Sarkar

    You issue is not with Content Type text\xml  On the wire web request is passed as text\xml as content type and  issues is neither with send port folder .
    I would say you need to check your send port binding and  SOAP Action header inside your Send Handler . Best way to import the binding generated while consuming service through BizTalk WCF Service Consuming Wizard.
    I suspect you are sending wrong message to web service and thus due to data contract conflict you are getting exception from the service .
    There are various articles which can guide you how to consume web service in BizTalk .Some of them are listed below .
    How to Use the BizTalk WCF Service Consuming Wizard to Consume a WCF Service
    BizTalk and WCF: Part I, Operation Patterns
    Consuming WCF Service in BizTalk 2010 Orchestration
    Thanks
    Abhishek

  • How to change content/type from applicaiton/xml to text/xml??

    Hi B2B Gurus,
    Now that i have worked out file transfer. I was now trying to post the same document onto a HTTP URL.
    I see in the headers that the
    Content-Type=application/XML
    However i need the Content-Type to be text/XML
    Where can i get this changed?
    Edited by: user773213 on Apr 8, 2009 4:48 AM

    i tried it but it still shows the same content-type
    ***************************B2B.LOG************************************************
    2009.04.08 at 18:45:29:500: Thread-10: Repository - (INFORMATION) BIND VARS = (5B7A966871774858A1C935F4ADEECA85-95-1, 95, 1, N, http://ap604fin.us.oracle.com:7787/HTTPService/Receiver, <0AB05E5912085DE6D600000082D60500@AS2_Mycompany>, null, null, , Processing, oracle.tip.repos.core.driver.BinaryImpl@10bbd42, , null, , oracle.tip.repos.core.driver.BinaryImpl@1b6772a, null, null, null, HTTP, , 1.0, Wed Apr 08 18:45:29 GMT+05:30 2009, , Message-ID=<0AB05E5912085DE6D600000082D60500@AS2_Mycompany>
    Content-Transfer-Encoding=binary
    MIME-version=1.0
    From=AS2_Mycompany
    Receipt-Delivery-Option=file://localhost/ORACLE_HOME\MyCompany
    Disposition-Notification-To=[email protected]
    AS2-To=AS2_Supplier1
    User-Agent=AS2 Server
    Date=Wed, 08 Apr 2009 13:15:17 GMT
    AS2-Version=1.1
    AS2-From=AS2_Mycompany
    Content-Type=application/XML; name=ShipOrder
    Connection=close
    , null, 0AB05E5912085DE72520000082D60600, null, 3C4DF09FF3304FA698C287DA35154FDB, 826050DF70374FF389E372DB6D126D46)
    2009.04.08 at 18:45:29:906: Thread-10: Repository - (DEBUG) CatalogDriver.writeObjectList()
    ***********************************************************************************

  • XDB returns javascript with Content-type:windows-1251. I want utf-8.

    Release 11.1.0.6.0 - Production on Пн Апр 27 22:25:51 2009
    Hi.
    I have static javascript file main.js. I want to use it in my APEX application.
    I use XDB and I put this file via FTP in /public/htmlbuilder folder. This file is UTF-8 encoded without BOM.
    But when I request this file XDB returns it in windows-1251 encoding.
    c:\temp> get -de http://127.0.0.1:7777/public/htmlbuilder/main.js
    Content-Type: application/x-javascript; charset=WINDOWS-1251
    So my question is How can I make XDB return main.js in utf-8 charset
    I try adding
    <charset-mapping xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd">
    <extension>js</extension>
    <charset>UTF-8</charset>
    </charset-mapping>
    to xdbconfig — didn't help.
    Thanks in advance.
    P.S. Sorry, English is not my native language.

    Thank you Marco, but this didn't solve my problem.
    Let me explain one more time.
    I put main.js in XDB via FTP.
    When I type in Firefox address bar http://127.0.0.1:7777/public/htmlbuilder/main.js
    Firefox shows me this file in windows-1251 encoding. And my preferrable encoding in Firefox settings is utf-8. .
    I found out that XDB include header
    Content-Type: application/x-javascript; charset=WINDOWS-1251
    in HTTP Response headers.
    I wonder where XDB takes this windows-1251. How can I change it to AL32UTF8?

  • Resource interpreted as Document but transferred with MIME type application/postscript.

    Hi,
    we are running framed web pages showing preview (PNG or JPEG) of postscript files. These previews are simply linked to the postscript files. Following this links one gets the postscript source shown and not the graphics!? The error console says:
    Resource interpreted as Document but transferred with MIME type application/postscript.  
    When one chooses to:
    Open link in new tab
    the postscript is correctly shown!
    The rough layout of the pages is:
    Start page:
      and frame2.htm (frame1.htm is not of importance):
    When one sets the target to open up a new page the postscript is shown correctly, but we want the postscript to be shown in the 'content' frame!
    If I remember correctly, did this work as wanted in the past and changed the behavior the last year. We experience this behavior in snow leopard and lion (all running the up to date Safari - and yes we are upgrading constantly).
    Any help to get the wanted behavior (back), would be very appreciated!!
    Cheers,
    Raimund

    same thing for me, anyone have any info on this?

  • How to Read a Message with Content Type multipart/alternative

    Hi ,
    I need to write a POP3 Client to read email message ..but some times the messages comes with content type multipart/alternative
    how to parse it and read only one of the content :
    for example :
    This is a multi-part message in MIME format.
    ------=_NextPart_000_12C25_01C6B64F.09226B00
    Content-Type: text/plain;
    charset="iso-8859-1"
    Content-Transfer-Encoding: 7bit
    Assignment to workgroup Name 1 : L2 SD Service Delivery Apps Spt
    Open CI Search Code : HPSD
    Description : tesat
    General Information :
    Is the workgroup owner Aware of the addition to Workgroup : Yes
    Workgroup to be added :
    L2 SD Service Delivery Apps Spt
    ------=_NextPart_000_12C25_01C6B64F.09226B00
    Content-Type: text/html;
    charset="iso-8859-1"
    Content-Transfer-Encoding: quoted-printable
    <br><P>Assignment to workgroup Name 1 : L2 SD Service Delivery Apps =
    Spt</P>
    <P>Open CI Search Code : HPSD</P>
    <P>Description : tesat</P>
    <P>General Information :</P>
    <P>Is the workgroup owner Aware of the addition to Workgroup : Yes</P>
    <P>Workgroup to be added :</P>
    <P>L2 SD Service Delivery Apps Spt</P>
    <P> </P>
    <P> </P>
    <P> </P>
    <P> </P>
    <P> </P>
    ------=_NextPart_000_12C25_01C6B64F.09226B00--
    The Same message is in text as well as HTML so not sure how to read it .
    currently my program is as follows
    for (int i = 0; i < found.length; i++) {
    Message m = found;
    // Get some headers
    Date date = m.getSentDate();
    Address [] from = m.getFrom();
    String subj = m.getSubject();
    String mimeType = m.getContentType();
    System.out.println(date + "\t" + from[0] + "\t" +
    subj + "\t" + mimeType);
    Object o = m.getContent();
    if (o instanceof String) {
    System.out.println("**This is a String Message**");
    System.out.println((String)o);
    } else if (o instanceof Multipart) {
    System.out.print("**This is a Multipart Message. ");
    Multipart mp = (Multipart)o;
    int count3 = mp.getCount();
    System.out.println("It has " + count3 +
    " BodyParts in it**");
    for (int j = 0; j < count3; j++) {
    // Part are numbered starting at 0
    BodyPart b = mp.getBodyPart(j);
    String mimeType2 = b.getContentType();
    System.out.println( "BodyPart " + (j + 1) +
    " is of MimeType " + mimeType);
    Object o2 = b.getContent();
    if (o2 instanceof String) {
    System.out.println("**This is a String BodyPart**");
    System.out.println((String)o2);
    } else if (o2 instanceof Multipart) {
    System.out.print(
    "**This BodyPart is a nested Multipart. ");
    Multipart mp2 = (Multipart)o2;
    int count2 = mp2.getCount();
    System.out.println("It has " + count2 +
    "further BodyParts in it**");
    } else if (o2 instanceof InputStream) {
    System.out.println(
    "**This is an InputStream BodyPart**");
    } //End of for
    } else if (o instanceof InputStream) {
    System.out.println("***********************************This is an InputStream message**");
    InputStream is = (InputStream)o;
    /* if(m.getContentType().equalsIgnoreCase("multipart/alternative")) {
    MimeMultipart mp = new MimeMultipart();
    // Assumes character content (not binary images)
    } else {*/
    BufferedReader reader
    =new BufferedReader(new InputStreamReader(is));
    String thisLine=reader.readLine();
    while (thisLine!=null) {
    System.out.println(thisLine);
    thisLine=reader.readLine();
    So when the Content TYpe is multipart/alternative it goes into InputStream message .
    any help and ideas to handel such situations ?
    Thanks
    San
    Message was edited by:
    sanrosh_95

    Try reposting that with tags (replace the {'s with ['s).
    Long story short, I think the FAQ and examples would go a long way towards explaining this, but you basically can check the content type, or check if the content contains parts, and parse each part separately.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Batch uploading to a document library with content types

    Hi,
    I have a document library with two content types. Now I need to upload documents to this document library. However, if I have large number of files, then uploading through web UI is a pain as metadata will not be attached. How should I automate it  from
    my computer using powershell without relying on Administrator to run the powershell script. Or is there any other way to do it without using powershell? or  can powershell be run remotely from an end user computer?
    Note I am using SharePoint 2010.

    Hi,
    According to your post, my understanding is that you want to butch upload files to document library with content types.
    There are two good tools in CodePlex which can batch upload files with content types, you can have a look at them.
    DocMetaMan : Bulk document Upload and MetaData (Taxonomy) Setter
    SharePoint Multiple File Upload Script
    There are some third-party tools which can achieve the same scenario, you can refer to it.
    http://sharepoint.stackexchange.com/questions/74694/uploading-multiple-files-with-metadata
    Thanks,
    Jason
    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]
    Jason Guo
    TechNet Community Support

  • Problem with mime type in web.xml file

    Hi everybody,
    I actually got a problem with mime types on Weblogic 6.0 under Linux.
    I read the documentation so I added the next lines in the web.xml file in
    the WEB-INF directory of my server :
    <mime-mapping>
    <extension>
    doc
    </extension>
    <mime-type>
    application/msword
    </mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>
    ppt
    </extension>
    <mime-type>
    application/vnd.ms-powerpoint
    </mime-type>
    </mime-mapping>
    Why can't I retrieve a .doc or .ppt files with an internet browser correctly
    ? I get only text/plain ...
    Can someone help me ?
    Regards,
    Alexis Berger

    I am having the same problem with doc and xsl. I have added this
    <mime-mapping>
    <extension>xls</extension>
    <mime-type>application/vnd.ms-excel</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>doc</extension>
    <mime-type>application/msword</mime-type>
    </mime-mapping>
    to my web.xml. I even restarted the server. I still see doc and xsl in binary.
    Is there some other setting that needs to take place?
    I am using WL6.1 with fixpack 1.
    I can see the doc and excel files in the browser if I don't go through the weblogic
    server. That just confirms it's not my browser.
    Kumar Allamraju <[email protected]> wrote:
    <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
    <html>
    It works fine for me in 6.1 SP1.
    <br><br>
    If the following doesn't work , can you
    <br>try application/winword instead of application/msword?
    <p>--
    <br>Kumar
    <p>Siming Mu wrote:
    <blockquote TYPE=CITE>Hi,
    <p>I setup in my web.xml a mime mapping as follows,
    <p><mime-mapping>
    <br><extension>doc</extension><mime-type>application/msword</mime-type>
    <br></mime-mapping>
    <p>When I specify a test.doc url, the doc file appears in my browser
    as
    binary data
    <br>instead of download.
    <p>Please reference change request 055002, which decribes this problem. 
    According
    <br>to edocs, it has been fixed in wls6.1sp1.
    <p>But I am seeing it fixed.  Am I doing anything wrong? Thanks.
    <p>Siming</blockquote>
    </html>

  • Making HTTP requests with content-disposition

    I need to write a Java app that can access a web server that returns most content as files (ie. using content-disposition).
    Previously I have used something like this to make HTTP GET requests to return files on a web server.
    ��String strUrl = "http://www.yahoo.com/index.html";
    ��URL url = new URL( strUrl );
    ��URLConnection conn = url.openConnection();
    ��InputStream in = url.openConnection.getInputStream();
    ��byte[] buf = new byte[conn.getContentLength()];
    ��in.read( buf, 0, getContentLength() );
    This doesn't seem to work when the HTTP header has "content-disposition". Here is the header returned by the web server.
    ��Server=Microsoft-IIS/4.0
    ��Date=Thu, 04 Jul 2002 13:18:53 GMT
    ��Content-Disposition=filename=file.xyz
    ��Content-Type=text/html
    ��Cache-control=private
    ��Transfer-Encoding=chunked
    ��content-length=30306
    The number of bytes actually read (as returned by in.read()) is less than the number of bytes as indicated in the content-length.
    How can I handle this?
    Mike

    I have managed to discover that an incorrect content-type header is causing the problems that I have been encountering with file downloads from a web server.
    As I mentioned in a previous post the content-length header was not a good indicator of file download success.
    My program downloads pictures from the internet, almost always in .jpeg format. I have found that files are successfully downloaded only when the content-type header contains the words: image/jpeg. In some instances although I am trying to download a picture file the http content-type header is stated as being: text/html.
    In those instances where text/html is given as the content-type file download fails in so far as the files are not acutally viewable on the native system (Windows varieties in my case).
    To determine the error I used the following code:
    URLConnection urlConnect = myURL.openConnection();
    System.out.println("Http Header, Content-Type: "+urlConnect.getContentType());
    System.out.println("Http Header, Content-Length: "+urlConnect.getContentLength());Even though content-length mostly corresponded with the downloaded files length, if the Conten-Type header was wrong then the file was all but useless.
    Regards
    Davo

  • E-Mail recevier with Content-Type: multipart/mixed

    Hi All,
    I am working on proxy to Mail scenario, wherein Pi is receiving data from SAP over proxy, creating a csv of the data and sending it to recipient as the email with the attachment.
    The User is saying that he wants the email content type as Multipart MIME format. I have searched on SDN and web, but couldnu2019t find how to implement in PI.Please provide your inputs.
    Thanks in advance,
    Ruchi

    Hi Ruchi,
    You need to use Java Mapping or UDF to create Multipart/Mime
    Check this excellent blog by stefan.
    http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/6321
    Also check this thread for your solution
    http://forums.sdn.sap.com/message.jspa?tstart=0&messageID=945095

Maybe you are looking for

  • Std::atomic_exchange return wrong pointer type

    I am using the following product: Microsoft Visual Studio Professional 2013 Version 12.0.31101.00 Update 4 Given the following example: #include <atomic> #include <iostream> std::atomic<int*> ptr = nullptr; int desired = 5; auto previous0 = std::atom

  • IPhone 2.0 Software Update for my Edge Version 8GB

    With the new 2.0 update what will I get? It looks like my phone will get GPS?

  • New Artwork Glitch for 10.6?

    Last night I downloaded the latest edition of iTunes and immediately I noticed something was off. The artwork on some of my albums have some glitch problems around the border of the art. The really odd part is that it's not exactly affecting the same

  • ITunes 9 won't store settings for iPhoto Sync

    After installing iTunes 9 I experience the following problem: In iTunes I select the option to sync all photos from the last year. It will sync with the Apple TV and you can watch the photos on the Apple TV. But after closing iTunes and restart it it

  • All Rows not displaying

    Hi i have two regions. Region 1 is check box region where you check the columns and region2 displays report of checked columns. Region two is displayed when submit button is pressed in region1 Now I have report is set up with 15 rows per page so when