Special characters vanish when passed to webservice on Oracle AS 10gR2

I've created a rpc webservice with an "echo" method. It has a single String parameter and simply returns this parameter. I've been using JDeveloper 10.1.2 and deployed this webservice onto OAS 10gR2 (10.1.2). To access it in client application I used proxy generated by JDeveloper. Problem appears when I pass the value containing special characters like < or >. Echo method receives this value without these characters. So client sends something like <hello> and webservice sends back hello instead of <hello>. I've tried to replace < and > with '& lt;' and '& gt;' but then & character is lost. So from '& lt;hello& gt;' client receives lt;hellogt;.
This problem doesn't appear when I deploy webservice to Oracle AS 9.0.4 so I suspect it has something to do with AS configuration.
I would appreciate any help.

take a look at
http://www.oracle.com/technology/products/ias/portal/html/javadoc/xml_tag_reference_v2.html
and look for <escapeOutput> parameter - "Controls whether control characters in the response from the web service (such as '<' and '&') are escaped in the portlet response so that they display in HTML" - the default value is on, meaning special characters are escaped - this parameter applies only to Oracle Portal, but maybe there is a similiar parameter for AS

Similar Messages

  • Special Characters in a Node Value

    Hi,
    I have a node value which contains special characters (ex: it contains degree *°* between the text). When I am adding this text value to a node i am using the following code,
    elementVariable.appendChild(documentObject.createTextNode("*node text value with different special characters*"));
    How to handle these special characters, because when I open the generated XML file in Web Browser it is displaying an error when parsing this text value which contains the degree symbol.
    Does anybody know how to handle this type of text values. If any one had links related to this, please send me.
    Thank You.

    Thanks for your reply DrClap. What you said regarding posting the query without understanding the code is correct. But I am not expert in XML and I didn't worked on it previously. I suddenly got the request to implement this in our application and i don't have time to learn, so i did some search and found the below code and used that in my program.
    It worked for all the types of data, but it is failing only for the degree character (*°*). Could you please check the below code and tell me where I am doing wrong. I really appreciate your help.
    * @Program to create a DOM XML tree and then print the XML.
    * Xmltree.java
    * Author:-RoseIndia Team
    * Date:-10-Jun-2008
    import java.io.*;
    import org.w3c.dom.*;
    import javax.xml.parsers.*;
    import javax.xml.transform.*;
    import javax.xml.transform.dom.*;
    import javax.xml.transform.stream.*;
    public class Xmltree {
    public static void main(String[] args) throws Exception {
    DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();
    DocumentBuilder docBuilder = builderFactory.newDocumentBuilder();
    //creating a new instance of a DOM to build a DOM tree.
    Document doc = docBuilder.newDocument();
    new Xmltree().createXmlTree(doc);
    public void createXmlTree(Document doc) throws Exception {
    //This method creates an element node
    Element root = doc.createElement("Company");
    //adding a node after the last child node of the specified node.
    doc.appendChild(root);
    Element child = doc.createElement("Location");
    root.appendChild(child);
    Element child1 = doc.createElement("Companyname");
    child.appendChild(child1);
    Text text = doc.createTextNode("Roseindia .Net");
    child1.appendChild(text);
    Comment comment = doc.createComment("Employee in roseindia");
    child.appendChild(comment);
    Element element = doc.createElement("Employee");
    child.appendChild(element);
    Text text1 = doc.createTextNode("Girish Tewari");
    element.appendChild(text1);
    Element chilE = doc.createElement("Id");
    chilE.setAttribute("name", "Girish");
    root.appendChild(chilE);
    // adding a text element to the child
    Text text12 = doc.createTextNode("status");
    chilE.appendChild(text12);
    //TransformerFactory instance is used to create Transformer objects.
    TransformerFactory factory = TransformerFactory.newInstance();
    Transformer transformer = factory.newTransformer();
    transformer.setOutputProperty(OutputKeys.INDENT, "yes");
    transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
    // create string from xml tree
    StringWriter sw = new StringWriter();
    StreamResult result = new StreamResult(sw);
    DOMSource source = new DOMSource(doc);
    transformer.transform(source, result);
    String xmlString = sw.toString();
    File file = new File("newxml.xml");
    BufferedWriter bw = new BufferedWriter
    (new OutputStreamWriter(new FileOutputStream(file)));
    bw.write(xmlString);
    bw.flush();
    bw.close();
    // print xml
    System.out.println("Xml file created is :\n" + xmlString);
    Edited by: Ramesh_Pappala on Oct 13, 2008 7:07 AM

  • Special characters not in shoppincart ?

    We have an external vendor with a catalogue that contains descriptions with special characters like  ø
    when transfered to the shoppingcart it is translated to  #ꀯ뺐
    In the conversion to pdf it crashes since the character can't be translated
    is there a method to solve these kind of special character problems ? or does our system finally needs an upgrade ?
    the system is srm 5.0
    kind regards
    Arthur de Smidt

    Hi!
    Please verify if the KBA below will help you:
    1645581 - Special character are transferred as "#" to SRM
    Best regards,
    Christian Zeuch

  • ACS 3.3.3 UCP special characters fail

    Some special characters fail when passwords are changed via UCP, but are okay if I enter them directly into ACS.
    Any ideas on where to start? Problem always seen with the & character, but the $ character seems to be position dependent.

    Richard,
    Looks like CSCed72144.

  • Trouble with Special Characters

    I am having trouble adding special characters when typing! I went to help, and found out how, in theory, to insert them by going to the characters palette, but when I click edit/special characters, or when I go Fonts and click special characters on the drop-down menu in the lower left corner, nothing happens. Simply nothing at all. Do I somehow just not have this feature? Why wouldn't I have it, and how can I fix it so that I do? Please help!

    when I click edit/special characters, or when I go Fonts and click special characters on the drop-down menu in the lower left corner, nothing happens.
    A possible fix for this is here:
    http://support.apple.com/kb/TS1896?viewlocale=en_US

  • Special Characters Pop Up doesnt work

    Hey,
    I realized I cannot insert any special characters since when i hit edit - special characters in any program, no pop-up is showing up...
    What can I do except re-installing since the macbook is only 4 weeks or so old

    See this:
    http://discussions.apple.com/thread.jspa?threadID=1257002&tstart=50

  • ProcessRemoteException when invoke  webservice from Oracle E-Business Suite

    Hi,when i invoke webservice from Oracle E-Business Suite R12.1 – Integrated SOA Gateway’s
    I get following exception.
    fuego.soaptype.SoapExecutionException
    at fuego.soaptype.SoapCall.processRemoteException(SoapCall.java\:750)
    at fuego.soaptype.SoapCall.invoke(SoapCall.java:238)
    at fuego.soaptype.SoapObject.invoke(SoapObject.java:309)
    at fuego.lang.Invokeable.invokeImpl(Invokeable.java:234)
    at fuego.lang.Invokeable.invokeDynamic(Invokeable.java:188)
    at xobject.Fuego__AutoGen__Screenflows__.__SubmitReport.initializeReport(__SubmitReport.xcdl:30)
    at.......
    this webserivce has been deployed and granted. and I can test it with soapUI.
    my code:
    configuration as Configuration = Configuration("FND_PROGRAM_Service");
    endpoint as HttpEndpoint=HttpEndpoint("http://ep066020.bscdev.net:8002/webservices/SOAProvider/plsql/fnd_program/");
    endpoint.setUsername("sysadmin");
    endpoint.setPassword("sysadmin");
    configuration.endpoint = endpoint;
    usernameTokenPlain as UsernameTokenProfileSecurityPolicy=UsernameTokenProfileSecurityPolicy("sysadmin","sysadmin");
    usernameTokenPlain.usernameTokenPasswordType = UsernameTokenPasswordType.PASSWORD_TEXT;
    policies as SecurityPolicy[];
    policies[]=usernameTokenPlain;
    configuration.securityPolicies = policies;
    service as FND_PROGRAM_Service= FND_PROGRAM_Service(configuration)
    sh as SoaHeader = SoaHeader();
    sh.namespace="";
    sh.responsibilityApplName="SYSADMIN"
    sh.responsibilityName="System Administrator"
    sh.securityGroupName="STANDARD"
    sh.nlsLanguage="AMERICAN"
    pam as InputParameters9 = InputParameters9()
    result as OutputParameters
    pam.application="SQLGL";
    pam.executableshortname="ENABLED"
    do
    logMessage "333333333333333";
    executableexists service
    using header = sh,
    body = pam
    returning result = bodyOutput (throw exception)
    logMessage "2222222222222";
    reportSF.description=String.valueOf(result.fndprogram24executableexists)
    reportSF.comments="11111111111";
    on ex as Any
         logMessage "aaaaaaaaaaaa"+ex
    end

    I've encounter something similar to you're problem and it was resolved by manually creating the object using the web service constructor and inputting user credentials. If you manually instantiate your web service wrapper object and set a a security profile token, it may solve your problem. You can also pass in the web service endPoint URL, if you want.
    Fuego.WebServices.UsernameTokenProfileSecurityPolicy
    I'm not sure how to use UsernameTokenProfileSecurityPolicy, but try something like this:
    Fuego.WebServices.UsernameTokenProfileSecurityPolicy policy = UsernameTokenProfileSecurityPolicy();
    policy.username ="mark";
    policy.password = "password";
    tws = YourWebService();
    response = tws.callWebServiceMethod();
    I realize the security profile isn't tied anywhere to the web service, but try it anyway.
    There is also some fields on the webservice, tws.setRequestHeader() that may allow you to set the username and password on the request, but this doesn't make sense to me. It shouldn't be that hard.
    Edited by: Mark Peterson on Mar 19, 2010 9:14 AM
    Edited by: Mark Peterson on Mar 19, 2010 9:20 AM

  • Problem in reading special characters

    Hi friends
    I am doing one program which read serial port data (for bar code reader) using java application.
    My program is working well and reading serial data but it is not displaying special characters.When i read through hyperterminal i can see all special characters but when see data throught the output of java program these special characters are missing...
    I don't know i am doing something wrong in stream or ???
    My code is
    [CODE]public void serialEvent(SerialPortEvent event) {
              System.out.println("before serialEvent");
              StringBuffer readBuffer1 = new StringBuffer();
              switch (event.getEventType()) {
              case SerialPortEvent.OUTPUT_BUFFER_EMPTY:
                   System.out.println("Data empty:");
                   break;
              case SerialPortEvent.DATA_AVAILABLE:
                      byte[] readBuffer = new byte[100];
                      int r = 0;
                      try {
                           System.out.print("test"); 
                          //t inputStream = serialPort.getInputStream();
                         while((r = inputStream.read(readBuffer)) != -1) {
                            System.out.print(new String(readBuffer, 0, r));
                      } catch (Exception e) {
                         e.printStackTrace(System.out);
    }[/CODE]Please help

    Hi DrClap,
    Thanks for your reply.
    That article was helpful in understanding character conversions. And it works fine for JSPs.
    But when I tried to apply the same in JSF it does not work. May be this is not the right forum to dicuss JSF related things. But if you know how pageEncoding and contentType can be mentioned in JSF. I am using myfaces and I have tried <h:form id="SearchForm" acceptCharset="UTF-8" accept="text/html;charset=UTF-8">. Didnt work....

  • Question about special characters in XML documents

    Hi,
    I need to create some XML documents based on documents containing elements containing strings containing accentuated and special characters such as ��� or Asian characters.
    I have found the following code claiming that XML documents created by the xformer will have a utf-8 format:
    // Write the DOM document to the file
    Transformer xformer = TheTF.newTransformer();
    xformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");and I have found the InputSource object to be used to read UTF-8 XML documents:
    InputSource in = new InputSource(new FileReader(filename));
    in.setEncoding("UTF-8");Is this enough to make sure that accentuated and Asian characters (or any other characters) will be converted properly when creating and re-reading the XML document? If one of my elements contain the following text '���33445tata', will the string remain the same when re-read from the XML? Do I need more code to make sure that all conversion will be performed properly and transparently? If yes, can one provide an example?
    Thanks!

    Hi Dr.Clap,
    Thanks for your answer, but I am not really sure I understand you. I have performed a test to generate a simple document containing one element. An attribute containing some special characters is added to the element. The element text also contains specials characters.
    When I generate the XML into a byte array input and print the content, I get:
    <?xml version="1.0" encoding="utf-8" standalone="no"?><UTF8TEST BIBI="��ii��������">tre33������</UTF8TEST>When I parse the document, and print the result, I get:
    -- Begin of Parsing
    Element Name = UTF8TEST
    Attribute Name = BIBI
    Attribute Value = �ii����
    Found text : tre33���
    -- End of Parsingwhich is correct. I am worried by the ��ii� ������-like characters generated in the XML. Should I be worried or shouldn't I? Should I convert these into something looking a more like ASCII, or is this fine?
    I am including the code of my example (excluding imports):
    public class XMLUTF8_Test extends DefaultHandler {
        // Logger
        private final static Logger LOG = Logger.getLogger(XMLUTF8_Test.class.getName());
        // Static
        public static DocumentBuilderFactory DOCUMENT_BUILDER_FACTORY;
        public static DocumentBuilder DOCUMENT_BUILDER;
        public static TransformerFactory TRANSFORMER_FACTORY;
        private static SAXParserFactory FACTORY;
        private static SAXParser SAXPARSER;   
        private static XMLReader XMLREADER;
        static {
            // Preparing the writting
            DOCUMENT_BUILDER_FACTORY = DocumentBuilderFactory.newInstance();
            try {
                DOCUMENT_BUILDER = DOCUMENT_BUILDER_FACTORY.newDocumentBuilder();
            } catch (ParserConfigurationException Ex) {
                Debugger.LogUnreachableCodeReachedSituation(LOG, Ex);
            TRANSFORMER_FACTORY = TransformerFactory.newInstance();
            // Preparing the reading
            try {
                FACTORY = SAXParserFactory.newInstance();
                SAXPARSER = FACTORY.newSAXParser();
                XMLREADER = SAXPARSER.getXMLReader();
            } catch (ParserConfigurationException Ex) {
                Debugger.LogUnreachableCodeReachedSituation(LOG, Ex);
            } catch (SAXException Ex) {
                Debugger.LogUnreachableCodeReachedSituation(LOG, Ex);
        public static void main(String[] args) {
            // Perform test
            new XMLUTF8_Test();
        public XMLUTF8_Test() {
            // Saving to File
            Document NewDoc = DOCUMENT_BUILDER.newDocument();
            Element Root = NewDoc.createElement("UTF8TEST");
            Root.setAttribute("BIBI", "�ii����");
            Root.setTextContent("tre33���");
            NewDoc.appendChild(Root);
            ByteArrayOutputStream TheBAOS = new ByteArrayOutputStream();
            try {
                Source source = new DOMSource(NewDoc);
                Result result = new StreamResult(TheBAOS);
                Transformer xformer = TRANSFORMER_FACTORY.newTransformer();
                xformer.setOutputProperty(OutputKeys.ENCODING, "utf-8");
                xformer.transform(source, result);
            } catch (TransformerConfigurationException Ex) {
                Debugger.LogUnreachableCodeReachedSituation(LOG, Ex);
            } catch (TransformerException Ex) {
                Debugger.LogUnreachableCodeReachedSituation(LOG, Ex);
            // Printing result
            System.out.println(TheBAOS.toString());
            // Parsing the result
            ByteArrayInputStream TheBAIS = new ByteArrayInputStream(TheBAOS.toByteArray());
            XMLREADER.setContentHandler(this);
            try {
                XMLREADER.parse(new InputSource(TheBAIS));
            } catch (IOException Ex) {
                Debugger.LogUnreachableCodeReachedSituation(LOG, Ex);
            } catch (SAXException Ex) {
                Debugger.LogUnreachableCodeReachedSituation(LOG, Ex);
        @Override
        public void startDocument() throws SAXException {
            System.out.println("-- Begin of Parsing");
        @Override
        public void endDocument() throws SAXException {
            System.out.println("-- End of Parsing");
        @Override
        public void startElement(String namespaceURI, String LocalName, String QualifiedName,
                Attributes TheAttributes) throws SAXException {
            String ElementName = LocalName;
            if ("".equals(ElementName)) {
                ElementName = QualifiedName; // namespaceAware = false
            System.out.println("Element Name = " + ElementName);
            if (TheAttributes != null) {
                for (int i = 0; i < TheAttributes.getLength(); i++) {
                    String AttributeName = TheAttributes.getLocalName(i); // Attr name
                    if ("".equals(AttributeName)) AttributeName = TheAttributes.getQName(i);
                    System.out.println("Attribute Name = " + AttributeName);
                    System.out.println("Attribute Value = " + TheAttributes.getValue(AttributeName));
        @Override
        public void endElement(String namespaceURI, String SimpleName, String QualifiedName) throws SAXException {
        @Override
        public void characters(char[] buf, int offset, int len) throws SAXException {
            String s = new String(buf, offset, len);
            System.out.println("Found text : " + s);
    }Thanks!

  • Special Characters in Thesaurus

    I have a requirement to be able search on all variations of a name. I tried using the RT tag in a thesaurus which worked for names without special characters.
    The names I need to search on include quotes and dashes. I have not been able to come up with a right combination of escaping the search and populating the thesaurus.
    Example: 'AB-AC 'AA
    How would I escape this on the query?
    How to I enter this in the thesaurus? Do I include the special characters?
    Thanks

    Check this
    http://download-east.oracle.com/docs/cd/B10501_01/text.920/a96518/cqspcl.htm#1360

  • Dynamic insert for Special Characters

    Hello,
    I'm running into a problem inserting data with Special Characters. I have a report (designed oracle reports), that takes data and inserts the data into table. I use the SRW.do_sql built in package in a before report trigger to process the data. However the problem that I'm running into is how to dynamically account for the special characters in a description field that I have. There is no way for me to predict where or how many can appear in a field. For example, I may have a field that contains data like:
    O'REILLY AND ASSOCIATES INC.
    OR
    FULLER & D'ALBERT, INC.
    OR
    JOANNE'S BED & BACK SHOP
    The only special characters that seem to be used and are causing me problems are the " ' " and " & ".
    Does anyone know how I can dynamically account for these special characters in my insert statement?
    Thanks,
    Martin

    Hello,
    I'm using SRW.DO_SQL procedure in oracle reports because that is one you can run text via reports. The report actually exports the results to a text file and insert the results into a table. Anyway, the SRW.DO_SQL isn't my problem but rather the special characters. I have researched the problem some more and I have found a solution. You can use the "replace" feature to do an insert/update of special characters. You also need to find the character number for each special character. I believe "&" is chr(38), "%" is chr(37), "#" is chr(35), "@" is chr(64), "'" is char(39). So the code would be:
    insert into tableA (column1) values(
    replace(replace(replace(replace(replace(v_entity_name,chr(39),chr(39)),chr(38),chr(38)),chr(35),chr(35)),chr(37),chr(37)),chr(64),chr(64));
    Martin

  • Special Characters in CONTAINS section of ORACLE TEXT

    Can we have special characters in the CONTAINS Section of the ORACLE TEXT.
    Ex:
    Select count(*) from Table_Name where CONTAINS(Column_Name, '%SearchString#%')>1..
    If I am introductions characters like @,#,$,^,&,*(, ) --> then I am getting error as given below
    ERROR at line 1:
    ORA-29902: error in executing ODCIIndexStart() routine
    ORA-20000: Oracle Text error:
    DRG-51030: wildcard query expansion resulted in too many terms
    Any Suggestions Please.

    Check this
    http://download-east.oracle.com/docs/cd/B10501_01/text.920/a96518/cqspcl.htm#1360

  • Dealing with special characters

    Hello Guys,
    I have some time finding for solutions trying to filter out the columns with occurence of special character.
    Can anybody help me build a query to trap/filter colums with occurence of unwanted any_+ special characters?
    A syntax for finding any special characters would do.
    I am using Oracle SQL Developer Version 1.5.5.
    Thanks...
    Edited by: ard565 on Jan 26, 2010 7:06 PM

    Hi,
    Can you provide the structure of the table, and do you want to filter the record if special character occurs on any column of the table or any particular column.
    Moreover in your terms what does special character stands for. Is it all the character that is not alpha numeric or specific set of special character?
    Regards
    Anurag

  • Storing carriage return and other special characters in a TestStand variable and passing to LabVIEW

    I am using TestStand step to call a LabVIEW VI that writes commands to a serial device.  The device expects a carriage return at the end of the command.  I can create a constant string in TestStand with the carriage return, e.g., "ATA\x0D" and pass that to a LabVIEW string control which shows ATA\r and the VI works properly.
    To provide consistency and flexibility in my code, I want to store the terminator character(s) in a TestStand variable.  However, when I try to use an expression to create the command string, i.e. "ATA" + "Locals.Terminator", where Locals.Terminator is set to "\x0D", my LabVIEW VI string control shows "ATA\\x0D" which doesn't work.  And when I try Locals.Terminator set to "\r", the LabVIEW string control shows "ATA\\r" which doesn't work either.
    Is there a way to store special characters in a TestStand variable and pass them to LabVIEW as special characters?  I saw in another post that if you edit the TestStand variable by pressing Cntl-Enter, it will store  the newline \n properly and it can be sent to LabVIEW - that works for me as well for \n.  But  I need to send a carriage return.
    I've attached my test sequence and the corresponding LabVIEW VI with a string control.
    Hans
    Attachments:
    Special Chars.seq ‏27 KB
    String Passing.vi ‏13 KB

    Hi Hans, 
    Thanks for your detailed explanation and examples.  In TestStand, change the String parameter's String Type to Binary String instead of ASCII.  Then it will pass the desired value.
    Cheers,
    David Goldberg
    National Instruments
    Software R&D

  • Webservice: Special characters not displayed correctly

    Hi,
    I'm facing a problem when retrieving informations via a webservice. I'm able to use it and data is retrieved but when there are special characters into the response they are not displayed correctly. Repsonse of the webservice is XML formatted.
    It seems to be a charcter set problem, strange thing is that the response is ISO-8859-1 formatted, this charset should normally display special characters like (é à ...) correctly.
    In my code I simply use an if_http_client object to use the webservice.
    pv_result = pv_http_client->response->get_cdata( ).
    Xml repsonse :
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <![CDATA[Eetcaf�/Steakhuis Baskent]]>
    Should be Eetcafé
    How can I specify a charset for the response object?
    I did the same in .NET, where I can bypass this issue specifying the charset like this.
    Dim reader As New StreamReader(oResponse.GetResponseStream(), System.Text.Encoding.Default)
    Thanks a lot for your help.
    Edited by: dom___35 on Dec 21, 2009 3:30 PM

    I soved this by using get_data function of response object. Then converting this into ISO-8859-1 charset.
    See code below.
    DATA :  lv_encoding   TYPE abap_encoding,
              lv_conv       TYPE REF TO cl_abap_conv_in_ce,
              lv_x_string   type xstring.
      lv_x_string = pv_http_client->response->get_data( ).
        lv_encoding = '1100'.
        lv_conv = cl_abap_conv_in_ce=>create(
                              encoding = lv_encoding
                                 input = lv_x_string ).
        lv_conv->read( IMPORTING data = pv_result ).

Maybe you are looking for

  • Error in Creating USER

    Hi, In my environment, I am installing OIM 9.0.3, on Oracle as database and JBoss as the application server. My installation went successful and I did able to login to the Oracle Identity Manager Online tool by using the admin account "xelsysadm". Bu

  • Physical disk for OS and read only filesystem after live migration

    I am running OVM 3.1.1 connected to an EMC storage array.  I have a situation where physical disks are being used for OS and binary filesystems (i.e. /u01, etc..) rather than virtual disks inside a repository.  When a VM is migrated from one host to

  • PsCS6  won't open. Error Message 213:19. Need Help.

    PsCS6  won't open. Error Message 213:19. Need Help.

  • Enq: TX - row lock contention in TOP 5 wait event

    DB version:11.1.0.7.0 I am having enq: TX - row lock contention in top 5 wait event. AWR analyze period - 9-10(pm). During this time only one sql loader is running to insert the data. No other job are running. So there is no chance of other session b

  • Moving Photos in PSE6 Orgainzer

    In Potoshop Elements 6 Orgainzer, how can I reorder or move the photos within a folder?