Problem posting XML
It appears that the forum software has decided to start swallowing XML tags. This makes it difficult to use the forum. Please bear with us while we investigate.
If you are desperate a view source appears to show the content with TAGS still....
Similar Messages
-
Problems posting XML to an Apache server from a win2000 server
Hi.
I am ultra fresh to java so any help will be greatly appriciated.
What i'm trying to do is to post some xml to a remote server.
The remote server is Apache (that's all i know) and it only accepts post, not get as a method.
I'm using a win2000 adv server, iis5.
This file (post.jsp) is located in my webroot.
The code is as follows:
<%@ page import="java.net.*" %>
<%
try {
String xmlString = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>";
xmlString = "<REQUEST>";
xmlString += "<USERNAME>xxxxx</USERNAME>";
xmlString += "<PASSWORD>xxxx</PASSWORD>";
xmlString += "<ACTION>";
xmlString += "<RETURNTYPE>XML</RETURNTYPE>";
xmlString += "<GET-FTIME>on</GET-FTIME>";
xmlString += "<TRANSFORM>on</TRANSFORM>";
xmlString += "</ACTION>";
xmlString += "<PACKET>";
xmlString += "<NAME>HJEM-P�-D�REN</NAME>";
xmlString += "<FROM-PNR>1158</FROM-PNR>";
xmlString += "<TO-PNR>8001</TO-PNR>";
xmlString += "<DATE>06.09.2000</DATE>";
xmlString += "<CLOCK>1400</CLOCK>";
xmlString += "<WEIGHT>200</WEIGHT>";
xmlString += "<LENGTH>75</LENGTH>";
xmlString += "<WIDTH>18</WIDTH>";
xmlString += "<HEIGHT>10</HEIGHT>";
xmlString += "</PACKET>";
xmlString += "</REQUEST>";
URL url = new URL("http://xxxxxxxx");
HttpURLConnection con = (HttpURLConnection)url.openConnection();
con.setInstanceFollowRedirects(true);
con.setFollowRedirects(true);
con.setRequestMethod("POST");
con.setDoOutput(true);
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(con.getOutputStream()));
bw.write("xmltekst=" + xmlString);
bw.flush();
bw.close();
BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream()));
String line = br.readLine();
String result ="";
while (line !=null) {
result += line;
line = br.readLine();
br.close();
out.print("Resultat: " + result);
} catch(Exception exc) {
exc.printStackTrace();
%>
Can you see any obvious errors?
When i try to open it in my browser (IE6.0)
It produces the following:
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
A name was started with an invalid character. Line 1, Position 2
<%@ page import="java.net.*" %>
-^
Wich really helps a lot. :roll:
Apperantly it thinks it's XML or something.
Anyone able to help me with this one?
Thank you in advance! :)
-KemistryWhen you try to open what in your browser? I was following your question -- your JSP creates an XML and sends it to another server and receive the server's reply -- but then all of a sudden you dragged in a browser. What does it have to do with the question?
-
Problem with XML in APEX ORA-06502
i, I have a problem with XML generation, I developed an application in APEX, and in a html page I have this process:
declare
l_XML varchar2(32767);
begin
select xmlElement
"iva",
xmlElement("numeroRuc",J.RUC),
xmlElement("razonSocial", J.RAZON_SOCIAL),
xmlElement("idRepre", J.ID_REPRE),
xmlElement("rucContador", J.RUC_CONTADOR),
xmlElement("anio", J.ANIO),
xmlElement("mes", J.MES),
xmlElement
"compras",
select xmlAgg
xmlElement
"detalleCompra",
--xmlAttributes(K.ID_COMPRA as "COMPRA"),
xmlForest
K.COD_SUSTENTO as "codSustento",
K.TPLD_PROV as "tpldProv",
K.ID_PROV as "idProv",
K.TIPO_COMPROBANTE as "tipoComprobante",
to_char(K.FECHA_REGISTRO, 'DD/MM/YYYY') as "fechaRegistro",
K.ESTABLECIMIENTO as "establecimiento",
K.PUNTO_EMISION as "puntoEmision",
K.SECUENCIAL as "secuencial",
to_char(K.FECHA_EMISION, 'DD/MM/YYYY') as "fechaEmision",
K.AUTORIZACION as "autorizacion",
to_char(K.BASE_NO_GRA_IVA, 9999999999.99) as "baseNoGraIva",
to_char(K.BASE_IMPONIBLE, 9999999999.99) as "baseImponible",
to_char(K.BASE_IMP_GRAV, 9999999999.99) as "baseImpGrav",
to_char(K.MONTO_ICE, 9999999999.99) as "montoIce",
to_char(K.MONTO_IVA, 9999999999.99) as "montoIva",
to_char(K.VALOR_RET_BIENES, 9999999999.99) as "valorRetBienes",
to_char(K.VALOR_RET_SERVICIOS, 9999999999.99) as "valorRetServicios",
to_char(K.VALOR_RET_SERV_100, 9999999999.99) as "valorRetServ100"
xmlElement
"air",
select xmlAgg
xmlElement
"detalleAir",
xmlForest
P.COD_RET_AIR as "codRetAir",
to_char(P.BASE_IMP_AIR, 9999999999.99) as "baseImpAir",
to_char(P.PORCENTAJE_AIR, 999.99) as "porcentajeAir",
to_char(P.VAL_RET_AIR, 9999999999.99) as "valRetAir"
from ANEXO_COMPRAS P
where P.ID_COMPRA = K.ID_COMPRA
AND P.ID_INFORMANTE_XML = K.ID_INFORMANTE_XML
xmlElement("estabRetencion1", K.ESTAB_RETENCION_1),
xmlElement("ptoEmiRetencion1", K.PTO_EMI_RETENCION_1),
xmlElement("secRetencion1", K.SEC_RETENCION_1),
xmlElement("autRetencion1", K.AUT_RETENCION_1),
xmlElement("fechaEmiRet1", to_char(K.FECHA_EMI_RET_1,'DD/MM/YYYY')),
xmlElement("docModificado", K.DOC_MODIFICADO),
xmlElement("estabModificado", K.ESTAB_MODIFICADO),
xmlElement("ptoEmiModificado", K.PTO_EMI_MODIFICADO),
xmlElement("secModificado", K.SEC_MODIFICADO),
xmlElement("autModificado", K.AUT_MODIFICADO)
from SRI_COMPRAS K
WHERE K.ID IS NOT NULL
AND K.ID_INFORMANTE_XML = J.ID_INFORMANTE
AND K.ID BETWEEN 1 AND 25
).getClobVal()
into l_XML
from ANEXO_INFORMANTE J
where J.ID_INFORMANTE =:P3_MES
and J.RUC =:P3_ID_RUC
and J.ANIO =:P3_ANIO
and J.MES =:P3_MES;
--HTML
sys.owa_util.mime_header('text/xml',FALSE);
sys.htp.p('Content-Length: ' || length(l_XML));
sys.owa_util.http_header_close;
sys.htp.print(l_XML);
end;
Now my table has more than 900 rows and only when I specifically selected 25 rows of the table "ANEXO_COMPRAS" in the where ( AND K.ID BETWEEN 1 AND 25) the XML is generated.+
I think that the problem may be the data type declared "varchar2", but I was trying with the data type "CLOB" and the error is the same.+
declare
l_XML CLOB;
begin
--Oculta XML
sys.htp.init;
wwv_flow.g_page_text_generated := true;
wwv_flow.g_unrecoverable_error := true;
--select XML
select xmlElement
from SRI_COMPRAS K
WHERE K.ID IS NOT NULL
AND K.ID_INFORMANTE_XML = J.ID_INFORMANTE
).getClobVal()
into l_XML
from ANEXO_INFORMANTE J
where J.ID_INFORMANTE =:P3_MES
and J.RUC =:P3_ID_RUC
and J.ANIO =:P3_ANIO
and J.MES =:P3_MES;
--HTML
sys.owa_util.mime_header('text/xml',FALSE);
sys.htp.p('Content-Length: ' || length(l_XML));
sys.owa_util.http_header_close;
sys.htp.print(l_XML);
end;
The error generated is ORA-06502: PL/SQL: numeric or value error+_
Please I need your help. I don`t know how to resolve this problem, how to use the data type "CLOB" for the XML can be generate+JohannaCevallos07 wrote:
Now my table has more than 900 rows and only when I specifically selected 25 rows of the table "ANEXO_COMPRAS" in the where ( AND K.ID BETWEEN 1 AND 25) the XML is generated.+
I think that the problem may be the data type declared "varchar2", but I was trying with the data type "CLOB" and the error is the same.+
The error generated is ORA-06502: PL/SQL: numeric or value error+_
Please I need your help. I don`t know how to resolve this problem, how to use the data type "CLOB" for the XML can be generate+The likeliest explanation for this is that length of the XML exceeds 32K, which is the maximum size that <tt>htp.p</tt> can output. A CLOB can store much more than this, so it's necessary to buffer the output as shown in +{message:id=4497571}+
Help us to help you. When you have a problem include as much relevant information as possible upfront. This should include:
<li>Full APEX version
<li>Full DB/version/edition/host OS
<li>Web server architecture (EPG, OHS or APEX listener/host OS)
<li>Browser(s) and version(s) used
<li>Theme
<li>Template(s)
<li>Region/item type(s) (making particular distinction as to whether a "report" is a standard report, an interactive report, or in fact an "updateable report" (i.e. a tabular form)
And always post code wrapped in <tt>\...\</tt> tags, as described in the FAQ.
Thanks -
Error while posting xml file to URL using URLConnection
Hello everyone,
I am facing an issue from long time related to URLConnection. If this would be resolved by your help then I would be very grateful to you.
One application which posts xml file to URL hangs and after waiting for 5 mins it throws 504 error:
java.io.IOException: Server returned HTTP response code: 504 for URL: http:hostname.
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:715)
Same application is running fine without error on another environment from last 5 years. But on another env it is erroring out from the day 1.
We have many workarounds in place none worked.
I tried to use HttpClient from apache but that too hanged at URLConnection.getInputStream() method call.
App is running on iPlanet web server 6.1 using JDK 1.4.0_03
We still dont know why this program hangs at that particular line in only one env but many times it runs fine. That means 30% of the times it posts xml file without error but 70% times it errors out. So our program logic is to retry until post is successful.
Once this issue is resolved we will remove the logic of trying again and agian.
Please provide inputs.
Thanks,
NitinThe HTTP response 504 means that the server, acting as a gateway, has not received a response from an upstream server in the time it expected.
I think this is problem is due to the remote server that receives the XML and takes too long to return a response to the local application that posted the XML.
Try HttpClient and set the timeout variable of the HttpClient instance used.
Here http://svn.apache.org/viewvc/jakarta/commons/proper/httpclient/trunk/src/examples/PostXML.java?revision=480424&view=markup
a Post XML sample.
NB: HttpClient > setTimeout method is deprecated. See : http://jakarta.apache.org/commons/httpclient/apidocs/index.html for an alternative
Hope That Helps -
Hello Guys,
I am facing one problem to reading an xml file. the following is my xml file.
<flight id="0gy09tfj2ydb4001" direction="outbound">
<segment is_eticketable="0">
<airline>BA</airline>
<equipment></equipment>
<flight_number>188</flight_number>
<departure>EWR</departure>
<arrival>LHR</arrival>
<class>B</class>
<date>2006-07-27</date>
<departure_time>21:20:00</departure_time>
<arrival_time next_day="1">09:15:00</arrival_time>
<gds>gal-xmlVDR1</gds>
</segment>
<segment is_eticketable="0">
<airline>BA</airline>
<equipment></equipment>
<flight_number>139</flight_number>
<departure>LHR</departure>
<arrival>BOM</arrival>
<class>R</class>
<date>2006-07-28</date>
<departure_time>11:05:00</departure_time>
<arrival_time next_day="1">00:15:00</arrival_time>
<gds>gal-xmlVDR1</gds>
</segment>
</flight>
<flight id="0gy09tfj2ydb4002" direction="inbound">
<segment is_eticketable="0">
<airline>BA</airline>
<equipment></equipment>
<flight_number>138</flight_number>
<departure>BOM</departure>
<arrival>LHR</arrival>
<class>R</class>
<date>2006-08-20</date>
<departure_time>02:15:00</departure_time>
<arrival_time next_day="0">07:35:00</arrival_time>
<gds>gal-xmlVDR1</gds>
</segment>
<segment is_eticketable="0">
<airline>BA</airline>
<equipment></equipment>
<flight_number>117</flight_number>
<departure>LHR</departure>
<arrival>JFK</arrival>
<class>B</class>
<date>2006-08-20</date>
<departure_time>08:55:00</departure_time>
<arrival_time next_day="0">11:15:00</arrival_time>
<gds>gal-xmlVDR1</gds>
</segment>
</flight>
<flight id="0gy09tfj2ydb4003" direction="inbound">
<segment is_eticketable="0">
<airline>BA</airline>
<equipment></equipment>
<flight_number>198</flight_number>
<departure>BOM</departure>
<arrival>LHR</arrival>
<class>R</class>
<date>2006-08-20</date>
<departure_time>12:55:00</departure_time>
<arrival_time next_day="0">18:10:00</arrival_time>
<gds>gal-xmlVDR1</gds>
</segment>
<segment is_eticketable="0">
<airline>BA</airline>
<equipment></equipment>
<flight_number>183</flight_number>
<departure>LHR</departure>
<arrival>JFK</arrival>
<class>B</class>
<date>2006-08-20</date>
<departure_time>20:00:00</departure_time>
<arrival_time next_day="0">22:30:00</arrival_time>
<gds>gal-xmlVDR1</gds>
</segment>
</flight>
In this xml every flight tag there is two segment tag. i want to read segment tag for each flight tag individual.
send me a code for this xml read.
Waiting for your reply as soon as possible,
Regards,
Bhavesh KharwaYou don't have a problem, you just don't want to do the work yourself. Go figure out how to do this (a google search on "java xml parsing" would be a good place to start) and then when you really have a problem post the code and we'll help you to fix it.
-
Problem with XML configuration
Hello gurus!
I have a problem because I'm trying to get a value from the WF container to expose it through SWFVISU as a dynamic parameter. The way I tried to do this was to manipulate the UWL XML to create a custom attribute and declaring the value comes from the container, but since I modified this, anything in SWFVISU is not responding. Even if I delete the pcd of some task and then call this task, everything works normally and no changes are noticed. Somebody told me that I have to return to my original XML configuration and I deleted my new XML configuration, cleared cache and the problem persists. Any ideas on what am I missing about this?
Regards IAHi,
>but since I modified this, anything in SWFVISU is not responding.
What do you mean by this? Are you expecting that the changes you do in your XML would somehow appear in SWFVISU? (This will not happen.)
Please upload the custom XML again to the portal (with priority medium or high). Refresh the cache, and log out from the portal. Log in again, and create new test case (=start new workflow). These are all just steps to ensure that the changes you have done to the XML will apply.
What is the result? Is the custom attribute working? If it is not, I would check any examples that you can find in SAP Help or SDN about dynamic attributes, and compare them to your own XML. If you still cannot find the problem, post your XML task configuration here (and explain what you are trying to achieve), and probably someone will help you.
Regards,
Karri -
Urgent :post xml for xsql difference with html form post
Hi,
We are developing an application to process xml request
posted by external party. The requests arrive by
http-post operation
We developed and tested with an html-form.
Now we encounter problems in testing with http-post
The xsql page is processed correctly but
insert only fixed text when formatting xml-data as input for
the insert-request, string inserted is empty.
Everything is by the book and html-forms works great.
Is anybody else using xsql to insert xml data in the database on this version? Maybe can you help by looking into a testcase ? Issued a tar but am on terrible deadline
so need help very soon.
Details: HP-UX 11.11 Oracle 9.2.0.4 java1.4 ojdbc 1.4
Tnx in advance,
JeroenMark,
Have an external partner which sends xml-requests.
Have to read those, store them and process them.
Idea is let them
1)post the xml at a url where an xsql page is reading the xml
2) transforming this for an insert into
the database. The column is defined to store the complete xml-message.
3) A trigger takes care of processing the stuff and preparing the output
4) and a query in the xsql-page reads the output from an output table
When developing and testing this with an html-form that posts the xml is works great.
$ cat newclobins.xsql
<?xml version="1.0"?>
<page connection="demo" xmlns:xsql="urn:oracle-xsql" >
<xsql:set-session-param name="id">
select msgid.nextval from dual
</xsql:set-session-param>
<xsql:dml>
delete cbs_msg_in where id={@id}
</xsql:dml>
<xsql:insert-request table="cbs_msg_in" column="id,msg" transform="cbsform_1.xsl"/>
<data>
<xsql:query null-indicator="yes">
select msgid,msg from cbs_xml_out where msgid={@id}
</xsql:query>
</data>
</page>
$ cat cbsform_1.xsl
<?xml version="1.0"?>
<ROWSET xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xsl:version="1.0">
<xsl:for-each select="request">
<ROW>
<MSG><xsl:value-of select="parameters/doc" /></MSG>
<ID><xsl:value-of select="session/id" /></ID>
</ROW>
</xsl:for-each>
</ROWSET>
1) When using a tool like
http://www.programmersheaven.com/articles/adrian/getpost/article.html it fails with
No rows to modify -- the row enclosing tag missing. Specify the correct row enclosing tag.
2) When using the commandline utility like
xsql jeroen5.xsql posted-xml=test3.xml
this works great when inserting plain text but not
when inserting xml-format data into a column
So problem 1 is why external tools like above or my partner that uses .net to do something similar gives this strange error?
Problem nr 2 is should I stick to just the data in xml and forget about storing the xml-formatted data?
Hope you can help because I am getting quite desparate here.
Regards,
Jeroen -
Using UTL_TCP to post xml
All,
we were using UTL_HTTP for XML post and retrieve result. It kept running into transfer_timeout trouble (oracle 9.2.*)
So now we are trying to use UTL_TCP to post xml.
But I am not sure how the sequence will be.
I woulc apppreciate if you guys could point me to the right place. All the samples I saw so far are for email or ftp.
Thanks.
Steve
SteveUTL_HTTP uses UTL_TCP underneath so using UTL_TCP yourself possibly won't solve the problem. One common reason of transfer-timeout exception is that the length of the POST data is not specified or is incorrect in the content-length header, causing the HTTP server to keep waiting to read more from your side but you have posted the whole data.
Can you post your codes that use UTL_HTTP here (if possible) and let us take a look? -
I tried pass parameter to my stylesheet.
but I have gotted error message.(No posted XML document)
Where is problem my code?
please, let me know.
Here, my xsql file :
<?xml version="1.0"?>
<page connection="sfa" xmlns:xsql="urn:oracle-xsql">
<xsql:include-request-params xmlns:xsql="urn:oracle-xsql"/>
<xsql:update-request table="customer" transform="request-to-i_cust_info.xsl"
key-columns="cust_no"
columns="store_nm"/>
</page>
and my stylesheet :
<?xml version = '1.0'?>
<ROWSET xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xsl:version="1.0">
<xsl:for-each select="/request/parameters">
<ROW>
<CUST_NO><xsl:value-of select="cust_no"/></CUST_NO>
<STORE_NM><xsl:value-of select="cust_nm"/></STORE_NM>
</ROW>
</xsl:for-each>
</ROWSET>
I can see the response like bellow
<?xml version="1.0" ?>
- <page>
- <request>
- <parameters>
<cust_no>test</cust_no>
<cust_nm>store</cust_nm>
</parameters>
<session />
<cookies />
</request>
<xsql-status action="xsql:update-request" result="No posted document to process" />
</page>
nullIt seems that you <request> element will be under the <page> element.
Can you try "/page/request/parameters"?
Or can you check/show the XML result of the XSQL page without the XSLT transformation?
null -
Problem posting data with HttpsConnection
Hi,
I am currently having problems posting data using a HttpsConnection.
I am setting the setRequestMethod to HttpConnection.POST and then using the openDataOutputStream method.
I will post my code when I get home for reference.
Background to my problem - I am trying to use the declarative security features of J2EE to authenticate a mobile user.
I am firstly firing a HttpsConnection from the mobile device to a protected resource on the app server. I grab the JSessionId from the Set-Cookie http header of the response and post a second request to the j_security_check and provide the refer http header to the protected resource - this simulates exactly what happens on a browser (I used a Http monitor tool to confirm this). However, I need to pass the j_username and j_password as body of the https request. This doesn't seem to work because the server displays my access denied at this point - as if it hadn't received the crednetials
However, just to confirm my technique works I subsituted the post request for a get request to j_security_check and passed the j_username and j_password as request params in the URL. This worked fine and I got a 302 response 'temporily moved' which I then handle by simply making a further request for the original resource - this time it serves back the resource because I am authenticated.
Anyway that sets the scene - so the problem definitely appears to be posting data using an HttpsConnection.
Any help would be greatly appreciated
Rgds,
DavidHi,
Here is my code relating to the above problem:
httpsConn = (HttpsConnection)Connector.open("https://127.0.0.1:8443/ebank/j_security_check");
httpsConn.setRequestMethod(HttpConnection.POST);
httpsConn.setRequestProperty("referer", "https://127.0.0.1:8443/ebank/main/mainMenu.xml");
httpsConn.setRequestProperty("cookie", cookieValue);
httpsConn.setRequestProperty("location", url);
httpsConn.setRequestProperty("User-Agent",
"Profile/MIDP-1.0, Configuration/CLDC-1.0");
httpsConn.setRequestProperty("Content-Language",
"en-gb");
String credentials = "j_username=EB0001&j_password=240589";
httpsConn.setRequestProperty("Content-Length",""+credentials.length());
DataOutputStream os = httpsConn.openDataOutputStream();
os.writeUTF(credentials);
....Thanks,
David -
hi everybody,
I've a big problem with XML on Linux, in details I see my program stopping on Linux at the instruction
XMLReader xr = XMLReaderFactory.createXMLReader("org.apache.crimson.parser.XMLReaderImpl");
and it's strange because on Windows it runs and there aren't problems about permissions on files, does anyone knows what to do?
thanks in advance!
StefanoWhat happens on that line? I'm assuming you get some kind of error or exception.
Make sure the JAR file for Crimson is in your classpath. -
Hi
I am working on BLS and having problem in xml query.I want to perform some calculation over xml columns.Than total of this as a new column.I can do this part in logic editor itself but can i do these both task by XSLT.
Can be made our own XSLT for this ?
I am feeling kind of fear to xslt. Can anybody help me in this.
Thanks a lot in advance
thomasRam,
In xMII there is a list of predefined xslt transforms that do something similar to what you are explaining. The 3 that I think may be what you are looking for are
they are under Calculation Transformations and Subtotal Transformation take a look at these and tell me if they are doing what you want to accomplish. In the xMII help file do a search on Inline Transforms or navigate to Advanced Topics -> Inline Transforms -> Predefined Inline Transforms. In this section there are examples of how to use these transforms and apply them in the query templates. If this is not what you are looking for can you explain in a little more detail along with a simple example of how you want this transform to work. Also why do you want to use xslt if you can already accomplish this in BLS?
Regards,
Erik -
Facing problem in xml schema xsd file registration
Hi,
i am facing problem in xml schema xsd file registration when
the number of column is more. It is showing persing error.
if i am deleting few column from xsd file . It is working otherwise
showing error. Is there any solution for that please suggest me.
The Error is
ORA-31011:XML parsing failed
ORA_19202: Error occurred in XML processing
LPX-00230 : (message vary time to time-like invalid tag ending etc.)
Regards
Manoranjan
and thanks in advanceWhere is you XML coming from. Are you sure it's valid. If you are hard coding it as a SQL String constant are you hitting the 4k / 32K limit on the size of SQL / PL/SQL constant. Have you tried loading the content from a bfile..
-
HI,
I have a requirement to post XMLs over HTTPS. I also am supposed to retrieve the response XML, interpret it and do some processing based on the response status in the response XML. This has to be done for each XML.
Currently I am establishing a new HTTPsURLConnection for each XML, wrting the XML to output stream, retrieving the response from input stream and then releasing the connection using disconnect() method.
Is this the recommended approach or should I be creating just one connection for posting all the XMLs? Also, does java use some kind of connection pooling while creating HTTPURLConnection?
I am frequently getting "SocketTimeoutException Exception --> connect timed out" while processing large number of XMLs. Is this exception due to large number of connections that I am creating?
This program is running as a stand alone program on unix box.
Regards,
JacobIs this the recommended approachYes.
or should I be creating just one connection for posting all the XMLs?No.
Also, does java use some kind of connection pooling while creating HTTPURLConnection? Yes.
I am frequently getting "SocketTimeoutException Exception --> connect timed out" while processing large number of XMLs. Is this exception due to large number of connections that I am creating?Could be, especially if you're doing them in parallel. -
Problem for xml generation using DBMS_XMLGEN
Hi All,
i have problem during xml generation using Any help would be highly appreciate
how could we publish xml data using data base API DBMS_XMLGEN in oracle applications (APPS) i.e. at 'View Output" using
Any help would be highly appreciate.
Let me know if need more explanation, this is High priority for me.
Thanks and Regards,
[email protected]
Message was edited by:
user553699You can set the null attribute to true , so that the tag appears in your XML
see the statement in Bold.
DECLARE
queryCtx dbms_xmlquery.ctxType;
result CLOB;
BEGIN
-- set up the query context
queryCtx := dbms_xmlquery.newContext(
'SELECT empno "EMP_NO"
, ename "NAME"
, deptno "DEPT_NO"
, comm "COMM"
FROM scott.emp
WHERE deptno = :DEPTNO'
dbms_xmlquery.setRowTag(
queryCtx
, 'EMP'
dbms_xmlquery.setRowSetTag(
queryCtx
, 'EMPSET'
DBMS_XMLQUERY.useNullAttributeIndicator(queryCtx,true);
dbms_xmlquery.setBindValue(
queryCtx
, 'DEPTNO'
, 30
result := dbms_xmlquery.getXml(queryCtx);
insert into clobtable values(result);commit;
dbms_xmlquery.closeContext(queryCtx);
END;
select * from clobtable
<?xml version = '1.0'?>
<EMPSET>
<EMP num="1">
<EMP_NO>7499</EMP_NO>
<NAME>ALLEN</NAME>
<DEPT_NO>30</DEPT_NO>
<COMM>300</COMM>
</EMP>
<EMP num="2">
<EMP_NO>7521</EMP_NO>
<NAME>WARD</NAME>
<DEPT_NO>30</DEPT_NO>
<COMM>500</COMM>
</EMP>
<EMP num="3">
<EMP_NO>7654</EMP_NO>
<NAME>MARTIN</NAME>
<DEPT_NO>30</DEPT_NO>
<COMM>1400</COMM>
</EMP>
<EMP num="4">
<EMP_NO>7698</EMP_NO>
<NAME>BLAKE</NAME>
<DEPT_NO>30</DEPT_NO>
<COMM NULL="YES"/>
</EMP>
<EMP num="5">
<EMP_NO>7844</EMP_NO>
<NAME>TURNER</NAME>
<DEPT_NO>30</DEPT_NO>
<COMM>0</COMM>
</EMP>
<EMP num="6">
<EMP_NO>7900</EMP_NO>
<NAME>JAMES</NAME>
<DEPT_NO>30</DEPT_NO>
<COMM NULL="YES"/>
</EMP>
</EMPSET>
http://sqltech.cl/doc/oracle9i/appdev.901/a89852/d_xmlque.htm
Maybe you are looking for
-
I need to use a Windows program
First time Macbook owner and I have been using Microsft Windows Picture viewer to crop and adjust my photos for the last 8+ years. Its gonna take sometime to get use to iPhoto as it is more complex than what I am use to working with. Is there anywa
-
System Error due to JCO communication failure? during mapping
in my JDBC-XI-Proxy scenario, there is BPM with a transformation step, in that step, during execution it gives Jco failure error, and particularly when the payload is very large.... my question is: 1. how JCo communication failure occurs in case of
-
Music stops in shuffle mode on IPhone 4
Iphone 4 with latest IOS. For some reason when i play music in shuffle mode, it will play 1 to 5 tracks fine and then play the 2 seconds of the next track and just stop. Have tried hard reset, have deleted music and then reset and then reloaded music
-
Sequence of files opened by PS
When opening a stack of images from Bridge into Photoshop, PS arranges the files in descending order, highest number in front of cascade, lowest number in rear. I'd like them to open in ascending order ... in order to edit the pix in chronological o
-
I'm getting incredibly frustrated at Apple because of this, it's causing problems as the Wi-Fi connection will occasionally reconnect and then skip out for whole days when I need it the most. I've researched fixes across the Discussions board and hav