XML Type and ODP

Hi,
I have some problems with running application which uses ODP to connect to Oracle in version 9.2.0.6.
There is one PLSQL packages with maybe 30 procedures. Half of this have VARCHAR2 input parameters.
In that version of Oracle there is bug - I very ofen get "Numeric or value error" during calling PLSQL.
Only one suggestion from Oracle is to upgrade into higher version. My Admin told me that upgrade is planned
but he cannot provide date. So I am going to change my code from:
PLSQL
PROCEDURE Test1( param1 IN VARCHAR2
          ,param2 IN VARCHAR2
          ,param3 IN NUMBER
          ,param4 OUT CLOB)
C#
OracleCommand theCommand = new OracleCommand("package.Test1");
theCommand.CommandType = CommandType.StoredProcedure;
theCommand.Parameters.Add("param1", OracleDbType.Varchar2, value1, ParameterDirection.Input);
theCommand.Parameters.Add("param2", OracleDbType.Varchar2, value2, ParameterDirection.Input);
theCommand.Parameters.Add("param3", OracleDbType.Decimal, value3, ParameterDirection.Input);
theCommand.Parameters.Add("param4", OracleDbType.clob, ParameterDirection.Output);
INTO
PLSQL
--old procedure is not changed
PROCEDURE Test1( param1 IN VARCHAR2
          ,param2 IN VARCHAR2
          ,param3 IN NUMBER
          ,param4 OUT CLOB)
--new procedure added with XMLType input
PROCEDURE Test1( params IN XMLType
          ,paramClob OUT CLOB)
IS
param_1 VARCHAR2(4000);
param_2 VARCHAR2(4000);
param_3 NUMBER;
BEGIN
SELECT ExtractValue( params, '/params/param1')
,ExtractValue( params, '/params/param2')
,ExtractValue( params, '/params/param3')
INTO param_1, param_2, param_3
FROM DUAL;
--now calling old proc
Test1(param_1, param_2, param_3, paramClob);
END Test1;
C#
OracleCommand theCommand = new OracleCommand("package.Test1");
theCommand.CommandType = CommandType.StoredProcedure;
     XDocument packedParams = new XDocument
new XElement("params",
new XElement("param1", value1),
new XElement("param2", value2),
new XElement("param3", value3)
theCommand.Parameters.Add("params", OracleDbType.XMLType, packedParams , ParameterDirection.Input);
theCommand.Parameters.Add("paramClob", OracleDbType.clob, ParameterDirection.Output);
What do You think about such solution, do you have any bad experiences with using ODP/XMLType ?
Regards,
Piotr

I doubt proposed change will reduce frequency of errors.
"Numeric or value error"In V9 this error cause 2 possible causes.
1) VARCHAR2 is too small
2) non-numeric value being assigned to numeric datatype.
If the root cause is #2 above, the error will continue with proposed change.
Good Luck!

Similar Messages

  • XML-Type and reference to unavailable DTD causes validation problems

    Hi,
    I'm fairly new to Oracle's XML features. I've created a view that produces XML from a number of tables. The resulting XML is used to be stored on a web site for download by customers (this is a manual process about once a week via a CMS). It contains a reference to a DTD that is available on the web server, too. This XML must also be stored in the Oracle database. The problem is that the Oracle Server is not allowed to access any web site (Oracle server is in inhouse network with no access allowed to the world outside). So I can't store the XML in an XML-type column, as the Oracle server wants to validate the XML against the referenced DTD. There is an option not to validate the XML. But then I get the error when I try to access the XML afterwards. So up to now I use a CLOB column to store the XML, but then I lose all the benefits of an XML-type column. Is there any workaround?
    TIA,
    Stefan

    In 10.2.0.2.0 The following works
    SQL> drop table TEST_XML
      2  /
    Table dropped.
    SQL> create table TEST_XML (
      2     XML_SEQ number(10) not NULL,
      3     XML_DOC XMLType not NULL
      4  )
      5  /
    Table created.
    SQL> drop sequence TEST_XML_SEQ
      2  /
    Sequence dropped.
    SQL> create sequence TEST_XML_SEQ
      2  /
    Sequence created.
    SQL> create or replace view V_EMP_XML as select
      2         -- Processing Instruction
      3         '<?xml version="1.0" encoding="ISO-8859-1"?>' ||
      4         -- DTD reference
      5         '<!DOCTYPE employees SYSTEM "http://myserver/dtd/employees.dtd">' ||
      6         SYS.XMLTYPE.getClobVal(
      7            XMLElement("employees",
      8               (select XMLAgg(
      9                          XMLElement("emp",
    10                             XMLAttributes(
    11                                e.EMPNO as "empno",
    12                                e.DEPTNO as "deptno"
    13                             ),
    14                             XMLElement("ename", e.ENAME),
    15                             XMLElement("job", e.JOB),
    16                             XMLElement("salary", e.SAL),
    17                             XMLElement("hiredate", to_char(e.HIREDATE, 'YYYY-MM-DD'))
    18                          )
    19                       order by e.EMPNO
    20                       )
    21                from   SCOTT.EMP e
    22               )
    23            )
    24         ) as XML_DOC
    25  from   DUAL
    26  /
    View created.
    SQL>
    SQL> insert into TEST_XML
      2  (
      3    XML_SEQ,
      4    XML_DOC
      5  )
      6  select TEST_XML_SEQ.NEXTVAL,
      7         XMLType(v.XML_DOC, NULL, 1, 1)
      8  from   V_EMP_XML v
      9  /
    1 row created.
    SQL> select t.XML_DOC.getClobVal() as RESULT
      2  from   TEST_XML t
      3  where  t.XML_SEQ = 1
      4  /
    RESULT
    <?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE employees SYSTEM "http://my
    SQL> select extract(t.XML_DOC, '//emp[@deptno=20]').getClobVal() as RESULT
      2  from   TEST_XML t
      3  where  t.XML_SEQ = 1
      4  /
    ERROR:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00202: could not open "http://myserver/dtd/employees.dtd" (error 101)
    Error at line 1
    no rows selected
    SQL> alter session set events ='31156 trace name context forever, level 2'
      2  /
    Session altered.
    SQL> select extract(t.XML_DOC, '//emp[@deptno=20]').getClobVal() as RESULT
      2  from   TEST_XML t
      3  where  t.XML_SEQ = 1
      4  /
    RESULT
    <emp empno="7369" deptno="20"><ename>SMITH</ename><job>CLERK</job><salary>800</s
    SQL>

  • Custom action with XML type input and output parameter.

    Hi,
    I want to develop custom action with xml type input and/or output parameter.
    Is there sample code for java side. How is the definition of input and/or output parameter and set/get methods?
    does it need special .jar file to develop custom action like this?
    Thanks.

    Cemil - yes, you can use XML data types.  Use the class
    com.sap.lhcommon.xml.XMLDataType
    for your parameter type.  Here is a snippet from a custom action we use to log XML (instead of just returning the #text node like the default logger does):
    public class XMLLogger extends ActionReflectionBase
        private String source;
        private String eventType;
        private String textMessage;
        private XMLDataType xmlMessage;
        public XMLLogger()
            log = new Logger("UserLog");
            source = DEFAULT_SOURCE;
            eventType = TYPE_INFO;
            textMessage = "";
            xmlMessage = new XMLDataType();
        public XMLDataType getXmlMessage()
            return xmlMessage;
        public void setXmlMessage(XMLDataType xmlMessage)
            this.xmlMessage = xmlMessage;
        public void Invoke(Transaction transaction, ILog ilog)
            StringBuffer sb = new StringBuffer();
            sb.append('[');
            sb.append(source);
            sb.append("] ");
            sb.append(textMessage);
            sb.append(XMLUtils.convertXmlToString(xmlMessage));
    XMLUtils is a helper class we wrote - it's just a bunch of standard Java XML boilerplate code.  The important part you need to know is XMLDataType.getDocument() will return an org.w3c.dom.Document.
    I hope that was enough information to help.
    -tim

  • What is inbound XML message type and idoc type in Purchase Order response

    Hi ,
    We are on SRM 7 ECS , support pack SAPKIBKV08.
    We have a process in which vendor will send a Purchase Order response  which will be
    converted to XML format by a middleware. This XML message will come to
    SRM and post a POR. I want to do the EDI mapping for this XML message,
    but there is no message type and idoc type in SRM for Purchase Order
    response. How do I map my message type in SRM to the vendor sent fields
    in middleware .
    Please advise
    Rgds
    Sumendra

    Hi,
    You can process with XML without IDoc.
    Vendor->  (XML) -> PI -> (XML) -> SRM.
    Please check PurchaseOrderConfirmation_In in namespace "http://sap.com/xi/SRM/Procurement/Global".
    http://esworkplace.sap.com
    Regards,
    Masa

  • XML Schemas and "Type"

    I'm having a brutal time working with this program, it doesn't even seem like it should be this hard. I won't get in to the situation yet, I keep tripping across other problems as I go. Here's the next one:
    According to Eclipse, I'm not allowed to put an element with a type if it also has a restriction, because the restriction seems to (as far as I can tell) automatially attach an "anonymous type" to the element. That is to say:
    <element name="foo" type="string">
        <simpleType>
            <restriction base="string">
                [restriction tags]
            </restriction>
        </simpleType>
    </element>doesn't work. It also doesn't work if I don't have a "base='x'" line, but that makes a bit more sense. On the other hand:
    <element name="foo">
        <simpleType>
            <restriction base="string">
                [restriction tags]
            </restriction>
        </simpleType>
    </element>
    does work, but causes a number of problems because "foo" no longer has a type to call its own. I'm sure I'm missing something here but I can't work out what.
    Here's the exact error from Eclipse's XML Schema Validator, which places an error on foo's declaration line:
    "Multiple Annotations found on this line:
    - src-element.3: Element 'foo' has both a 'type' attribute and a 'anonymous type' child. Only one of these is allowed for an element.
    - Element type "element" must either be followed by attribute types, '>' or '/>'."
    Any help would be appreciated, thanks. :)

    As the message below indicates you are defining a new simple type but in line with the element definition (enclosed by element tags). As it is in-line it is classed as an anonymous type i.e. has no name. You therefore cannot give an element a type and then specify its type in line.
    Athough essentially it is a string (hence requires base type) it is nontheless a new type i.e a string with restrictions. The other way to do this, which will allow you to reuse the type is is as follows
        <xsd:element name="foo" type="myRestrictedString"/>
        <xsd:element name="foo2" type="myRestrictedString"/>
        <xsd:simpleType name="myRestrictedString">
            <xsd:restriction base="xsd:string">
                <xsd:pattern value="[0-9]{3}"/>
            </xsd:restriction>
        </xsd:simpleType>
    >
    "Multiple Annotations found on this line:
    - src-element.3: Element 'foo' has both a 'type'
    attribute and a 'anonymous type' child. Only one of
    these is allowed for an element.
    - Element type "element" must either be followed by
    attribute types, '>' or '/>'."

  • Parsing the data from and xml type field

    Hi - I have registered a schema and inserted arecord into the table with the xml type column. Now I want to parse the data from the xmltype field into a relational table. I have been using the following select statement to accomplish this - and it does work if there is data in all the selected fields but when the filed is null then the whole select statement fails and brings back 'no rows returned'.If the value is null I want the select statment to return null. please give any ideas.
    SELECT version,frmd_transaction_date,extractValue(value(b), 'event_update/location')"location",
    extractValue(value(b), 'event_update/sending_system')"sending_system",
    extractValue(value(b), 'event_update/event_identifier')"event_identifier",
    extractValue(value(b), 'event_update/event_link')"event_link",
    extractValue(value(b), 'event_update/organization_code')"organization_code",
    nvl(extractValue(value(c), '/schedule/event_duration_minutes'),'000')"event_minutes"
    FROM fraamed_user.frmd_event_update , TABLE(xmlsequence(extract(xml_event_update, '/event_update')))b,
    TABLE(xmlsequence(extract(xml_event_update, '/event_update/schedule')))c

    ...then I guess you have to rewrite the query.
    Is schedule another xml sequence inside of event_update sequence ?
    If it is not you can try this :
    SELECT version,frmd_transaction_date,extractValue(value(b), '/event_update/location/text()')"location",
    extractValue(value(b), '/event_update/sending_system/text()')"sending_system",
    extractValue(value(b), '/event_update/event_identifier/text()')"event_identifier",
    extractValue(value(b), '/event_update/event_link/text()')"event_link",
    extractValue(value(b), '/event_update/organization_code/text()')"organization_code",
    extractValue(value(b), '/event_update/schedule/event_duration_minutes/text()')"event_minutes"
    FROM fraamed_user.frmd_event_update , TABLE(xmlsequence(extract(xml_event_update, '/event_update')))b
    ...if yes, did you try nvl function (I don't think this would be a solution of a problem):
    SELECT version,frmd_transaction_date,nvl(extractValue(value(b), '/event_update/location/text()')"location", 'NULL VALUE'),
    nvl(extractValue(value(b), '/event_update/sending_system/text()')"sending_system",'NULL VALUE'),
    nvl(extractValue(value(b), '/event_update/event_identifier/text()')"event_identifier",'NULL VALUE'),
    nvl(extractValue(value(b), '/event_update/event_link/text()')"event_link",'NULL VALUE'),
    nvl(extractValue(value(b), '/event_update/organization_code/text()')"organization_code",'NULL VALUE'),
    nvl(extractValue(value(c), '/schedule/event_duration_minutes/text()')"event_minutes",'NULL VALUE')
    FROM fraamed_user.frmd_event_update , TABLE(xmlsequence(extract(xml_event_update, '/event_update')))b,
    TABLE(xmlsequence(extract(xml_event_update, '/event_update/schedule')))c
    If none of this works post your xml schema.

  • XML Parser and Content-type/encoding problem

    I've write a little and simple XML parser and a simple "trasformer" that recive an XML file and an XSL one and return HTML, here is the code:
    public static String toHTML(Document doc, String xslSource){
            ByteArrayOutputStream testo = new ByteArrayOutputStream();
            try{
                DOMSource source = new DOMSource(doc);
                TransformerFactory tFactory = TransformerFactory.newInstance();
                System.out.println("----> " + xslSource);
                Transformer transformer = tFactory.newTransformer(new StreamSource(xslSource));
                transformer.setOutputProperty(OutputKeys.INDENT, "yes");
                transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
                transformer.setOutputProperty(OutputKeys.METHOD, "html");
             transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
             transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
                transformer.transform(source, new StreamResult(testo));
            }catch(Exception ioe){
                System.out.println("2 XMLTool.toHTML " + new java.util.Date());
                System.out.println(ioe);        
            return testo.toString();
        }the problem is that I would like to put the HTML code its return into a JEditorPane; now I'm trying with this code:
    JEditorPane jep1 = new JEditorPane();
    jep1.setContentType("text/html");
    jep1.setText(v);
    // 'v' is the string returned by the code posted up (the XML/XSL transformer)but I can't see anything in my JEditorPane.
    I think that the problem is this line of code that the transformer add automaticaly ad HTML code:
    <META http-equiv="Content-Type" content="text/html; charset=UTF-8">Infact if I try to delete this line from the code I can see what I want but is'n good delete a line of code without understend where is the problem.
    So, can anyone help me?

    good.
    when u set ur output properties to html , transformer
    searches for all entity references and converts accordingly.
    if u r using xalan these files will be used for conversion of
    Character entity references for markup-significant
    output_html.properties
    (this should be in templates package)
    and HTMLEntities.res(should be in serialize package)
    vasanth-ct

  • Schema and XML Type table in Oracle 9.2.0.2.0

    Somebody please helps me!
    I am studying about Oracle XML DB, and I have some problems:
    declare
    result boolean;
    begin
    result := dbms_xdb.createFolder('/doan/' );
    end;
    DELETE FROM resource_view WHERE any_path = '/doan/KHACH_HANG.xsd';
    BEGIN
    result := dbms_xdb.createresource('/doan/KHACH_HANG.xsd','<?xml version="1.0" encoding="UTF-8"?>
    <!-- edited with XMLSPY v2004 rel. 4 U (http://www.xmlspy.com) by NGHI (KHTN) -->
    <xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
         <xs:element name="KHACH_HANG">
              <xs:annotation>
                   <xs:documentation>Comment describing your root element</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="MA_KH" type="xs:string"/>
                        <xs:element name="TEN_KH" type="xs:string"/>
                        <xs:element name="DIA_CHI" type="xs:string"/>
                        <xs:element name="DIEN_THOAI" type="xs:string"/>
                        <xs:element name="EMAIL" type="xs:string"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
    </xs:schema>');
    dbms_xmlschema.registerSchema
    'http://localhost:8080/Khach_Hang.xsd',
    xdbURIType('/doan/KHACH_HANG.xsd').getClob(),
    LOCAL => TRUE,
    GENTYPES => TRUE,
    GENTABLES => FALSE,
    OWNER => 'SCOTT');
    DROP TABLE scott.khach_hang;
    CREATE TABLE scott.Khach_Hang OF XMLType
    XMLSchema "http://localhost:8080/Khach_Hang.xsd"
    ELEMENT "KHACH_HANG";
    insert into scott.Khach_Hang values(
    XMLType('<KHACH_HANG>
    <MA_KH>12</MA_KH>
    <TEN_KH>AAAA</TEN_KH>
    <DIA_CHI>135 B Tran Hung Dao</DIA_CHI>
    <DIEN_THOAI>454646</DIEN_THOAI>
    <EMAIL>[email protected]</EMAIL>
    </KHACH_HANG>'));
    END;
    COMMIT;
    When I insert data into table, an error appearance:
    "schema and element does not match"
    Please help me!
    Thanks

    Yes, you can and should be [migrating LONG to LOB in Oracle 9.2|http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96591/adl08lon.htm].
    Justin

  • PLSQL and Java XML type mapping

    Running database 10gR2.  Trying to create a Java stored procedure that returns an XML type (oracle.xdb.XMLType) like so:
    class MyCoolClass
       static oracle.xdb.XMLType doSomething( String xmldata)
         oracle.xdb.XMLType xmlt = new oracle.xdb.XMLType( xmldata );
         return xmlt;
    This, of course, is wrapped by a PL/SQL function:
    function doSomething( xmldata varchar2 ) return SYS.XMLTYPE AS LANGUAGE JAVA
    name 'MyCoolClass.doSomething(java.lang.String) return oracle.xdb.XMLType';
    While everything compiles (that means it should work, right?), the above codes generates a runtime error ORA-00932 'inconsistent datatypes' error.   I'm not  sure what I'm doing wrong, it was my understanding that a default mapping existed between the PL/SQL SYS.XMLTYPE and oracle.xdb.XMLType.  Is what I'm attempting even possible?

    Sorry, I was being sloppy with my code example.  It should be:
    class MyCoolClass
       static oracle.xdb.XMLType doSomething( String xmldata)
          java.sql.Connection c = java.sql.DriverManager.getConnection("jdbc:default:connection:");
         oracle.xdb.XMLType xmlt = new oracle.xdb.XMLType( c, xmldata );
         return xmlt;

  • When add messge type and profile parter to IDOC regarding xml to IDOC .

    Hi all:
         There is a business requirement to pass xml to IDOC using xi, can you tell me when the message type and profile partner  information is added to IDOC?  this work is done by Xi or sap?
    Thank you very much

    Hi Jingying ,
    There is a business requirement to pass xml to IDOC using xi, can you tell me when the message type and profile partner information is added to IDOC?
    --> at one end XML is available at the other end we need to import the Idoc in XI . Inside XI mapping will take place which will take care of your XML to IDoc passing . Partner Profile Information is maintained at ECC end only. But we need to pass the Logical system details at XI end i.e SLD/Adapter specif indentifers
    this work is done by Xi or sap?
    -->SAP only !!
    Regards ,

  • Oracle Object Types and XML

    Hi All
    I have oracle object types created.
    <code>
    CREATE OR REPLACE
    TYPE CONFIRM_APP_CONFIRM_ENQUIRY_AT AS OBJECT
    ENQATTRIBTYPECODE VARCHAR2(1000),
    ENQATTRIBVALUECODE VARCHAR2(1000),
    ENQATTRIBSTRINGVALUE VARCHAR2(1000),
    ENQATTRIBNUMVALUE NUMBER,
    ENQATTRIBDATEVALUE DATE
    </code>
    I m using this type for couple of columns in a table
    and then i try to use this procedure which generates XML
    <code>
    BEGIN
    MY_SQL :=
    DBMS_XMLQUERY.NEWCONTEXT
    ( 'Select Nvl(Enquiry_Number,9999) "EnquiryNumber",
    External_System_Reference "ExternalSystemReference",
    External_System_Number "ExternalSystemNumber",
    Service_Code "ServiceCode",
    Subject_Code "SubjectCode",
    Enquiry_Description "EnquiryDescription",
    Enquiry_Location "EnquiryLocation",
    Enquiry_Status_Code "EnquiryStatusCode",
    Assigned_Office_Code "AssignedOfficerCode",
    Logged_Time "LoggedTime",
    EnquiryX "EnquiryX",
    EnquiryY "EnquiryY",
    Site_Code "SiteCode",
    Central_Asset_Id "CentralAssetId",
    Contact_Name "ContactName",
    Contact_Phone "ContactPhone",
    Contact_Fax "ContactFax",
    Contact_Email "ContactEmail",
    Enquiry_Reference "EnquiryReference",
    Enquiry_Class_Code "EnquiryClassCode",
    Notice_From_Org_Code "NoticeFromOrgCode",
    Works_Reference "WorksReference",
    Job_Number "JobNumber",
    Address_Reference "AddressReference",
    enquiry_attribute1 "EnquiryAttribute",
    enquiry_attribute2 "EnquiryAttribute",
    enquiry_attribute3 "EnquiryAttribute",
    enquiry_attribute4 "EnquiryAttribute",
    enquiry_attribute5 "EnquiryAttribute",
    enquiry_attribute6 "EnquiryAttribute",
    enquiry_attribute7 "EnquiryAttribute",
    enquiry_attribute8 "EnquiryAttribute",
    enquiry_attribute9 "EnquiryAttribute",
    enquiry_attribute10 "EnquiryAttribute",
    enquiry_attribute11 "EnquiryAttribute",
    enquiry_attribute12 "EnquiryAttribute",
    enquiry_attribute13 "EnquiryAttribute",
    enquiry_attribute14 "EnquiryAttribute",
    enquiry_attribute15 "EnquiryAttribute",
    enquiry_attribute16 "EnquiryAttribute",
    enquiry_attribute17 "EnquiryAttribute",
    enquiry_attribute18 "EnquiryAttribute",
    enquiry_attribute19 "EnquiryAttribute",
    enquiry_attribute20 "EnquiryAttribute",
    enquiry_customer "EnquiryCustomer",
    enquiry_document "DocumentLink"
    FROM XXHCC_HOLDING_CONFIRM WHERE
    EXTERNAL_SYSTEM_REFERENCE ='
    || EXTERNAL_SYSTEM_REFERENCE
    || '
    AND message_status = ''FAIL'''
    DBMS_XMLQUERY.SETROWSETTAG (MY_SQL, 'Operation');
    DBMS_XMLQUERY.SETROWTAG (MY_SQL, 'NewEnquiry');
    L_XML := DBMS_XMLQUERY.GETXML (MY_SQL);
    DBMS_XMLQUERY.CLOSECONTEXT (MY_SQL);
    </code>
    when i get the xml as output, i get this..
    <code>
    <Operation>
    <NewEnquiry num="1">
    <EnquiryNumber>9999</EnquiryNumber>
    <ExternalSystemReference>4343017</ExternalSystemReference>
    <ExternalSystemNumber>1</ExternalSystemNumber>
    <ServiceCode>HWAY</ServiceCode>
    <SubjectCode>MAIN</SubjectCode>
    <EnquiryDescription>TAI-Highway Maintenance</EnquiryDescription>
    <EnquiryLocation>O/S Cheese Pub</EnquiryLocation>
    <LoggedTime>2008-04-09T08:33:36</LoggedTime>
    <SiteCode>19101890</SiteCode>
    <ContactName>MRS xyz</ContactName>
    <ContactPhone>3434343</ContactPhone>
    <EnquiryReference>CRMHUB</EnquiryReference>
    <NoticeFromOrgCode>ABC</NoticeFromOrgCode>
    <WorksReference>4343017</WorksReference>
    <EnquiryAttribute>
    <ENQATTRIBTYPECODE>CSPL</ENQATTRIBTYPECODE> <ENQATTRIBSTRINGVALUE>n.a</ENQATTRIBSTRINGVALUE>
    </EnquiryAttribute>
    <EnquiryAttribute>
    <ENQATTRIBTYPECODE>CSAI</ENQATTRIBTYPECODE>
    <ENQATTRIBSTRINGVALUE>Cracked Path-Loose Flagstone</ENQATTRIBSTRINGVALUE>
    </EnquiryAttribute>
    <EnquiryAttribute> <ENQATTRIBTYPECODE>CSDL</ENQATTRIBTYPECODE> <ENQATTRIBSTRINGVALUE>No</ENQATTRIBSTRINGVALUE>
    </EnquiryAttribute>
    <EnquiryAttribute>
    <ENQATTRIBTYPECODE>CSIM</ENQATTRIBTYPECODE>
    </EnquiryAttribute>
    <EnquiryAttribute/>
    <EnquiryAttribute/>
    <EnquiryAttribute/>
    <EnquiryAttribute/>
    <EnquiryAttribute/>
    <EnquiryAttribute/>
    <EnquiryAttribute/>
    <EnquiryAttribute/>
    <EnquiryAttribute/>
    <EnquiryAttribute/>
    <EnquiryAttribute/>
    <EnquiryAttribute/>
    <EnquiryAttribute/>
    <EnquiryAttribute/>
    <EnquiryAttribute/>
    <EnquiryAttribute/>
    <ENQUIRY_CUSTOMER>
    <CUSTOMER_ALT_PHONE>00</CUSTOMER_ALT_PHONE>
    <CUSTOMER_PRIMARY_ADDRESS>,,0, ABC Street</CUSTOMER_PRIMARY_ADDRESS>
    <CUSTOMER_TOWN_NAME>UK</CUSTOMER_TOWN_NAME>
    <CUSTOMER_COUNTY_NAME>UK</CUSTOMER_COUNTY_NAME>
    <CUSTOMER_POST_CODE>AB1 3QT</CUSTOMER_POST_CODE>
    </ENQUIRY_CUSTOMER>
    </NewEnquiry>
    </Operation>
    </code>
    My question is i m transferring this XML to a third party webservice and it does inserting into a third party application.
    The problem is if you look under EnquiryAttribute tag ENQATTRIBSTRINGVALUE and ENQATTRIBTYPECODE i need this to be in lowercase.
    As the xml is getting automatically generated how do i achieve this. I feel them in the uppercase is causing problems at the other end.
    Any help appreciated
    Srini
    Message was edited by:
    sikhasrinivas

    Use "..." delimiters in the CREATE TYPE (and in all your code that references the type).

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

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

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

  • How to combine "Object-to-XML (OXM)" and "Direct to XML Type" mapping?

    hi
    If I have an XMLType column in my table (wich I can map using TopLink) and I have defined the structure of the contents of this XMLType column using XML Schema (wich I can map using Toplink), how can I combine both types of TopLink mappings "as transparently as possible"?
    for "Object-to-XML (OXM)" mapping
    see http://www.oracle.com/technology/products/ias/toplink/technical/tips/ox/index.htm
    for "Direct to XML Type" mapping
    see http://www.oracle.com/technology/products/ias/toplink/doc/1013/main/_html/relmapun004.htm#CHDFIFEF
    thanks
    Jan Vervecken

    Thanks for your reply James Sutherland.
    Although I haven't used a "TopLink Converter" before, this seems like a good idea.
    The thing is that the "TopLink Workbench Editor" for my "Direct to XML Type" mapping doesn't have a "Converter" tab, some other mapping type editors do have such a "Converter" tab.
    I'm not sure if I completely understand how such a "TopLink Converter" is supposed to work. How many attributes do I need in the "XMLRow" Java object for the "MY_XML" column in the "XML_TABLE" table I try to map to?
    I suppose I should try to get a situation where the "XMLRow" Java object has an "myXML" attribute of Java class type "MyXML" (where "MyXML" has been mapped to an XML Schema), not?
    So do I also still need an attribute "myXMLDocument" of type org.w3c.dom.Document as I do now for the "Direct to XML Type" mapping?
    Oh, by the way ... for anyone who hits this forum thread looking for the reason why the TopLink Workbench reports the problem "Attribute must be assignable to java.lang.String, org.w3c.dom.Document, or org.w3c.Node" while your attribute is of such a type, read this forum post
    Re: Toplink WB 10.1.3 - Aggregate field mapping bug and XMLType question
    For me the "Direct to XML Type" mapping works fine, just ignoring the waring. This is supposed to be bug number 5071250.
    thanks
    Jan Vervecken

  • Insertion in XML Type table and fetching the data in Pro*C

    I have a Pro*C program written which populate one temp table. That temp table is used for writing the records to a flat file and then the table is purged by this program itself. Now my requirement is to write a new procedure in this progarm which simultaneously populate new XML Type table. Also i have to write some other procedures/functions to query the XML type table
    in Pro*C. I am new to XML part of database. Could somebody suggest how to go ahead with this problem

    Please check the Oracle Database 10g: XML DB Developer's Guild for example.

  • Times Ten and PL/SQL XML Type

    How TT can support XML type PL/SQL or what is workaround...

    Gennady Sigalaev wrote:
    PL/SQL in TimesTen does not support large objects (LOBs), Internet data types (XMLType, URIType, HttpURIType), or "Any" data types (AnyType, AnyData, AnyDataSet).
    More information you can find in documentation (http://download.oracle.com/docs/cd/E13085_01/welcome.html)
    From Oracle's website: http://www.oracle.com/technetwork/database/timesten/documentation/1121-historic-183693.html
    "You can cache Oracle LOB data in TimesTen cache groups. Oracle CLOB data is cached as TimesTen VARCHAR2 data. Oracle BLOB data is cached as TimesTen VARBINARY data. Oracle NCLOB data is cached as TimesTen NVARCHAR2 data."
    However, the catch is the VARCHAR2 and VARBINARY in TT would appear to only handle 4 MB and Oracle CLOB and BLOB handles 4 GB. So it does support it but up to a certain point it would seem.
    Edited by: victor on Aug 24, 2011 12:36 PM

Maybe you are looking for