Weblogic-Modifying the content type

Hi All,
Is there a way to modify the content type in the Weblogic server.
Basically what I want to do is, make IE6 to IE8 compatible for CSS3. I read somewhere that ".htaccess" file should be modified to make it work. I would like to add the below line...
AddType text/x-component .htc
So, where do I add this ?? Can some1 guide me as I dont know how to play around with WLS. I dont even know if there is such setting in WLS.
WLS: 10g
Thanks in advance..

Tom and I exchanged several emails on this topic. It would appear that the problem (mail setting the content-type to ISO-2022-JP) is caused when certain characters in the quoted text of a reply are encoded; mail decides it needs to specify ISO-2022-JP. Characters identified as causing the problem are smart quotes and apostrophes. If you look at the apostrophe in the raw text it appears as =1B$B!G=1B(B and the smart quotes as =1B$B!H=1B(B and =1B$B!I=1B(B
AK

Similar Messages

  • 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

  • Can I modify the data type of a dynamic parameter?

    I am using CR2008 against an Oracle 11 db and have a report with dynamic parameters.
    One of the report sources is a custom view that selects all of the possible 'pay ending dates' where one of the fields from this view is used as the source for the dynamic parameter.
    The view performs a TRUNC on the date field in an effort to eliminate the TIME component.
    The problem is that the parameter definintion defaults to DATE/TIME (vs. just DATE). I'm wondering if there is any way to modify the data type of the parameter to be DATE only.
    I've searched several forumns but have not found anything.
    One solution I can think of is to have the custom view format the date field as a VARCHAR (sans the time component) which I assume would force the dynamic parameter data type to string, and then have the report perform a todate function on the value when applying the criteria.
    Anyone else have an idea? Just seems like CR should allow the developer to specify the data type- especially b/w Date and Date/Time, rather than make an assumption.
    Thank you in advance-
    emaher

    emaher,
    Here's what you can do:
    Leave the existing date column as it is in the view...
    Just add another column to the view that casts the the date as a VarChar data type and formats the date as you would like it to be.
    So now you'll have 2 date columns in the view... 1 that's still a date and another that a character string.
    Now for your parameter, use the date version as the parameter value and the text version as the parameter description.
    Be sure to set the "Prompt with description only" is set to true.
    This way the user sees the LoV in the desired format but there's not need to wrangle it back into a date for data selection.
    HTH,
    Jason

  • Visual Studio 2013 deploying incorrectly the content types of a document library

    Hello everyone. 
    I created a SharePoint farm solution in VS 2013. I add four content types (say, C1, C2, C3, C4, based on the Document content type) and I create a couple of document libraries (say, L1, L2). Now I add C1 and C2 to L1, and add C3 and C4 to L2. 
    When I deploy the solution from VS, I go to the site and found out that L1 has C1 and C2, as expected. However, L2 has C1 and C2 instead of C3 and C4. 
    I have reviewed for hours the xml files (Elements, Schema, etc.) and all IDs seem to be correct and all properties are in order. 
    Has anyone come across a problem like this? Any thoughts will be really appreciated, as I'm clueless and frustrated at this point, after hours of dealing with this problem. 
    Thanks in advance!
    Best regards
    Fernando A. Gómez F.
    fermasmas.wordpress.com
    Galería de ejemplos

    Hi Sohel, thanks for your reply. 
    No, I don't add them programmatically, I added the "Content Type" and "List" items to the VS solution. It generated some files, including Elements.xml and Schema.xml. Then I used the integrated VS designers to add the content types to
    the list. A very run-of-the-mill solution, I think, nothing too fancy. 
    One thing I noticed is that I created a feature, and everytime I add a new list, instead of using the existing feature, it creates a new one, which I delete, and then add the list to the existing feature using the designer. 
    Finally, something weird happened today. I opened my VS, opened the solution and there was several feature files created out of the blue by the VS. I thought something was messed up with the Visual Studio Online connection, but it happens anyway when working
    in disconnected mode. 
    Fernando A. Gómez F.
    fermasmas.wordpress.com
    Galería de ejemplos

  • 2013 Exchange, Can't connect to Exchange Management Shell. It cannot determine the content type of the HTTP response from the destination computer.

    The following error occurs.
             Welcome to the Exchange Management Shell!
    Full list of cmdlets: Get-Command
    Only Exchange cmdlets: Get-ExCommand
    Cmdlets that match a specific string: Help *<string>*
    Get general help: Help
    Get help for a cmdlet: Help <cmdlet name> or <cmdlet name> -?
    Show quick reference guide: QuickRef
    Exchange team blog: Get-ExBlog
    Show full output for a command: <command> | Format-List
    Tip of the day #0:
    Did you know that the Identity parameter is a "positional parameter"? That means you can use:
     Get-Mailbox "user" instead of: Get-Mailbox -Identity "user"
    It's a neat usability shortcut!
    VERBOSE: Connecting to mail1.dorothy.local.
    New-PSSession : [mail1.dorothy.local] Connecting to remote server mail1.dorothy.local failed with the following error
    message : The WinRM client cannot process the request. It cannot determine the content type of the HTTP response from
    the destination computer. The content type is absent or invalid. For more information, see the
    about_Remote_Troubleshooting Help topic.
    At line:1 char:1
    + New-PSSession -ConnectionURI "$connectionUri" -ConfigurationName Microsoft.Excha ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotin
       gTransportException
        + FullyQualifiedErrorId : -2144108297,PSSessionOpenFailed
    Exception calling "GetComputerSite" with "0" argument(s): "The Specified directory object cannot be found."
    At C:\Program Files\Microsoft\Exchange Server\V15\bin\ConnectFunctions.ps1:164 char:2
    +     $localSite=[System.DirectoryServices.ActiveDirectory.ActiveDirectorySite]::GetC ...
    +    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
        + FullyQualifiedErrorId : ActiveDirectoryObjectNotFoundException
    Failed to connect to an Exchange server in the current site.
    Enter the server FQDN where you want to connect.: mail1.dorothy.local
    VERBOSE: Connecting to mail1.dorothy.local.
    New-PSSession : [mail1.dorothy.local] Connecting to remote server mail1.dorothy.local failed with the following error
    message : The WinRM client cannot process the request. It cannot determine the content type of the HTTP response from
    the destination computer. The content type is absent or invalid. For more information, see the
    about_Remote_Troubleshooting Help topic.
    At line:1 char:1
    + New-PSSession -ConnectionURI "$connectionUri" -ConfigurationName Microsoft.Excha ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotin
       gTransportException
        + FullyQualifiedErrorId : -2144108297,PSSessionOpenFailed
    Randy Cheek

    Good Morning,
    Log into the server with an account that has appropriate Exchange rights, not a local account.  
    Note: By default - Domain Admins don't have Exchange rights.
    Dame Luthas, ITILv3, MCSE Messaging 2013, MCSA, MCITP
    My Technical Blog: http://thelifestrategist.wordpress.com
    Discipline is the Difference between Goals and Accomplishments
    If this post is useful, please hit the green arrow on the left & if this is the answer hit "mark as answer"

  • Sharepoint error - Search Issue - The content type text/html; charset=utf-8 of the response message does not match the content type of the binding (application/soap+msbin1).

    i see this error everywhere - In ULS logs, on site. On the site > Site settings > search keywords; I see this - 
    The content type text/html; charset=utf-8 of the response message does not match the content type of the binding (application/soap+msbin1). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were: '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>IIS 7.0 Detailed Error - 500.19 - Internal Server Error</title> <style type="text/css"> <!-- body{margin:0;font-size:.7em;font-family:Verdana,Arial,Helvetica,sans-serif;background:#CBE1EF;} code{margin:0;color:#006600;font-size:1.1em;font-weight:bold;} .config_source code{font-size:.8em;color:#000000;} pre{margin:0;font-size:1.4em;word-wrap:break-word;} ul,ol{margin:10px 0 10px 40px;} ul.first,ol.first{margin-top:5px;} fieldset{padding:0 15px 10px 15px;} .summary-container fieldset{padding-bottom:5px;margin-top:4px;} legend.no-expand-all{padding:2px 15px 4px 10px;margin:0 0 0 -12px;} legend{color:#333333;padding:4px 15px 4px 10px;margin:4px 0 8px -12px;_margin-top:0px; border-top:1px solid #EDEDED;border-left:1px solid #EDEDED;border-right:1px solid #969696; border-bottom:1px solid #969696;background:#E7ECF0;font-weight:bold;'.
    I am facing issues in searching, my managed metadata service is not running, search results page throws internal error. Any Idea why this above error comes.
    P.S: We use windows authentication in our environment.

    Hi IMSunny,
    It seems you have solved this issue based on your another post.
    http://social.technet.microsoft.com/Forums/en-US/aa468ab0-1242-4ba8-97ea-1a3eb0c525c0/search-results-page-throws-internal-server-error?forum=sharepointgeneralprevious
    Thanks
    Daniel Yang
    TechNet Community Support

  • Error consuming Web service - content type text/xml;charset=utf-8 of the response message does not match the content type of the binding

    Hi all,
    We are trying to interact with Documentum server through DFS exposed WCF which communicates through port 9443 and we are provided with documentum issued Public Key certificates. We have successfully imported the certificates in client machine and configured
    the bindings as below in our .Net web application config file.
    <system.serviceModel>
    <bindings>
    <wsHttpBinding>       
    <binding
    name="ObjectServicePortBinding1">
    <security
    mode="Transport">
    <transport
    clientCredentialType="None"
    proxyCredentialType="None"
    realm=""
    />
    <message
    clientCredentialType="Certificate"
    algorithmSuite="Default"
    />
    </security>
    </binding>
    <binding
    name="QueryServicePortBinding">
    <security
    mode="Transport">
    <transport
    clientCredentialType="None"
    proxyCredentialType="None"
    realm=""
    />
    <message
    clientCredentialType="Certificate"
    algorithmSuite="Default"
    />
    </security>
    </binding>
    </wsHttpBinding>
    </bindings>
    Also, we set the message encoding as MTOM and the wcf client object initialization code snippet is as below,
    ObjectServicePortClient
    serviceClient = new
    ObjectServicePortClient(new
    WSHttpBinding("ObjectServicePortBinding1"),
    new
    EndpointAddress(UriUtil.ObjectServiceUri));
    if (serviceClient.Endpoint.Binding
    is
    WSHttpBinding)
       WSHttpBinding
    wsBinding = serviceClient.Endpoint.Binding as
    WSHttpBinding;
    wsBinding.MessageEncoding =
    "MTOM".Equals(transferMode) ?
    WSMessageEncoding.Mtom :
    WSMessageEncoding.Text;
    serviceClient.Endpoint.Behaviors.Add(new
    ServiceContextBehavior(Config.RepositoryName,
    Config.DocumentumUserName,
    Config.DocumentumPassword));
    When we execute the above code, we are getting error message as below,
    Exception: The content type text/xml;charset=utf-8 of the response message does not match the content type of the binding (multipart/related; type="application/xop+xml"). If using a custom encoder, be sure that the IsContentTypeSupported
    method is implemented properly. The first 407 bytes of the response were: '<?xml version="1.0" ?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><S:Fault xmlns:ns4="http://www.w3.org/2003/05/soap-envelope"><faultcode>S:VersionMismatch</faultcode><faultstring>Couldn't
    create SOAP message. Expecting Envelope in namespace http://schemas.xmlsoap.org/soap/envelope/, but got http://www.w3.org/2003/05/soap-envelope </faultstring></S:Fault></S:Body></S:Envelope>'
    Then, we changed the bindings as below
    <system.serviceModel>
    <bindings>
    <wsHttpBinding>       
    <binding
    name="ObjectServicePortBinding1">
    <security
    mode="Transport">
    <transport
    clientCredentialType="Certificate"
    proxyCredentialType="None"
    realm=""
    />
    <message
    clientCredentialType="Certificate"
    algorithmSuite="Default"
    />
    </security>
    </binding>
    <binding
    name="QueryServicePortBinding">
    <security
    mode="Transport">
    <transport
    clientCredentialType="
    Certificate"
    proxyCredentialType="None"
    realm=""
    />
    <message
    clientCredentialType="Certificate"
    algorithmSuite="Default"
    />
    </security>
    </binding>
    </wsHttpBinding>
    </bindings>
    We are getting another error message,
    Exception: The client certificate is not provided. Specify a client certificate in ClientCredentials.
    Any pointers on resolving this issue would be highly helpful.
    Thanks

    Hi Dhanasegaran,
      As per your case, the corresponding details which may guide you to resolve this issue:
    1. First of all, you can try to call the wcf service directly from the browser & check where it will point out the correct location.
    2. In config file ,Set IncludeExceptionDetailInFaults to true to enable exception information to flow to clients for debugging purposes .
    Set this to true only during development to troubleshoot a service like below :
    <serviceBehaviors>
      <behavior name="metadataAndDebugEnabled">
        <serviceDebug
          includeExceptionDetailInFaults="true"   
    />
        <serviceMetadata
          httpGetEnabled="true"
          httpGetUrl=""   
    />
      </behavior>
    </serviceBehaviors>
    3. I suggest you to change that <security mode ="TransportWithMessageCredential"> instead of <security mode ="Transport">
     for more information, refer the following link :
    https://msdn.microsoft.com/en-us/library/aa354508(v=vs.110).aspx

  • WCF returning "The content type text/html of the response message does not match the content type of the binding (application/soap+xml; charset=utf-8)"

    I have a WCF service I am trying to run on a new installation of 64-bit Windows Server 2008 IIS. Although it runs fine on Windows 2003 IIS, it is throwing the error in the thread title, which appears to be a server config issue, but I am not sure. Googling and searching the MSDN forums did not turn up a solution. I tried running WCF Logging, but that didn't help either.
    Does anyone have any suggestions on how to solve this probelm?
    Here is the error:
    The content type text/html of the response message does not match the content type of the binding (application/soap+xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were: '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
    <title>500 - Internal server error.</title>
    <style type="text/css">

    I have the same issue on Windows 7 machine. The service works fine using a SoapUI client but a .Net client faisl to get a response.
    Hi,
    I have a WCF service which works perfectly when using SoapUI but throws error in my .Net client.
    {"The content type text/html; charset=UTF-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first
    1024 bytes of the response were: '<HTML><HEAD><link rel=\"alternate\" type=\"text/xml\" href=\"http://xyz.mysite.com/ysa/Broker.svc?disco\"/><STYLE type=\"text/css\">#content{ FONT-SIZE: 0.7em;
    PADDING-BOTTOM: 2em; MARGIN-LEFT: 30px}BODY{MARGIN-TOP: 0px; MARGIN-LEFT: 0px; COLOR: #000000; FONT-FAMILY: Verdana; BACKGROUND-COLOR: white}P{MARGIN-TOP: 0px; MARGIN-BOTTOM: 12px; COLOR: #000000; FONT-FAMILY: Verdana}PRE{BORDER-RIGHT: #f0f0e0 1px solid; PADDING-RIGHT:
    5px; BORDER-TOP: #f0f0e0 1px solid; MARGIN-TOP: -5px; PADDING-LEFT: 5px; FONT-SIZE: 1.2em; PADDING-BOTTOM: 5px; BORDER-LEFT: #f0f0e0 1px solid; PADDING-TOP: 5px; BORDER-BOTTOM: #f0f0e0 1px solid; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e5e5cc}.heading1{MARGIN-TOP:
    0px; PADDING-LEFT: 15px; FONT-WEIGHT: normal; FONT-SIZE: 26px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 3px; MARGIN-LEFT: -30px; WIDTH: 100%; COLOR: #ffffff; PADDING-TOP: 10px; FONT-FAMILY: Tahoma; BACKGROUND-COLOR: #003366}.intro{MARGIN-LEFT: -15px}</STYLE><TITLE>Broker
    Service</TITLE></HEAD><BODY><DIV id=\"content\"><P class=\"head'."}
    I have the same service hosted on my local machine and when I point to the local service I can execute the operation with no issues. The message encoding is Soap11. I tried changing to Soap12 but I get exact same error. Any ideas greatly appreciated.
    I do have windows Activation Features installed and I am using .Net Framework 4.
    Thanks
    Sofia Khatoon

  • The content type of the response message does not match the content type of the binding

    I have written an ASP.Net web service which returns english,chinese and portuguese data. Everything seemed working fine until the method retunred only english data. The moment it returns english, chinese and portuguese data I get the error:
    The content type text/html; charset=utf-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using
    a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were: 
    '<!DOCTYPE html> <html>     <head>         <title>Runtime Error</title>
            <meta name="viewport" content="width=device-width" />         <style>          body {font-family:"Verdana";font-weight:normal;font-size:
    .7em;color:black;}           p {font-family:"Verdana";font-weight:normal;color:black;margin- -5px}          b {font-family:"Verdana";font-weight:bold;color:black;margin-
             H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }          H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon
    }          pre {font-family:"Consolas","Lucida Console",Monospace;font-size:11pt;margin:0;padding:0.5em;line-height:14pt}          .marker {font-weight:
    bold; color: black;text-decoration: none;}          .version {color: gray;}          .error {margin-bottom: 10px;}          .expandable
    { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }          @media screen and (max-width: 639px) {           pre { width: 440px; o'.
    It is not written using WCF ... any workarounds?!
    Thank you.

    Hi Raj Krish,
    For ASP.NET related issue, please post to the following forum:
    http://forums.asp.net/
    Regards,
    Barry
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to chek the content type thru java script !!

    Hii Guys ,one more prb,
    I need to develop a file uploading utility in struts to upload ZIP files(only ZIP), and i sucseeded to do it using the commons.fileupload which comes along with the WSAD5.1(examples), but the prb is i need to chek for the MIME type and need to reject if its not a zip file, if i do this in actionclass, its waiting till the uploading process of the file is finished and finally its displaying file is not the a ZIP, i need to do this validation as the request comes to the server side, i cant not do this in clint side cause my design should not allow me to use any java script..so please let me know is there any way to specify in the controller it self .
    if i use java script, how can i do the Content type validation ?
    thanx in advance

    so definetly u mean , we need to wait till the
    filegot uploaded to server, if we use server side
    validation?Well, for server side validation, yes you have to wait for the file to upload.
    I've always kinda disliked that, since it could be a big file and/or slow connection. But short of possibly using JS to check the filename (and I don't remember if you actually can, and it's not accurate in many case), there's nothing else you can do.

  • 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

  • Apex_web_service.make_rest_request: Passing parameters and the content type

    Not sure if I am missing something, but should this API be setting the content type (to application/x-www-url-formencoded) when there are values present for the parameters p_parm_name and p_parm_value.
    The example in the docs is to a yahoo API. I'm not sure about that particular one (see: http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21676/apex_web_service.htm#BABEDJHJ), and I think it requires an appid (yahoo account), so i just went with the example here:
    http://developer.yahoo.com/yql/guide/yql-code-examples.html#yql_php
    If I run the following from a html file on my desktop it works:
    <form method="POST" action="http://query.yahooapis.com/v1/public/yql">
    <input type="hidden" name="q" value="select * from upcoming.events where location='San Francisco' and search_text='dance'"></input>
    <input type="hidden" name="format" value="json"></input>
    <input type="submit"></input>
    </form>That is, it returns a JSON result.
    The raw HTTP data is as follows:
    POST http://query.yahooapis.com/v1/public/yql HTTP/1.1
    Host: query.yahooapis.com
    Connection: keep-alive
    Content-Length: 110
    Cache-Control: max-age=0
    Origin: null
    User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.11 (KHTML, like Gecko) Ubuntu/12.04 Chromium/20.0.1132.47 Chrome/20.0.1132.47 Safari/536.11
    Content-Type: application/x-www-form-urlencoded
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Encoding: gzip,deflate,sdch
    Accept-Language: en-AU,en;q=0.8,en-US;q=0.6
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
    q=select+fromupcoming.events+where+location%3D%27San+Francisco%27+and+search_text%3D%27dance%27&format=json>
    However, running the following returns nothing: (nothing, as in nothing that depends on the parameters passed in)
    set serveroutput on
    declare
    l_c CLOB;
    begin
      l_c := apex_web_service.make_rest_request(
        p_url => 'http://query.yahooapis.com/v1/public/yql',
        p_http_method => 'POST',
        p_parm_name => apex_util.string_to_table('q:format'),
        p_parm_value => apex_util.string_to_table('select * from upcoming.events where location=''San Francisco'' and search_text=''dance'':json'),
        p_proxy_override => 'http://192.168.1.3:8888');
      dbms_output.put_line(substr(l_c, 1, 4000));
    end;Raw HTTP data:
    POST http://query.yahooapis.com/v1/public/yql HTTP/1.1
    Host: query.yahooapis.com
    Connection: Keep-Alive
    Content-Length: 106
    Connection: close
    q=select+%2A+from+upcoming%2Eevents+where+location%3D'San+Francisco'+and+search_text%3D'dance'&format=json>
    I do note a key difference is that content type isn't being set in the web service API.
    This was just to test a public service. I do note that the above has slighty different request data (percentage encoding on some chars). However, I experienced the same behaviour on a procedure I had written (I can also provide this example test case if you like), which is where I first noticed the issue.
    Using utl_http and setting the content type to application/x-www-url-formencoded, does resolve the issue. However, just thought i'd see the possibility of using the Web service API that is made available.
    Is the example in the docs valid, or am I missing something obvious?
    This is on ApEx 4.1 on the OTN Dev Days VM.
    Thoughts?

    Hi trent,
    I too have had issues with this API , so moved forward with UTL_HTTP API.
    There is something amiss.
    If you change your code to the one below it works.
    SET SERVEROUT ON
    declare
    l_c CLOB;
    l_param varchar2(1000) ;
    begin
    l_param := 'select * from upcoming.events where location=''San Francisco'' '||
            ' and search_text=''dance'''||'&'||'format=json';
    l_c := apex_web_service.make_rest_request(
        p_url => 'http://query.yahooapis.com/v1/public/yql?q='||
            utl_url.escape(l_param)
        ,p_http_method => 'POST'
      dbms_output.put_line(substr(l_c, 1, 4000));
    end;
    /Note the use of UTL_URL.ESCAPE. The call does not work without it.
    I do not use a proxy, so that parameter does not feature in my snippet above.
    Cheers,
    PS: However, the below does not work. So, it appears that the p_parm_name and p_parm_value do not quite work.
    SET SERVEROUT ON;
    declare
    l_c CLOB;
    l_param varchar2(1000) ;
    begin
    l_param := 'select * from upcoming.events where location=''San Francisco'' and search_text=''dance''';
    l_c := apex_web_service.make_rest_request(
        p_url => 'http://query.yahooapis.com/v1/public/yql'
        ,p_http_method => 'POST'
        ,p_parm_name => apex_util.string_to_table('q:format')
        ,p_parm_value => apex_util.string_to_table(utl_url.escape(l_param)||':json')
      dbms_output.put_line(substr(l_c, 1, 4000));
    end;
    / Edited by: Prabodh on Oct 13, 2012 2:04 PM

  • Modify the Field Type of standard Table fields in a Query

    Hello. I have a question.
    Is there a way to "modify" the field type for standard table fields that are included in a Query?
    I made a simple query out of a join of tables, but several fields have a lot of decimals, and I would like to present them in the query without any decimals, just as a regular "N" field.
    I tried the possibility of creating extra local fields where all I do is transfer the value to the new "N" field, but I have many fields like this, so if there's a better way; I'd prefer that.
    Maybe somewhere in the InfoSet there's a way to modify the type of the standard table fields?
    Thank you.

    Hi,
    This document may help you out.
    [http://help.sap.com/saphelp_erp60_sp/helpdata/en/d2/cb4468455611d189710000e8322d00/frameset.htm|http://help.sap.com/saphelp_erp60_sp/helpdata/en/d2/cb4468455611d189710000e8322d00/frameset.htm]
    Cheers,

  • 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.

  • 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

Maybe you are looking for