Unsupported response content type soap error

I have created a java method that returns an array of a class type (my class is an EJB). Then created a web service using Apache soap as deployment platform (see my previous posting for details). Created client stub and client application to access the method and display the result on the screen. When running the client application I get the 'unsupported response content type' error.
Can anyone help please, I am desparate!!!
Thanks
Alina

I have created the following EJB class and another class that has got the web method:
package orbatlistarraypackage;
import java.util.Date;
import java.io.Serializable;
public class OrbatType implements java.io.Serializable
public String orbatName;
public int orbatID;
public OrbatType()
public void setOrbatName(String pName)
orbatName = pName;
public String getOrbatName()
return orbatName;
public void setOrbatID(int pID)
orbatID = pID;
public int getOrbatID()
return orbatID;
I have another class that is an array of the OrbatType class and has a webmethod that returns the array.
package orbatlistarraypackage;
import java.sql.*;
public class OrbatListArray
OrbatType [] orbatList;
public OrbatListArray()
private void setOrbatArray() throws Exception
Connection cn = GetOrbatConnection.getConnection();
Statement st = cn.createStatement();
ResultSet rs = st.executeQuery("SELECT DESCRIPTION as ORBATNAME, ID AS ORBATID FROM ORBATS");
//to get number of records to determine array size
int noOfRecords;
noOfRecords = 0;
while(rs.next())
noOfRecords = noOfRecords + 1;
//new recordset as rs is once only forward reading recordset.
ResultSet rsOrbat = st.executeQuery("SELECT DESCRIPTION as ORBATNAME, ID AS ORBATID FROM ORBATS");
orbatList = new OrbatType[noOfRecords];
int i;
i = 0;
while(rsOrbat.next())
orbatList[i] = new OrbatType();
orbatList.SetOrbatName(rsOrbat.getString("ORBATNAME"));
orbatList[i].SetOrbatID(rsOrbat.getInt("ORBATID"));
i = i + 1;
rs.close();
rsOrbat.close();
@webmethod
public OrbatType [] getOrbatListArray() throws Exception
SetOrbatArray();
for(int i=0;i<orbatList.length;i++)
System.out.println(orbatList[i].GetOrbatName());
System.out.println(orbatList[i].GetOrbatID());
return orbatList;
//dummy to just generate the web service
//public int foo() {return 0;}
/*this works
public static void main(String arg[]) throws Exception
OrbatListArray myArray = new OrbatListArray();
myArray.GetOrbatListArray();
Does this answer your question? If so can you help please?
Thanks
Alina

Similar Messages

  • SOAP-Exception: unsupported response content type

    Hi,
    can anybody give me a little hint?.
    I currently try to run the JDeveloper "Tutorial" web service examples. I could successfully implement and deploy the DateTime Web-Service example. But when executing "DateTimeClient.java" I get the error message listed below.
    I'm using JDeveloper 9.0.2 and the OC4J- J2EE Container (standalone) shipped with JDeveloper
    Thanks for your help
    Thomas
    D:\Programme\oracle\jdev\jdev9i902\jdk\bin\javaw.exe -ojvm -classpath D:\Programme\oracle\jdev\jdev9i902\jdev\mywork\WebService\DateTimeClient\classes;D:\Programme\oracle\jdev\jdev9i902\jdev\lib\jdev-rt.jar;D:\Programme\oracle\jdev\jdev9i902\soap\lib\soap.jar;D:\Programme\oracle\jdev\jdev9i902\lib\xmlparserv2.jar;D:\Programme\oracle\jdev\jdev9i902\jlib\javax-ssl-1_2.jar;D:\Programme\oracle\jdev\jdev9i902\jlib\jssl-1_2.jar;D:\Programme\oracle\jdev\jdev9i902\jdk\jre\lib\ext\activation.jar;D:\Programme\oracle\jdev\jdev9i902\jdk\jre\lib\ext\mail.jar;D:\Programme\oracle\jdev\jdev9i902\j2ee\home\lib\http_client.jar -Dhttp.proxyHost=http-proxy.danet.de -Dhttp.proxyPort=8080 datetimeclientpackage.DateTimeClient
    [SOAPException: faultCode=SOAP-ENV:Protocol; msg=Unsupported response content type &quot;text/html&quot;, must be: &quot;text/xml&quot;. Response was:
    &lt;HTML&gt;&lt;HEAD&gt;&lt;TITLE&gt;Method Not Allowed&lt;/TITLE&gt;&lt;/HEAD&gt;
    &lt;BODY&gt;&lt;H1&gt;Method Not Allowed&lt;/H1&gt;
    An error has occurred.
    &lt;/BODY&gt;&lt;/HTML&gt;
         java.lang.String org.apache.soap.rpc.Call.getEnvelopeString(org.apache.soap.transport.SOAPTransport)
         org.apache.soap.rpc.Response org.apache.soap.rpc.Call.invoke(java.net.URL, java.lang.String)
         java.lang.String datetimeclientpackage.DateTimeClientStub.getDate()
         void datetimeclientpackage.DateTimeClient.main(java.lang.String[])
    Exception in thread main
    Process exited with exit code 1.

    I have just found the same/similar problem discussed some months ago. I have adopted the solution proposed by
    Raghu Kodali (disabling usage of http-proxy-server). Now the samples runs well.
    Thanks a lot.

  • Unsupported response content type "text/html", must be: "tex

    Hi Gurus,
    I'm trying to access a WebService (http://200.68.11.21/WebServices/RecibeMsgSoapISP.wsdl), but I've been facing the following problem below. Could anybody help me?
    //****************************** MY CODE
    FileInputStream file = new FileInputStream("c:\\EXE\\deuda2.xml");
    byte[] bytes = new byte[file.available()];
    file.read(bytes);
    String xml = new String(bytes);
    System.out.println("Xml:\n" + xml);
    URL endPoint =
    new URL(
    "http://200.68.11.21/WebServices/RecibeMsgSoapISP.wsdl");
    Call call = new Call();
    SOAPTransport m_httpConnection =
    new org.apache.soap.transport.http.SOAPHTTPConnection();
    call.setSOAPTransport(m_httpConnection);
    call.setTargetObjectURI("urn:RecibeMsgSoapIsp");
    call.setMethodName("RecibeM2TGR");
    call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
    //SOAPTransport st = new SOAPHTTPConnection();
    //call.setSOAPTransport(st);
    Vector params = new Vector();
    params.addElement(new Parameter("StrXml", String.class, xml, null));
    call.setParams(params);
    //call.setHeader();
    Response response = call.invoke(endPoint, "");
    Parameter result = response.getReturnValue();
    System.out.println("result:" + result);
    //****************************** MY EXCEPTION
    [SOAPException: faultCode=SOAP-ENV:Protocol; msg=Unsupported response content type "text/html", must be: "text/xml". Response was:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
    <html dir=ltr>
    <head>
    <style> a:link               {font:8pt/11pt verdana; color:FF0000} a:visited          {font:8pt/11pt verdana; color:#4e4e4e}
    </style>
    <META NAME="ROBOTS" CONTENT="NOINDEX">
    <title>No se puede mostrar la p&aacute;gina</title>
    <META HTTP-EQUIV="Content-Type" Content="text-html; charset=Windows-1252">
    </head>
    <script>
    function Homepage(){
    <!--
    // in real bits, urls get returned to our script like this:
    // res://shdocvw.dll/http_404.htm#http://www.DocURL.com/bar.htm
         //For testing use DocURL = "res://shdocvw.dll/http_404.htm#https://www.microsoft.com/bar.htm"
         DocURL=document.URL;
         //this is where the http or https will be, as found by searching for :// but skipping the res://
         protocolIndex=DocURL.indexOf("://",4);
         //this finds the ending slash for the domain server
         serverIndex=DocURL.indexOf("/",protocolIndex + 3);
         //for the href, we need a valid URL to the domain. We search for the # symbol to find the begining
         //of the true URL, and add 1 to skip it - this is the BeginURL value. We use serverIndex as the end marker.
         //urlresult=DocURL.substring(protocolIndex - 4,serverIndex);
         BeginURL=DocURL.indexOf("#",1) + 1;
         urlresult=DocURL.substring(BeginURL,serverIndex);
         //for display, we need to skip after http://, and go to the next slash
         displayresult=DocURL.substring(protocolIndex + 3 ,serverIndex);
         InsertElementAnchor(urlresult, displayresult);
    function HtmlEncode(text)
    return text.replace(/&/g, &apos;&amp&apos;).replace(/&apos;/g, &apos;&quot;&apos;).replace(/</g, &apos;&lt;&apos;).replace(/>/g, &apos;&gt;&apos;);
    function TagAttrib(name, value)
    return &apos; &apos;+name+&apos;="&apos;+HtmlEncode(value)+&apos;"&apos;;
    function PrintTag(tagName, needCloseTag, attrib, inner){
    document.write( &apos;<&apos; + tagName + attrib + &apos;>&apos; + HtmlEncode(inner) );
    if (needCloseTag) document.write( &apos;</&apos; + tagName +&apos;>&apos; );
    function URI(href)
    IEVer = window.navigator.appVersion;
    IEVer = IEVer.substr( IEVer.indexOf(&apos;MSIE&apos;) + 5, 3 );
    return (IEVer.charAt(1)==&apos;.&apos; && IEVer >= &apos;5.5&apos;) ?
    encodeURI(href) :
    escape(href).replace(/%3A/g, &apos;:&apos;).replace(/%3B/g, &apos;;&apos;);
    function InsertElementAnchor(href, text)
    PrintTag(&apos;A&apos;, true, TagAttrib(&apos;HREF&apos;, URI(href)), text);
    //-->
    </script>
    <body bgcolor="FFFFFF">
    <table width="410" cellpadding="3" cellspacing="5">
    <tr>
    <td align="left" valign="middle" width="360">
         <h1 style="COLOR:000000; FONT: 13pt/15pt verdana"><!--Problem-->No se puede mostrar la p&aacute;gina</h1>
    </td>
    </tr>
    <tr>
    <td width="400" colspan="2"> <font style="COLOR:000000; FONT: 8pt/11pt verdana">No se puede mostrar la p&aacute;gina que est&aacute; buscando porque la direcci&oacute;n de la p&aacute;gina es incorrecta.</font> </td>
    </tr>
    <tr>
    <td width="400" colspan="2"> <font style="COLOR:000000; FONT: 8pt/11pt verdana">
         <hr color="#C0C0C0" noshade>
    <p>Pruebe lo siguiente:</p>
         <ul>
    <li>Si escribi&oacute; la direcci&oacute;n de la p&aacute;gina en la barra de direcciones, compruebe que la ha escrito correctamente.<br>
    </li>
    <li>Abra la p&aacute;gina principal
    <script>
         <!--
         if (!((window.navigator.userAgent.indexOf("MSIE") > 0) && (window.navigator.appVersion.charAt(0) == "2")))
              Homepage();
         //-->
         </script>
         y busque v&iacute;nculos a la informaci&oacute;n que desee.</li>
    </ul>
    <h2 style="COLOR:000000; FONT: 8pt/11pt verdana">HTTP 405 &ndash; Resource not allowed<br> Servicios de Internet Information Server</h2>
         <hr color="#C0C0C0" noshade>
         <p>Informaci&oacute;n t&eacute;cnica (para personal de soporte)</p>
    <ul>
    <li>M&aacute;s informaci&oacute;n:<br> Soporte t&eacute;cnico de Microsoft
    </li>
    </ul>
    </font></td>
    </tr>
    </table>
    </body>
    </html>
         at org.apache.soap.rpc.Call.getEnvelopeString(Call.java:208)
         at org.apache.soap.rpc.Call.invoke(Call.java:255)
         at test.Test.main(Test.java:42)
    Best regards,
    George

    Is this statement that causes the exception? "Response response = call.invoke(endPoint, "");"
    If so you might be able to catch the SOAPException and interogate the response variable - surround the call with a try, catch block and within the catch you can get the MimeHeaders and check "Content-Type" If it's "text/html" then you know it not a SOAP message so don't use the SOAP api calls.
    It sounds like the web service is offline and the web server is trying to send you an HTML error page which of course is not a SOAP message and so a SOAPException is thrown.

  • Msg=Unsupported response content type "text/html; 400 Bad Request

    Hi All
    this is the excpetion that I get when I am tring to run the
    service MAnagerClient.
    whether it is a list or deploy command :
    can anybody help me?
    Exception in thread "main" [SOAPException: faultCode=SOAP-
    ENV:Protocol; msg=Unsupported response content type "text/html;
    charset=iso-8859-1", must be: "text/xml". Response was:
    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    <HTML><HEAD>
    <TITLE>400 Bad Request</TITLE>
    </HEAD><BODY>
    <H1>Bad Request</H1>
    Your browser sent a request that this server could not
    understand.<P>
    <HR>
    <ADDRESS>Oracle HTTP Server Powered by Apache/1.3.19 Server at
    ranaldb Port 1324</ADDRESS>
    </BODY></HTML>
    at org.apache.soap.rpc.Call.getEnvelopeString
    (Call.java:175)
    at org.apache.soap.rpc.Call.invoke(Call.java:212)
    at
    org.apache.soap.server.ServiceManagerClient.invokeMethod
    (ServiceManagerClient.java:129)
    at org.apache.soap.server.ServiceManagerClient.list
    (ServiceManagerClient.java:151)
    at org.apache.soap.server.ServiceManagerClient.main
    (ServiceManagerClient.java:237)

    Hello,
    Your message contains a an HTTP 404 error so the URL that you are trying to access is not valid.
    Can you check from a browser what is the response when you call the endpoint?
    http://server:port/wedanyservices-WedanyServicesPro-context-root/MyWebService2
    I believe that you do not have a service deployed at this URL this is why you have such response, and you cannot send another response.
    Regards
    Tugdual Grall

  • Client found response content type of 'text/plain', but expected 'text/xml'

    Hi All
    We have developed a J2EE- JAX-RPC web service using Weblogic's 'ServiceGenTask'.
    Invoking web service via java client and SOAP UI works like charm but fails when the
    service invoked via .NET client.
    Below is the .NET sample code and the Stack Trace:
    .NET CODE:
    System.Net.ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(delegate {      return true;  });
    testwebservice.ESI est1 = new testwebservice.ESI();
    esi_detail = est1.getDetails("someuserid", "password"<Details> <Id>" + txt_eino.Text +"</Id> </Details>");
    Stack Trace:
    System.InvalidOperationException was unhandled by user code
    Message=Client found response content type of 'text/plain', but expected 'text/xml'.
    The request failed with the error message:
    HTTP/1.1 100 Continue
    <env:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><env:Header/><env:Body env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><m:getCertificateDetailsForWSUResponse xmlns:m="http://mynamespace"><result xsi:type="xsd:string"><CertificateStatus>valid</CertificateStatus>
    </m:getCertificateDetailsForWSUResponse></env:Body></env:Envelope>
    Source=System.Web.Services
    StackTrace:
    at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
    at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
    at shcilestamp.EstampIndia.getCertificateDetailsForWSU(String string, String string0, String string1) in c:\Users\Revenue\AppData\Local\Temp\Temporary ASP.NET Files\sra\6fd93bb3\8d227466\App_WebReferences.iojpamot.0.cs:line 105
    at default_1.btn_verify_estamp_Click(Object sender, EventArgs e) in c:\Users\Revenue\Desktop\OFFICE\sra\default.aspx.cs:line 1006
    at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
    at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
    at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
    at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
    at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    InnerException:
    Note: The same client code is able to access the service deployed in our DR site without any fault.
    However it fails to invoke service deployed in Production site.
    Is this anything to do with the Content-type settings at the web/app server layer?
    Any help will be appreciated.
    Thanks & Best Regards
    Avinash

    Make sure you're using the Reverse Proxy Plugin for Web Server, not the Application Server Connector (they are VERY similar, but not the same). The RPP knows how to handle 100 Continue, the Connector does not.
    Or use Web Server 7 and its built-in reverse proxy feature.

  • Client found response content type of 'text/html;charset=iso-8859-1', but expected 'text/xml'.

    Hello All,
    I am on BI 4.0 SP6.
    I am login to Advance Analysis Office using sso with Authentication : Windows AD, but when i login errors occurs:
    Client found response content type of 'text/html;charset=iso-8859-1', but expected 'text/xml'.
    The request failed with the error message:
    I have done all settings and configuration for SSO as per following notes:
    http://service.sap.com/sap/support/notes/1631734
    http://service.sap.com/sap/support/notes/1646920
    http://service.sap.com/sap/support/notes/1794675
    Earlier i was getting Login Exception Error WSE : 99999, i did some changes, after that the above error is coming
    Does anybody knows the solution?
    KR,
    MD

    refer the below note
    1785270 - How to configure AD SSO for Advance Analysis for MS Office with Business Objects BI 4.0

  • Client found response content type of '', but expected 'text/xml', While Creating Subscription in SSRS2008 R2

    I am trying to Create a Subscription from a windows service and provided all authentication as Anonymous. Added the Web Reference of reporting service 2008 as 'http://ServerName:Port(80)/ReportServer/ReportService2005.asmx' and execution service as
    'http://ServerName:Port(80)/ReportServer/ReportExecution2005.asmx'. I was getting the following error while executing the below code statement:
    rs.CreateSubscription(reportPath, extSettings, desc, eventType, matchData, parameters);  
    Client found response content type of '', but expected 'text/xml'.
    The request failed with an empty response.
    I am running Microsoft SQL Server 2008 R2.  Please help.

    Hi PrabhatY,
    According to your description, the error "Client found response content type of '', but expected 'text/xml'.The request failed with an empty response." is thrown out when you create a subscription for a report with PowerShell.
    In your scenario, please check if you could access the report server and create a subscription in report manager. Then you should make sure all parameters within CreateSubscription method are right. If issue persists, please try to use Fiddler to monitor
    local request and received response message. Please refer to this document to use this tool:
    Getting Started with Fiddler.
    Reference:
    ReportingService2005.CreateSubscription Method
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu
    Qiuyun Yu
    TechNet Community Support

  • Weblogic Portal - Disc API bug in response content type

    Hi
    While using WLP Disc APIs in the portal for AJAX calls, the response content type returned by the weblogic portal server is:
    text/x-netuix-json-comment-filtered; charset=ISO-8859-1
    This is not getting changed to 'application/json' inspite of setting this as the content type for a JSF JSP.
    Probably, looks like a bug.
    We have a JSF portlet in which we need to make an AJAX call.
    Please refer to the weblogic whitepaper for the AJAX examples (weblogic-portal-jsf-whitepaper.pdf).
    The example works fine in the dev/build environment. When the portal server is accepting calls through Sun One webserver,
    the logs from the webserver show the response content type from the portal server as "text/x-netuix-json-comment-filtered; charset=ISO-8859-1"
    - I tried changing the content type to "application/json" in the JSF JSP (as per the example from the pdf file). Still the content type does not change.
    - The response from the portal server is suffixed with "\n\r\t". Because of the trailing space/carriage return chars in the portal server response, the sun one webserver is unable to parse (or) eliminate the "\r\n\d" chars to the browser. When the browser receives a response (with the trailing chars), the module.js (weblogic wrapper API for DISC calls) fails.
    - The module.js tries to check whether the response from portal server ends with "**/" but unfortunately, the weblogic protal server returns
    "/** %json response%**/\n\r\d"
    I found a workaround to this issue by having a filter for the JSF JSP which sets the content type as "application/json" and does a flush() before it makes a call to the JSF JSP which responsds to an ajax call. This works as the content type is set and flushed first so any attempt by the portal server to set as "text/x-netuix-json-comment-filtered" does not get reflected in the http response.
    Any support/fix from oracle regarding this will be helpful as most of the webserver integration with the portal server happens during the middle of the project build and might lead to a technical risk.
    Server details: WLPS 10.3, Sun One 7.0
    Thanks
    Ananth Krishnan

    Make sure you're using the Reverse Proxy Plugin for Web Server, not the Application Server Connector (they are VERY similar, but not the same). The RPP knows how to handle 100 Continue, the Connector does not.
    Or use Web Server 7 and its built-in reverse proxy feature.

  • Response content type does get set.

    Hi All,
    I'm in the middle of converting an ISO-8859-1 web application to a UTF-8 encoded application. The application uses struts/tiles and runs on Sun One App server 7.0 and J2EE 1.3.
    I have made the following changes to the existing application.
    1. added acceptCharset="UTF-8" to struts forms.
    2. added <controller contentType="text/html; charset=UTF-8" /> to struts-config.xml
    3.have set the request.setCharacterEncoding("UTF-8"); on an abstract level of the all the actions.
    4.Created a new ServletFilter and included, response.setContentType("text/html;charset=UTF-8");
    5.Configured the database to work with Unicode characters.
    Now I can successfully save Unicode characters do the database. (I have tested this) However the problem is when retrieving information back to the web tier, html page shows me garbage instead of the Unicode characters. The browser default encode type is still selected to ISO-8859-1, and when I manually change this to UTF-8 garbage properly turns into Unicode. My suspicion is response content type is not getting set properly. This explains browser selecting ISO-8859-1 by default.
    Anyone have a clue? Point in the right direction would be highly appreciated.
    Thanks,
    Shaminda.

    I am seeing similar results.
    Amanda, did you find resolution?
    Herschel

  • Response Content type for WLP Disc API calls

    Hi
    While using WLP Disc APIs in the portal for AJAX calls, the response content type returned by the weblogic portal server is:
    text/x-netuix-json-comment-filtered; charset=ISO-8859-1
    This is not getting changed to 'application/json' inspite of setting this as the content type for a JSF JSP.
    Probably, looks like a bug.
    We have a JSF portlet in which we need to make an AJAX call.
    Please refer to the weblogic whitepaper for the AJAX examples (weblogic-portal-jsf-whitepaper.pdf).
    The example works fine in the dev/build environment. When the portal server is accepting calls through Sun One webserver,
    the logs from the webserver show the response content type from the portal server as "text/x-netuix-json-comment-filtered; charset=ISO-8859-1"
    - I tried changing the content type to "application/json" in the JSF JSP (as per the example from the pdf file). Still the content type does not change.
    - The response from the portal server is suffixed with "\n\r\t". Because of the trailing space/carriage return chars in the portal server response, the sun one webserver is unable to parse (or) eliminate the "\r\n\d" chars to the browser. When the browser receives a response (with the trailing chars), the module.js (weblogic wrapper API for DISC calls) fails.
    - The module.js tries to check whether the response from portal server ends with "**/" but unfortunately, the weblogic protal server returns
    "/** %json response%**/\n\r\d"
    I found a workaround to this issue by having a filter for the JSF JSP which sets the content type as "application/json" and does a flush() before it makes a call to the JSF JSF which responsds to an ajax call. This works as the content type is set and flushed first so any attempt by the portal server to set as "text/x-netuix-json-comment-filtered" does not get reflected in the http response.
    Any support/fix from oracle regarding this will be helpful as most of the webserver integration with the portal server happens during the middle of the project build and might lead to a technical risk.
    Server details: WLPS 10.3, Sun One 7.0
    Thanks
    Ananth Krishnan

    The problem as you can see is only related to the URL because the webservice is not expecting the URL. Have you changed the wsdl also for the new scenario? The URL can be rechecked to the one present in the wsdl at bottom of it.
    Regards,
    Prateek

  • Setting webservice response content type / charset header

    I have a webservice .war file.
    I need to set the content-type/charset http header and add another http header. I wrote a filter to do that and had partial success. The other header (pics-label) is indeed sent in the response with the correct value. However, setting the content type proved to be another matter.
    I read through the documentation that one can set the system property weblogic.webservice.i18n.charset=utf-8. However, this doesn't seem to work. The filter setting the header also doesn't work. It seems that weblogic has the final word on that. Only when I set the <web-service> element attribute charset="UTF-8" does the header gets back to the client.
    Due to deployment/build related issues which I won't get into, this is most annoying.
    If anyone has encountered a similiar issue and have a solution/workaround/thoughts I'll be glad to hear about it.
    P.S.
    Also tried -Dfile.encoding=UTF-8 but didn't do any good.
    Thanks.

    you don't define a charset for non-text file types. Excel files are not text files.

  • Response Content Type

    howdy,
    I'm generating a Microsoft Excel document from a jsp, givin that to user to update it and then uploading to system.
    when generating xls i first used :
    <%@ page contentType = "application/vnd.ms-excel; charset=UTF-8" %>but IE couldn't recognize the type! so i changed it to :
    <%
         response.setContentType( "application/vnd.ms-excel" );
    %>now IE correctly chooses the type for saving document, First whats the difference between them ?
    Second how can i choose a charset for my response!
    Third as now when i'm uploading the file system can't recognize the application/vnd.ms-excel type!
    Any help would be appriciated :)
    Behrad

    you don't define a charset for non-text file types. Excel files are not text files.

  • How to solve UDDI problem?  : Unsupported response

    I have problem with UDDI
    I cann't to connect to any UDDI such as Oracle UDDI, IBM UDDI, Microsoft UDDI.
    When I test the connection it show me :
    Testing connection with no proxy...
    Contacting http://otn.oracle.com/uddiapi/inquiry...
    Unsupported response content type &quot;text/html&quot;, must be: &quot;text/xml&quot;. Response was:
    &lt;html&gt;
    &lt;head&gt;
    &lt;title&gt;Error Page 404&lt;/title&gt;
    &lt;link rel=&quot;stylesheet&quot; href=&quot;http://www.oracle.com/admin/oracle.css&quot; type=&quot;text/css&quot;&gt;
    &lt;script language=Javascript src=&quot;http://www.oracle.com/admin/jscripts/portal_lib.js&quot;&gt;&lt;/script&gt;
    &lt;script language=Javascript src=&quot;http://www.oracle.com/admin/jscripts/lib.js&quot;&gt;&lt;/script&gt;
    &lt;script type=&quot;text/javascript&quot;&gt;
    function cleartext()
    document.queryForm.keyword.value = &quot;&quot;;
    /********* INSERT THE DOMAIN AND PATH TO YOUR CODE BELOW ************///--&gt;&lt;/script&gt;&lt;script language=&quot;JavaScript&quot; src=&quot;http://www.oracle.com/admin/jscripts/s_code_remote.js&quot;&gt;&lt;/script&gt;&lt;!-- End SiteCatalyst code version: G.7. --&gt;     &lt;/td&gt;          &lt;TD WIDTH=&quot;10&quot;&gt;&lt;IMG SRC=&quot;http://oracleimg.com/admin/images/ocom/hp_spacer.gif&quot; BORDER=0 ALT=&quot;&quot; WIDTH=&quot;10&quot;&gt;&lt;/TD&gt;
         &lt;/tr&gt;
    &lt;/table&gt;
    &lt;/body&gt;
    &lt;/html&gt;
    The inquiry endpoint could not be contacted. Test failed.
    How to solve this problem?
    Thank you every guru. ^___^

    the predefined UDDI Registry connections are taken off as IBM and Microsoft UDDI Registry connections are no longer supported. Theres only one regitry availble (Xmethods Public UDDI Registry http://uddi.xmethods.com/inquire
    It appears you have tried to test a connection with no proxy selected. You need to enable the proxy preference to make it working.
    Regards,
    Sunil..

  • Get "An Error occurred while retrieving data From ProjectWebApp.." when searching content on an External Content Type

    I have set-up an ECT in SPD2013 on SP2013.  It is a SQL Data source called ProjectWebApp.   I have BCS/SSS set-up.  I can create an ECT OK in SPD.  I can add the ECT to a custom list.
    The problem is when I add a new item in the list the following error message appears in red
    An error occurred while retrieving data from ProjectWebApp. Administrators, see the server log for more information
    I cannot filter or return any results.  There is data in the DB.
    Another test I do is to try and create a new App/List using the "External List" template.  When
    I select the ECT a red message appears "External Content Types are not available".  which is odd since I can add an ECT to a list as mentioned above.
    Any ideas?
    Tx
    Andrew
    Andrew Payze

    Hi Andrew,
    Please try the option Allow unlimited length in document libraries in the column settings:
    http://littletalk.wordpress.com/2011/08/18/external-content-type-an-error-occurred-while-retrieving-data-from-a-system-administrators-see-the-server-log-for-more-information/
    If it doesn't help, please refer to the link below and raise the External content type Read List operation thresholds:
    http://lightningtools.com/bcs/business-connectivity-services-end-user-implications-part-one-threshold-limit-errors/
    Please provide error message in ULS log for further troubleshooting.
    Regards,
    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] .
    Rebecca Tu
    TechNet Community Support

  • Setting content-type response header in BlazeDS

    Per this JIRA ticket, http://bugs.adobe.com/jira/browse/BLZ-428 , there is a suggested fix that includes setting the response content-type header to text/xml.
    The JIRA ticket name is
    pinging endpoint Returns a HTTP: Status 200 in ie8
    and the suggested fix is:
    The problem appears to be completely worked around by setting the following headers in our HTTP responses to Flash:
    Content-Type: text/xml; charset=UTF-8
    Cache-Control: no-cache
    What is the best way to do this is if using BlazeDS?
    I have tried to set the content-type within my data service desitnation class, by accessing the HttpServletResponse from the FlexContext class, however this does not work.  The content-type is still "application/x-amf" in the response.    I am assuming that BlazeDS sets the content-type sometime after my data service desination code is invoked.
    I have also tried to create a servlet filter and set the content-type header both before and after (in a finally block) my data service code is invoked, however neither of these approaches successfully ended up with a content-type of "text/xml" in the response.  My sense is that setting the content-type prior to the data service destination code is too early in the chain and setting in the finally block is too late (per the servlet spec you cannot set the content-type after getWriter() has been called).
    Any ideas are appreciated.
    Also any other ideas on how to solve the general IE8 issue described in the bug above are appreciated.
    I am using...
    BlazeDS version: 3.2.0.3978
    Flex SDK version: 3.4
    App Server: JBoss 4.5
    Java: 1.5_16
    Thanks,
    Kevin

    Hi,
    in the meantime I found a "known issue" that seems to be related to my problem but it is said to be fixed with 10.0 MP1 (and we use 10.3):
    ChangeRequest number: CR316761, CR318708
    Description. The servlet container used to append charset=ISO-8859-1 to the HTTP Header contentType in the response for non-JSP pages with any charset contents. This would result in improper display of multibyte characters.
    This problem has been resolved.
    Maybe the information is wrong. I will examine the CR and may apply them on our 10.3 environment but I would be glad if some oracle/bea engineer would intervene here.
    Cheers
    Thorsten

Maybe you are looking for

  • Remote System Input Device Not Working

    Hi, when i try to connect remote system through RDP, input device (Keyboard & Mouse) in remote system is too slow, it takes more time to respond. Tried to take RDP from different system but same problem. Looking forward for your response.  Regards Mo

  • Find Your Stolen iPhones Once and For All

    You just lost your iPhone (I had mine stolen last weekend). You panic and then you come to your senses. Ah! I'll use the "Find My iPhone" app. Thank you, Apple! After frantically asking someone to borrow his/her/their iPhone to use the app, you reali

  • Default optimization for new files in Acrobat 9 Pro

    When I create a new file in Acrobat Pro 9, it automatically saves as version 1.6 (Acrobat 7.x). Much as I would love the whole world to have the latest reader version on their computer, the reality is that many of my website's users have older versio

  • Exit which triggers after SO Save

    Dear Experts, I have a requirement to send auto mail to user on customer credit status when user create Sales Order and save. I did all the necessary code in the form routine USEREXIT_SAVE_DOCUMENT of include program MV45AFZZ. USEREXIT_SAVE_DOCUMENT

  • Adobe Reader XI give "Stopped Working" Error after Closing Writable PDF

    I have Adobe Reader XI version 11.0.10, on a Windows 7 computer, and when a writable PDF is opened then the entire Adobe Reader program is closed it gives a "Adobe has stopped working" error. I've ran a repair with no change and Protected Mode is dis