How to pass XML tags in a soapbody parameter having datatype as string?

Hi,
I need to pass XML tags as a String parameter in SOAP:Body.
When I tried send SOAP Request, The SOAP Request was changing < to <
and > to > respectively. Is there any way to ensure that the XML tags (< and >) remain as it is without getting changed.
I also tried to retrieve XML file and stored in a StringBuffer and tried to send SOAP Request but i am still receiving the < and > tags in my SOAP Request.
Pl suggest some alternatives to avoid storing the XML in the form of string and instead directly store the XML into a XML Node so that i can avoid the above condition
Thanks in advance,
gnsinhyd

Hi,
The sample code I used is as follows:
package somepackage;
import javax.mail.internet
import javax.xml.messaging.*;
import javax.xml.soap.*;
import javax.xml.transform.*;
import javax.activation.*;
public class SomeClassName{
// Some namespace declarations
public static void main(String[] args) throws someExceptions{
try
// Create the connection
SOAPConnectionFactory connectionFactory = SOAPConnectionFactory.newInstance();
SOAPConnection connection = connectionFactory.createConnection();
// create a new SOAP message using SAAJ API�s
MessageFactory messageFactory = MessageFactory.newInstance();
SOAPMessage request = messageFactory.createMessage();
// Create a SoapAction header
MimeHeaders headers = request.getMimeHeaders();
headers.addHeader("SOAPAction", "soapaction url");
// Object for SOAP Message parts
SOAPPart part = request.getSOAPPart();
SOAPEnvelope envelope = part.getEnvelope();
envelope.addNamespaceDeclaration("xsd","http://www.w3.org/2001/XMLSchema");
envelope.addNamespaceDeclaration("xsi","http://www.w3.org/2001/XMLSchema-instance");
//envelope.addNamespaceDeclaration("enc","http://schemas.xmlsoap.org/soap/encoding/");
envelope.addNamespaceDeclaration("soap","http://schemas.xmlsoap.org/soap/envelop/");
//envelope.setEncodingStyle("http://schemas.xmlsoap.org/soap/encoding/");
SOAPBody body = envelope.getBody();
SOAPHeader header = envelope.getHeader();
// Now, build the ClaimStorage element in the body for our request
Name somename = envelope.createName("somename");
// � and configure it with the specifics of our request
SOAPElement ClaimStorage = body.addTextNode("somename");
ClaimStorage.addNamespaceDeclaration("xmlns","url");
ClaimStorage.addChildElement(somename).addTextNode("somename");
ClaimStorage.addChildElement(xmlclaim).addTextNode("<XMLTAGS">); <---THE PROBLEM IS HERE
----> THE XML TAGS < > ARE CHANGING TO &LT; AND &GT; MOST PROBABLY DUE TO POST I THINK.
// Save Message
request.saveChanges();
// View SOAP Request
System.out.println("\n Soap Request:\n");
request.writeTo(System.out);
System.out.println();
// Now, create a connection to the HTTP SOAP endpoint
URLEndpoint endpoint = new URLEndpoint("url.asmx");
// Send request, view response. In a real program, we�d process the response envelope programmatically to see if there was a fault, etc.
System.out.println("request =\n" + request);
SOAPMessage response = connection.call(request, endpoint);
// View the output
System.out.println("\nXML Response\n");
// Create Transformer
TransformerFactory tff = TransformerFactory.newInstance();
Transformer tf = tff.newTransformer();
// Get reply content
Source sc = response.getSOAPPart().getContent();
System.out.println("SOAP Body" + response.getSOAPBody());
// Set output transformation
StreamResult result = new StreamResult(System.out);
tf.transform(sc, result);
System.out.println();
// Close connection
connection.close();
System.out.println("\nResponse =\n" + response);
catch (Exception e)
e.printStackTrace();
Pl. reply as soon as possible
Thanks in advance

Similar Messages

  • How to pass XML data between applications

    Hi,
    can any one tell me how to pass XML data between applications
    Thanks in advance
    Sudheer

    Steve,
    I tried the code in the http package in the Appendix A section of your book. Each time i try a POST I get a HTTP/1.1 400 Bad Request error from the server. I can successfully do a GET from URLs. I have pretty much copied your code verbatim. Any ideas?
    Thanks,
    Sunder
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Steven Muench ([email protected]):
    See the "Working with XML Messages" section starting on page 242 of my Building Oracle XML Applications. It covers how to Send and Receive XML messages over the web through HTTP GET and HTTP POST as well as specifically Example 6-30 that illustrates how to receive a posted XML message in a servlet and process it.
    Hope this helps.<HR></BLOCKQUOTE>
    null

  • How to pass a value to the export parameter for a method (public instance)?

    Hello,
      I am trying ABAP OO newly. How to pass a value to the export parameter for a method (public instance) called in a report? This *export parameter has a reference type of structure.
    Thanks in advance,
    Ranjini

    Hi,
    "class definition
    class lcl... definition.
      public section.
        method m1 imporitng par type ref to data.  "now you can pass any reference to the method, but this way you have to maintain this reference dynamically inside the method (you can't be sure what that reference is really "pointing" at)
    endclass.
    "in program
    data: r_lcl type ref to lcl...
    create object r_lcl.
    call method r_lcl
      exporting
         par    =  "pass any reference variable here
    Regards
    Marcin

  • How to pass 100+ tags in a single sql/tag query

    <b>In my current application I have to pass 180+ tags in a single query to retrieve data from iHistorian.
    I want to know how to pass more thatn 100 tags in a single SQL or TAG Query using OLEDB or UDC connectors.
    If anybody has done it in the past ,please share with me and also let me know how to do it</b>

    Currently you can only query a maximum of 128 tags, this is a hard limit and may be changed in future releases of xMII, but < 11.5 (im fairly sure 12 also) all have the limit of 128.
    As for iHistorian with the OLEDB UDS, you can write a query that would return over 128 queries becasue this is an input limitation on the UDSs. (PLEASE DON"T ASK US HOW TO WRITE iHistorian QUERIES... we aren't experts in iHistorian).
    Please note that though you can query over 128 tags, the performance may not be what you expect... This may take a very long time to return.
    Martin

  • How to change XML Tag sequence in XML Publisher Reports

    Hi Experts,
    I am working on XML Publisher reports, EBS 11I and Database 9i. I have standard report 'PO Printed Purchase Order Report (XML)', it's output type is XML. I want to change the sequence of groups in XML file.
    I am getting XML tags like below at present:
    LIST_G_HEADERS \ G_HEADERS \ LIST_G_HEADER_NOTES
    I want to change the sequence of groups like below.
    LIST_G_HEADERS \ G_HEADERS \ LIST_G_LINES \
    Could somebody help me how to change the sequence of XML Groups.
    Thanks in advance.

    Paul,
    This works.  Thanks!
    I am still working through the implications of having a data connection defined.  I notice that every time I submit, it creates two records in my database, one with all the fields blank, and one with the data and attachment.
    I will have to do some more digging into the double submission, but at least it is uploading the file.
    Thanks again,
    Ed

  • How to get XML tag attribute vaue in Oracle

    Hi,
    I have XML file which have order tag
    <submitOrderRes>:Application Exception: SOS</submitOrderRes>.
    From this xml file i want to display only the tag value , which is 'Application Exception: SOS'.
    how to get this tag value by select SQL
    any help is appreciate
    TY

    I don't know your query
    Here is the example
    SQL> l
      1  select
      2  extractvalue(xmltype(dbms_xmlgen.getxml('select * from emp where rownum=1'))
      3  ,'/ROWSET/ROW/ENAME') col_value
      4* from dual
    SQL> /
    COL_VALUE
    SMITHSS

  • How to Read XML tags....

    Hi guys...
    Can any one here tell me how to read the XML tag in PL/SQL.
    In table Enquiry there are following fields.
    Id          number
    Status          varchar2(5)
    Request          XML
    Reply          XML
    Error          varchar2(10)
    Now the following XML will be in request column from the requester.
    I have to get the,
    ->request which is in BODY tag,
    ->ID number which is in from tag (its the persons unique ID to check his BILL)
    Fetch the request from the database and updates it into the REPLY field with the same syntax.
    <message>
    <to> 123 </to>
    <from>789</from>
    <body> unbill </body>
    <messagenumber> 01 </messagenumber>
    </message>
    Can any one have the solution to this, how can I read the XML tags, process & again inserts as an XML.
    Thanks.

    Maybe something like this will be a pointer...
    SQL> CREATE TABLE t AS
      2  select 1 as id, 'C' as status, XMLTYPE('<message><to>123</to><from>789</from><body>unbill</body><messagenumber>01</messagenumber></message>') as request, XMLTYPE('<reply/>') as reply, 'NO ERROR' as error from dual
      3  ;
    Table created.
    SQL>
    SQL> SELECT * from t;
            ID S
    REQUEST
    REPLY
    ERROR
             1 C
    <message><to>123</to><from>789</from><body>unbill</body><messagenumber>01</messagenumber></message>
    <reply/>
    NO ERROR
    SQL>
    SQL> UPDATE t
      2  SET reply = updateXML(request,'/message/body/text()','bill')
      3  ;
    1 row updated.
    SQL>
    SQL> SELECT * from t;
            ID S
    REQUEST
    REPLY
    ERROR
             1 C
    <message><to>123</to><from>789</from><body>unbill</body><messagenumber>01</messagenumber></message>
    <message><to>123</to><from>789</from><body>bill</body><messagenumber>01</messagenumber></message>
    NO ERROR
    SQL>

  • How to delete xml tags Urgent

    on release function i am inserting this value
    "(&-box*&", "&*box-&
    " in to my text box,
    in text box will display like this (squarebox), when i am
    trying to delete
    squarebox ,
    box deleting but
    (&-box*&", "&*box-&
    these xml elements are showing , what i have to
    do ? it has to delete,
    it amy have multipule box in my equation. how do delete xml
    elements in this case, this is my xml code. how to delete? any one
    can help me?

    Then you should provide more details on what you want this new script should do.
    To "delete XML tags in already tagged text", all you need is use the "untag" command on an XML Element. But how would the script "know" what XML Element should be untagged?
    Disclaimer: This reply is in no way enforceable, legally binding, a promise or contract, an agreement (written, verbal, or otherwise), a commitment, obligation, or free or paid-for offer of any kind to further help, guide, aid, tip, or not hinder you, or contribute to, correct, investigate, comment on or assist with any existing, forthcoming, or planned project.

  • How to delete XML Tags in already tagged text?

    Hi everyone,
    I looked in all the topics but with no results.
    Is there anyone that can help me with this script?
    Thanks
    Ivan

    Then you should provide more details on what you want this new script should do.
    To "delete XML tags in already tagged text", all you need is use the "untag" command on an XML Element. But how would the script "know" what XML Element should be untagged?
    Disclaimer: This reply is in no way enforceable, legally binding, a promise or contract, an agreement (written, verbal, or otherwise), a commitment, obligation, or free or paid-for offer of any kind to further help, guide, aid, tip, or not hinder you, or contribute to, correct, investigate, comment on or assist with any existing, forthcoming, or planned project.

  • How to pass xml data as objects into Database using store procedures

    Hi All,
         I don't have much knowledge on store procedure,can anybody help how to pass the xml as objects in Database using store procedure.
    My Requirement is I have a table with three fields EMPLOYEE is table name and the fields are EMP_ID,EMP_TYPE AND EMP_DET,I have to insert the employees xml data into corresponding fields in the table.
    Input Data
    <ROWSET>
       <ROW>
         <EMP_ID>7000</EMP_ID>
          <EMP_TYPE>TYPE1</EMP_TYPE>
         <EMP_DET>DEP</EMP_DET>
      <ROW>
      <ROW>
         <EMP_ID>7000</EMP_ID>
         <EMP_TYPE>TYPE2</EMP_TYPE>
        <EMP_DET>DEP2</EMP_DET>
    <ROW>
    <ROW>
         <EMP_ID>7000</EMP_ID>
         <EMP_TYPE>TYPE3</EMP_TYPE>
        <EMP_DET>DEP3</EMP_DET>
    <ROW>
    <ROWSET>
    So each row values has to inserted into resp fields in the table.
    Regards
    Mani

    Do you have a similar structure in your stored procedure ?
    In that case you can simply call the procedure from soa using db adapter and do a mapping to assign the values.

  • How to extract xml tag name contains dashes

     
    Hi, How to parse XML file to extract root tag contains dashes in Flex,for example
    XML Input is: <regular-body>Text of my post...</regular-body>
    expected output is : regular-body
    I appreciate any of your suggestions or inputs

    Do you want to get the name of the XML ELEMENT regular-body, or the value in the XML file "Text of my post...".
    If its the latter, then you could use the bracket/quote notation for extracting the value, like in the following example:
    image = xmlWeather[0]..parameters["conditions-icon"]["icon-link"][idx]
    I use this when parsing weather information from a 3rd party in which their XML is loaded with dashes.
    If you are looking to get the actual element name, not sure how to do that.  I would think that if you are using an XML file, you would have at least the high level element known.

  • Here's how to pass XML as a parameter to an Oracle stored proc

    This, or something like it, should be all over the web and I intend to do so.
    The first sample has exactly what you need in order to pass "XML" as a parm to a stored proc.
    http://www.oracle-base.com/forums/viewtopic.php?f=2&t=8468

    > Really, what is the difference between the 2?
    "What is a...?" questions are easily answered by Google. Generally speaking, however, "JavaScript" is Netscape's implementation of ECMAScript, a scripting language primarily for client-side development for a web browser. "Java" is an entire platform, but typically refers to an object-oriented programming language that is typically compiled to bytecode and run in a virtual machine.
    They're not the same thing at all.
    ~

  • How to set xml tag to nothing in indesign using applescript?

    Hi guys,
    I need set xml tag to nothing(for tables)  in indesign using applescript.
    Please help me.

    Hi,
    tell application "Adobe InDesign CC 2014"
        tell active document
            if (count of story) > 0 then
                tell story 1
                    if (count of tables) > 0 then
                        tell table 1
                            set tag_name to associated XML element ----------------> i can't get xml  tag, i am receiving the  xml tag is nothing.
                            if (tag_name = nothing) then
                                display dialog ("This table has no tag")
                            else
                                set markup_tag to markup tag of tag_name
                                set n to name of markup_tag
                                display dialog ("Tag name is " & n)
                            end if
                        end tell
                    end if
                end tell
            end if
        end tell
    end tell
    I can't get xml tag for table,  i am received nothing

  • How to pass input value to the IN parameter in a function

    Hi ,
    I'm new to pl/sql programming.
    The below function is used inside a package and the package is invoked in visual studio.
    The function uses 2 input parameters.
    Out of which 'in_report_parameter_id' value comes thru job processor service 's job request.
    The second IN paramter values are hard coded in the function.
    I'm not able to understand this.
    If the values are hard coded , how to make sure that only the hard coded values are the right ones?
    Please anyone could explain to me?
    I really dont have good idea about how to pass INPUT parameter to the functions or procedure
    Is there any nice document which could give me good understanding about what are the ways or types we could pass values to the input parameter in subprograms?
    thanks in advance.
    CREATE OR REPLACE FUNCTION get_class_text_str
         in_report_parameter_id IN NUMBER,
         in_which                IN VARCHAR2 DEFAULT 'SELECT'
    RETURN VARCHAR2
    IS
             end_text            VARCHAR2 (50)   := '';
             my_class_text_str  VARCHAR2(10000) := '';
             my_class_value_str VARCHAR2(10000) := '';
         CURSOR class_text(c_1_text VARCHAR2, c_2_text VARCHAR2) IS
         SELECT c_1_text || report_parameters.report_parameter_value
                               || c_2_text
                               || report_parameters.report_parameter_value
                               || '" '
          FROM report_parameters
         WHERE report_parameters.report_parameter_id     = 3690
           AND report_parameters.report_parameter_group  = 'CLASS'
           AND report_parameters.report_parameter_name   = 'CLASS'
    GROUP BY report_parameters.report_parameter_value
    ORDER BY CAST(report_parameters.report_parameter_value AS NUMBER);
    BEGIN
         IF (in_which = 'SUM') THEN     
              OPEN class_text ( 'SUM(NVL("Class ', '", 0)) "Class ' );
         ELSIF (in_which = 'PERC')THEN
              OPEN class_text ( 'ROUND((("Class ', '" / "Total") * 100), 2) "Class ' );
              end_text := ', DECODE("Total", -1, 0, 100) "Total" ';
         ELSE
              OPEN class_text ( 'SUM(DECODE(bin_id, ', ', bin_value, 0)) "Class ' );
         END IF;
         LOOP
              FETCH class_text INTO my_class_value_str;
              EXIT WHEN class_text%NOTFOUND;
              my_class_text_str := my_class_text_str || ', ' || my_class_value_str;
         END LOOP;
         CLOSE class_text;
         my_class_text_str := my_class_text_str || end_text;
         RETURN my_class_text_str;
    END get_class_text_str;
    /Edited by: user10641405 on Nov 19, 2009 8:16 AM
    Edited by: user10641405 on Nov 19, 2009 8:30 AM

    This is not a design I would use, but should work if coded properly. I would probably build a reference cursor query as text and use one open fetch and close.
    You have 2 input parameters, in_report_parameter_id and in_which. I could not find where in_report_parameter_id was used in the program, but the value passed in for in_which is being used in IF logic to decide how to open the cursor. After the cursor is open rows are being fetched and eventually the cursor is closed.
    The values in_which are compared to are hard-coded. It is the programmer's job to make sure the values listed are the right values and the actions taken are also correct. Your program is assuming that if the first 2 values are not encountered the third one listed is the one you want.
    To pass input values to a procedure you merely provide the values as a literal or variable in the call, something like
    whatever := get_class_text_str(1,'SELECT');

  • How to pass int array as an IN parameter to PLSQL Procedure

    Hi,
    How to pass int array in java to a stored procedure througn jdbc
    and what type of data type I should declare to this IN parameter
    in PLSQL Procedure.
    Thanks,
    Simi

    Hi,
    The best way to do what you want depends on what you want.  Start by describing what you need to do.  It's best to post some sample data (CREATE TABLE and INSERT statments) and what results you want from that sample data.  (See the forum FAQ: https://forums.oracle.com/message/9362002)
    If you have ideas about how to do the job (e.g., populating a temporary table) it can be helpful to include those, too, but distinguish clearly between WHAT you need to do and HOW you might do it.
    As Bencol suggested, a SYS_REFCURSOR might be the best way to pass back the results.
    Since you didn't post your table, or even describe what you wanted to do with it, I'll illustrate using scott.emp, which is probably on your system.
    Say you wanted a procedure that took a DATE as an argument, and returned a some designated columns (empno, ename and hiredate in the example below) for all employees hired on or after the given DATE.  You might write a procedure like this:
    CREATE OR REPLACE PROCEDURE  hired_since
    (   start_date  IN   DATE
    ,   out_data    OUT  SYS_REFCURSOR
    AS
    BEGIN
        OPEN out_data FOR
            SELECT  empno, ename, hiredate
            FROM    scott.emp
            WHERE   hiredate  >= start_date;
    END  hired_since;
    SHOW ERRORS
    You can test it in SQL*Plus like this:
    VARIABLE   c REFCURSOR
    EXEC  hired_since (DATE '1982-01-01', :c);
    PRINT :c
    The output I got from this test was:
         EMPNO ENAME      HIREDATE
          7788 SCOTT      19-APR-87
          7876 ADAMS      23-MAY-87
          7934 MILLER     23-JAN-82

Maybe you are looking for

  • Product Hierarchy and creating quotations with brands - require solution

    Hi, We are using product heirarchy in our system ( its a 18 character key), the first 8 character is for the brand. Material is created with a different character combination and the material is assigned the complete 18 character key in the material

  • System compromised?

    Hey, I'm not sure what I should think of this, so I'm posting here and asking about it... I've gotten G-lined from QuakeNet twice now, with the following message: You are infected with a trojan, please clean your PC. I guess it's certainly plausible,

  • Unable to Add SAP System in NWDS to import RFC into BPM

    Hi , I created a RFC out of a BRFPlus function in CRM system. Now I am trying to add the SAP CRM system in NWDS from Preferences option. But unable to do so.The error says wrong user/password. However I am able to create the relevant configurations i

  • How to create jpg's from ARW (Sony RAW)?

    Hello! I have Photoshop CS6 Extended. Is it possible to create jpeg photos differing only by 1 EV basing on RAW file automaticaly in CS6 (Camera RAW)? I don`t want to open RAWs files every time I want to create a jpeg photo. I have 3 RAW files: -2 EV

  • Good receipt and Inventory value

    I have a material which need's to be received in liters but valued in IU for inventory and payables. IU value is not known at the time of good receipt. There is a time lag to determine the IU value. Is it possible to get my inventory numbers based on