Encoding in xmlserialize
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
I've an issue with xmlserialize function - I'd like to use it to beautify xml. Unfortunately once I set indent it changes encoding in header
to : encoding="ISO-8859-1"
MY DB NLS_CHARACTERSET is WE8ISO8859P1
with src as
select
xmltype(
'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Emp fullname="Den Raphaely">
<column name = "HIRE_DATE">1994-12-07</column>
<column name = "department">30</column>
</Emp>') val from dual
select
xmlserialize( content val) as res1,
xmlserialize( content val indent size=5) as res2
from src
in res1 there no encoding change, once I provide indent size encoding is changed - as in res2. Is there any way to avoid it?
Interesting.
I would say the expected result is the one in RES2, i.e. the encoding declaration is changed to reflect the actual encoding of the resulting CLOB.
Similar Messages
-
IsSchemaValid does chang the xml-encoding header from UTF-8 to WINDOWS-1252
I found the following effect:
isSchemaValid does changing the encoding - entry of the xml-file-header
generating xml-file by using DBMS_XMLGEN :
xmldoc := DBMS_XMLGEN.getXML(ctx);
with the header of the file is
<?xml version="1.0" encoding="UTF-8"?>
change the xmldoc to a xmlType
and validate it against the schema
xmldoc_xmlType:=(xmltype(xmldoc)) ;
xmldoc_xmlType.isSchemaValid ( bSchemalocation)
after this the header of the file is
<?xml version="1.0" encoding="WINDOWS-1252"?>
my DB:
R11_2_0_2 / Windows 64
the same in
R11_2_0_1 / Windows 32
select name, value from v$parameter where upper(name) like '%NLS%'
nls_calendar
nls_comp BINARY
nls_currency
nls_date_format
nls_date_language
nls_dual_currency
nls_iso_currency
nls_language AMERICAN
nls_length_semantics BYTE
nls_nchar_conv_excp FALSE
nls_numeric_characters
nls_sort
nls_territory AMERICA
nls_time_format
nls_timestamp_format
nls_timestamp_tz_format
nls_time_tz_format
register my schema by:
dbms_xmlschema.registerSchema(
schemaurl => vschemaurl,
schemadoc => xsd_file,
local => FALSE,
gentypes => TRUE,
genbean => FALSE,
gentables => TRUE,
force => FALSE,
owner => dbuser
,CSID => nls_charset_id('AL32UTF8')
How can I let or change back the xml-encoding entry to UTF-8 ?
regardsYour solution should not be relied upon...
C:\Temp>sqlplus /nolog @t1 %CD%
SQL*Plus: Release 11.2.0.2.0 Production on Fri Mar 4 09:41:32 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
SQL> spool testcase.log
SQL> --
SQL> connect sys/oracle as sysdba
Connected.
SQL> --
SQL> set define on
SQL> set timing on
SQL> --
SQL> def XMLDIR = &1
SQL> --
SQL> def USERNAME = XDBTEST
SQL> --
SQL> def PASSWORD = &USERNAME
SQL> --
SQL> def USER_TABLESPACE = USERS
SQL> --
SQL> def TEMP_TABLESPACE = TEMP
SQL> --
SQL> drop user &USERNAME cascade
2 /
old 1: drop user &USERNAME cascade
new 1: drop user XDBTEST cascade
User dropped.
Elapsed: 00:00:00.24
SQL> grant create any directory, drop any directory, connect, resource, alter session, create view to &USERNAME identified by &PASSWORD
2 /
old 1: grant create any directory, drop any directory, connect, resource, alter session, create view to &USERNAME identified by &PASSWORD
new 1: grant create any directory, drop any directory, connect, resource, alter session, create view to XDBTEST identified by XDBTEST
Grant succeeded.
Elapsed: 00:00:00.07
SQL> alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
2 /
old 1: alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
new 1: alter user XDBTEST default tablespace USERS temporary tablespace TEMP
User altered.
Elapsed: 00:00:00.00
SQL> set long 100000 pages 0 lines 256 trimspool on timing on
SQL> --
SQL> connect &USERNAME/&PASSWORD
Connected.
SQL> --
SQL> create or replace directory XMLDIR as '&XMLDIR'
2 /
old 1: create or replace directory XMLDIR as '&XMLDIR'
new 1: create or replace directory XMLDIR as 'C:\Temp'
Directory created.
Elapsed: 00:00:00.00
SQL> create table XML_DEFAULT of XMLTYPE
2 /
Table created.
Elapsed: 00:00:00.11
SQL> create table XML_CLOB of XMLTYPE
2 XMLTYPE store as CLOB
3 /
Table created.
Elapsed: 00:00:00.01
SQL> select *
2 from nls_database_parameters
3 where parameter in ('NLS_LANGUAGE', 'NLS_TERRITORY', 'NLS_CHARACTERSET')
4 /
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CHARACTERSET AL32UTF8
Elapsed: 00:00:00.02
SQL> declare
2 XML_DEFAULT XMLType := xmltype('<?xml version="1.0" encoding="WINDOWS-1252"?><TEST>SELECT</TEST>') ;
3 XML_CLOB XMLType := xmltype('<?xml version="1.0" encoding="WINDOWS-1252"?><TEST>SELECT</TEST>') ;
4 begin
5 delete XML_DEFAULT;
6 delete XML_CLOB;
7 insert into XML_DEFAULT values (XML_DEFAULT);
8 dbms_xslprocessor.clob2file( XML_DEFAULT.getclobval() , 'XMLDIR','XML_DEFAULT.xml');
9 IF XML_DEFAULT.isSchemaValid ( 'SCHEMALOCATION_DOES_NO_MATTER_FOR_TEST_CASE.XSD', 'SCHEMA_NO_MATTER') = 1 THEN null; ELSE null; END IF;
10 commit;
11 dbms_xslprocessor.clob2file( XML_DEFAULT.getclobval() , 'XMLDIR','XML_DEFAULT_IS_VALID.xml',nls_charset_id('WE8MSWIN1252'));
12 dbms_xslprocessor.clob2file( XML_DEFAULT.getclobval() , 'XMLDIR','XML_DEFAULT_WIN1252.xml');
13 insert into XML_CLOB values (XML_CLOB);
14 dbms_xslprocessor.clob2file( XML_CLOB.getclobval() , 'XMLDIR','XML_CLOB.xml');
15 commit;
16 end ;
17 /
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.27
SQL> --
SQL> host type XML_DEFAULT.xml
<?xml version="1.0" encoding="WINDOWS-1252"?><TEST>SELECT</TEST>
SQL> --
SQL> host type XML_DEFAULT_IS_VALID.xml
<?xml version="1.0" encoding="UTF-8"?>
<TEST>SELECT</TEST>
SQL> --
SQL> host type XML_DEFAULT_WIN1252.xml
<?xml version="1.0" encoding="UTF-8"?>
<TEST>SELECT</TEST>
SQL> --
SQL> host type XML_CLOB.xml
<?xml version="1.0" encoding="WINDOWS-1252"?><TEST>SELECT</TEST>
SQL> --
SQL>First, the character set changes because isSchemaValid() causes the document to be parsed and converted to the internal database character set, as does storing it in a table.
It appear that your solution works in SQL because the semantics of SQL are such that it causes a 'copy' of the XMLType to take place before running the isSchemaValid() processing, were we to optimize away that copy as a result of a patch or performance optimization project then you solution would break...
If you want the output in a particular character set you should force that using XMLSerialize or getBlobVal(charsetid). Unfortunately we don't have a convience method for writing BLOBS on DBMS_XSLPROCESSOR... -
Have XML with another embedded XML encoded in base64 - how to extract?
Hi guys,
I have a XML-RPC web service that returns a response like this:
<methodResponse>
<params>
<param>
<value>
<base64>
PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHNlYXJjaFJlc3VsdD48bnVtcm93cz4xPC9udW1yb3dzPjxmb3VuZD4xPC9mb3VuZD48d29yZGluZm8+IGJvdMOjbyA6IDU8L3dvcmRpbmZvPjxzZWFyY2h0aW1lPjAuMDA2PC9zZWFyY2h0aW1lPjxmaXJzdGRvYz4xPC9maXJzdGRvYz48bGFzdGRvYz4xPC9sYXN0ZG9jPjx3b3JkaW5mb2FsbD5ib3TDo28gOiA1IC8gNTwvd29yZGluZm9hbGw+PGl0ZW0+PHVybGlkPjE5PC91cmxpZD48dXJsPmh0dHA6Ly9jZW50cmFsL2dhcnJhcy9RdWVtX21hdG91X0pGSy9hcnRlZmF0b3MvaHRtLzc1MDUuaHRtPC91cmw+PGNvbnRlbnQ+dGV4dC9odG1sPC9jb250ZW50Pjx0aXRsZT5Tb3VuZE1BWDwvdGl0bGU+PGtleXdvcmRzPjwva2V5d29yZHM+PGRlc2M+PC9kZXNjPjx0ZXh0Pi4uLiBlIGNvbXVuaWNhw6fDo28gdmlhIEludGVybmV0LiBDbGlxdWUgbm8gJmx0O2ZvbnQgY29sb3I9JnF1b3Q7MDAwMDg4JnF1b3Q7Jmd0OyZsdDtiJmd0O2JvdMOjbyZsdDsvYiZndDsmbHQ7L2ZvbnQmZ3Q7IGNvbSBvIGxvZ290aXBvIEFuZHJlYSBlbSAuLi4gYWRxdWlyaXIgdW1hIGF0dWFsaXphw6fDo28sIGNsaWNhbmRvIG5vICZsdDtmb250IGNvbG9yPSZxdW90OzAwMDA4OCZxdW90OyZndDsmbHQ7YiZndDtib3TDo28mbHQ7L2ImZ3Q7Jmx0Oy9mb250Jmd0OyBjb20gbyDDrWNvbmUgRm9uZSBkZSBvdXZpZG8uIERlcG9pcyBkZSAuLi4gJyBWaXJ0dWFsIEVhcicnICwgYmFzdGFuZG8gY2xpY2FyIG5vICZsdDtmb250IGNvbG9yPSZxdW90OzAwMDA4OCZxdW90OyZndDsmbHQ7YiZndDtib3TDo28mbHQ7L2ImZ3Q7Jmx0Oy9mb250Jmd0OyBjb20gw61jb25lIE91dmlkby4gQXDDs3MgYWRxdWlyaXIgZSA8L3RleHQ+PHNpemU+MTg1MDM8L3NpemU+PHJhdGluZz41LjUwNSU8L3JhdGluZz48bW9kaWZpZWQ+MTAvMDgvMjAwMiAxNjo1ODoxMCAtMDQwMDwvbW9kaWZpZWQ+PG9yZGVyPjE8L29yZGVyPjxjcmM+LTE5NjM3MDA5MzQ8L2NyYz48Y2F0ZWdvcnk+PC9jYXRlZ29yeT48bGFuZz5lbi11czwvbGFuZz48Y2hhcnNldD53aW5kb3dzLTEyNTI8L2NoYXJzZXQ+PHNpdGVpZD40NjE1ODk0NjE8L3NpdGVpZD48cG9wX3Jhbms+MC4wMDAwMDwvcG9wX3Jhbms+PG9yaWdpbmlkPjA8L29yaWdpbmlkPjwvaXRlbT48L3NlYXJjaFJlc3VsdD4K
</base64>
</value>
</param>
</params>
</methodResponse>The base64 value is another XML embedded document that I have to extract.
I have the following code (don't know if it's the best approach), where l_val is a CLOB and l_xml is XMLTYPE:
l_val := DBMS_XMLGEN.convert( l_xml.extract('/methodResponse/params/param/value/base64/text()').getclobval(), 1 );How can I decode the base64-encoded contents of the l_val CLOB and store the result into another CLOB that I can then process with xmlsequence() and extract()?
Thanks in advance. Regards,
GeorgerHi mdrake,
I saw your answer on the other thread :)
I know about the 32K limitation; that's why I need to store the decoded CLOB in another CLOB, as bigger documents will often be the case. I've been reading about this for a while, to no avail.
Do you believe BASE64_DECODE_CLOB could be changed to return CLOB rather than VARCHAR2? Regards,
Georger
mdrake wrote:
You'll need to do some work in this if the Encoded XML is bigger than 32K
SQL> set long 10000 pages 0
SQL> CREATE OR REPLACE FUNCTION BASE64_DECODE_CLOB (INPUT CLOB)
2 return VARCHAR2
3 as
4 V_RAW_BUFFER RAW(32767);
5 V_VARCHAR2_BUFFER VARCHAR2(32767);
6 begin
7 V_VARCHAR2_BUFFER := DBMS_LOB.SUBSTR(INPUT,32767,1);
8 V_RAW_BUFFER := UTL_RAW.CAST_TO_RAW(V_VARCHAR2_BUFFER);
9 V_RAW_BUFFER := UTL_ENCODE.BASE64_DECODE(V_RAW_BUFFER);
10 V_VARCHAR2_BUFFER := UTL_RAW.CAST_TO_VARCHAR2(V_RAW_BUFFER);
11 return V_VARCHAR2_BUFFER;
12 end;
13 /
Function created.
SQL> set serveroutput on
SQL> --
SQL> with XML as
2 (
3 select XMLType(
4 '<methodResponse>
5 <params>
6 <param>
7 <value>
8 <base64>
9 PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHNlYXJjaFJlc3VsdD48bnVtcm93cz4xPC9udW1yb3dzPjxmb3VuZD4xPC9mb3VuZD48d29yZGl
uZm8+IGJvdMOjbyA6IDU8L3dvcmRpbmZvPjxzZWFyY2h0aW1lPjAuMDA2PC9zZWFyY2h0aW1lPjxmaXJzdGRvYz4xPC9maXJzdGRvYz48bGFzdGRvYz4xPC9sYXN0ZG9jPjx
3b3JkaW5mb2FsbD5ib3TDo28gOiA1IC8gNTwvd29yZGluZm9hbGw+PGl0ZW0+PHVybGlkPjE5PC91cmxpZD48dXJsPmh0dHA6Ly9jZW50cmFsL2dhcnJhcy9RdWVtX21hdG9
1X0pGSy9hcnRlZmF0b3MvaHRtLzc1MDUuaHRtPC91cmw+PGNvbnRlbnQ+dGV4dC9odG1sPC9jb250ZW50Pjx0aXRsZT5Tb3VuZE1BWDwvdGl0bGU+PGtleXdvcmRzPjwva2V
5d29yZHM+PGRlc2M+PC9kZXNjPjx0ZXh0Pi4uLiBlIGNvbXVuaWNhw6fDo28gdmlhIEludGVybmV0LiBDbGlxdWUgbm8gJmx0O2ZvbnQgY29sb3I9JnF1b3Q7MDAwMDg4JnF
1b3Q7Jmd0OyZsdDtiJmd0O2JvdMOjbyZsdDsvYiZndDsmbHQ7L2ZvbnQmZ3Q7IGNvbSBvIGxvZ290aXBvIEFuZHJlYSBlbSAuLi4gYWRxdWlyaXIgdW1hIGF0dWFsaXphw6f
Do28sIGNsaWNhbmRvIG5vICZsdDtmb250IGNvbG9yPSZxdW90OzAwMDA4OCZxdW90OyZndDsmbHQ7YiZndDtib3TDo28mbHQ7L2ImZ3Q7Jmx0Oy9mb250Jmd0OyBjb20gbyD
DrWNvbmUgRm9uZSBkZSBvdXZpZG8uIERlcG9pcyBkZSAuLi4gJyBWaXJ0dWFsIEVhcicnICwgYmFzdGFuZG8gY2xpY2FyIG5vICZsdDtmb250IGNvbG9yPSZxdW90OzAwMDA
4OCZxdW90OyZndDsmbHQ7YiZndDtib3TDo28mbHQ7L2ImZ3Q7Jmx0Oy9mb250Jmd0OyBjb20gw61jb25lIE91dmlkby4gQXDDs3MgYWRxdWlyaXIgZSA8L3RleHQ+PHNpemU
+MTg1MDM8L3NpemU+PHJhdGluZz41LjUwNSU8L3JhdGluZz48bW9kaWZpZWQ+MTAvMDgvMjAwMiAxNjo1ODoxMCAtMDQwMDwvbW9kaWZpZWQ+PG9yZGVyPjE8L29yZGVyPjx
jcmM+LTE5NjM3MDA5MzQ8L2NyYz48Y2F0ZWdvcnk+PC9jYXRlZ29yeT48bGFuZz5lbi11czwvbGFuZz48Y2hhcnNldD53aW5kb3dzLTEyNTI8L2NoYXJzZXQ+PHNpdGVpZD4
0NjE1ODk0NjE8L3NpdGVpZD48cG9wX3Jhbms+MC4wMDAwMDwvcG9wX3Jhbms+PG9yaWdpbmlkPjA8L29yaWdpbmlkPjwvaXRlbT48L3NlYXJjaFJlc3VsdD4K
10 </base64>
11 </value>
12 </param>
13 </params>
14 </methodResponse>') OBJECT_VALUE
15 from dual
16 )
17 select XMLSERIALIZE(DOCUMENT XMLTYPE(BASE64_DECODE_CLOB(extract(OBJECT_VALUE,'/methodResponse/params/param/value/base64/text()'
).getClobVal())) as CLOB INDENT SIZE=2)
18 from XML
19 /
<?xml version="1.0" encoding="UTF-8"?>
<searchResult>
<numrows>1</numrows>
<found>1</found>
<wordinfo> botπo : 5</wordinfo>
<searchtime>0.006</searchtime>
<firstdoc>1</firstdoc>
<lastdoc>1</lastdoc>
<wordinfoall>botπo : 5 / 5</wordinfoall>
<item>
<urlid>19</urlid>
<url>http://central/garras/Quem_matou_JFK/artefatos/htm/7505.htm</url>
<content>text/html</content>
<title>SoundMAX</title>
<keywords/>
<desc/>
<text>... e comunicaτπo via Internet. Clique no <font color="000088&
quot;><b>botπo</b></font> com o logotipo Andrea em ... adqu
irir uma atualizaτπo, clicando no <font color="000088"><b>
botπo</b></font> com o φcone Fone de ouvido. Depois de ... ' Vi
rtual Ear'' , bastando clicar no <font color="000088">
<b>botπo</b></font> com φcone Ouvido. Ap≤s adquirir e </text>
<size>18503</size>
<rating>5.505%</rating>
<modified>10/08/2002 16:58:10 -0400</modified>
<order>1</order>
<crc>-1963700934</crc>
<category/>
<lang>en-us</lang>
<charset>windows-1252</charset>
<siteid>461589461</siteid>
<pop_rank>0.00000</pop_rank>
<originid>0</originid>
</item>
</searchResult>
SQL>And don't expect it to be the fastest soln in history. -
Hi all,
I'm using JAXB marshaller to get some XML strings....
All works great, however, the marshaller adds in front of the XML string I'm interested in an XML encoding string.
It looks like that "<?xml version="1.0" encoding="UTF-8" standalone="yes"?>"
Is there a way to tell it NOT to add this string?
ThanksHi,
Use a parser to serialize the Document object to disk, here is a sample using Apache xerces
OutputStreamWriter out = new OutputStreamWriter(new FileOutputStream("C:/temp/Output.xml"), "UTF-8");
OutputFormat formatter = new OutputFormat();
formatter.setPreserveSpace(true);
formatter.setOmitXMLDeclaration(true);
XMLSerializer serializer = new XMLSerializer(out,formatter);
serializer.serialize(doc);
out.close();
Hope this helps -
Convert Encoding of system properties
Hello,
I wrote a little piece of code wich reads directory names and file names and write them to an DOM tree. If I use "ISO-8859-1" for the output format, it works fine, but when I switch to "UTF-8", the resulting xml-file contains illegal characters. I suppose, that File.getName() returns the file name in the current encoding of systems locale, and Node.appendChild does not any conversion between "ISO-8859-1" (perhaps the encoding of my Windows XP) and "UTF-8" (Java standard).
Somethere in my code is a line like this:
ElementFolderName.appendChild(RelatedDocument.createTextNode(file.getName()));For serializing I use org.apache.xml.serialize.XMLSerializer:
XMLSerializer serializer = new XMLSerializer();
OutputFormat of = new OutputFormat(d);
of.setEncoding("ISO-8859-1");
serializer.setOutputFormat(of);
serializer.setOutputCharStream(new java.io.FileWriter(OutputFile));
serializer.asDOMSerializer();
serializer.serialize(d);I have two questions:
1) Is there any function to get the encoding of system strings?
2) Is there any function to convert the encoding on the fly, like String getUTF-8(String s, String Encoding)?
Thanks,
Stefan"Invalid characters" means that the encoding of the characters probably don't fit the utf-8 spec. The serialization is successful finished, and I check the resulting xml-files with OxygenXML, which reports an "UTF-8 - java.nio.charset.MalformedInputException". So I'm pretty sure the xml-files are incorrect (and it is not a problem of the text editor). The issue regards file-names containing some german characters like "öäü". I don't think that this is a problem of serialization, because I run document building and serialization in the easiest possible way.
-
Plz help Error in encoding Soap Message
hii,
im new to web services ,im doing a test application using netbeans 5.5 which retrieves some information from database.Its working fine if i return eother a string or a list of strings from webservice method.
But if im using a user defined datatype as return value its giving follwing error
SEVERE: Error in encoding SOAP Message
Error in encoding SOAP Message
at com.sun.xml.ws.encoding.soap.server.SOAPXMLEncoder.toSOAPMessage(SOAPXMLEncoder.java:113)
at com.sun.xml.ws.handler.SOAPMessageContextImpl.getMessage(SOAPMessageContextImpl.java:97)
at org.handler.PropertyMessageHandler.handleMessage(PropertyMessageHandler.java:27)
at org.handler.PropertyMessageHandler.handleMessage(PropertyMessageHandler.java:24)
at com.sun.xml.ws.handler.HandlerChainCaller.callProtocolHandlers(HandlerChainCaller.java:675)
at com.sun.xml.ws.handler.HandlerChainCaller.internalCallHandlers(HandlerChainCaller.java:444)
at com.sun.xml.ws.handler.HandlerChainCaller.callHandlers(HandlerChainCaller.java:374)
at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.callHandlersOnResponse(SOAPMessageDispatcher.java:448)
at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.getResponse(SOAPMessageDispatcher.java:307)
at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher$SoapInvoker.invoke(SOAPMessageDispatcher.java:601)
at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.receive(SOAPMessageDispatcher.java:141)
at com.sun.xml.ws.server.Tie.handle(Tie.java:88)
at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.handle(WSServletDelegate.java:333)
at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServletDelegate.java:288)
at com.sun.xml.ws.transport.http.servlet.WSServlet.doPost(WSServlet.java:77)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Caused by: javax.xml.bind.MarshalException
- with linked exception:
[javax.xml.bind.JAXBException: org.bean.PropertyBean nor any of its super class is known to this context]
at com.sun.xml.ws.encoding.jaxb.JAXBBridgeInfo.serialize(JAXBBridgeInfo.java:88)
at com.sun.xml.ws.encoding.soap.SOAPEncoder.writeJAXBBridgeInfo(SOAPEncoder.java:252)
at com.sun.xml.ws.encoding.soap.SOAPEncoder.writeBody(SOAPEncoder.java:569)
at com.sun.xml.ws.encoding.soap.server.SOAPXMLEncoder.toSOAPMessage(SOAPXMLEncoder.java:95)
... 33 more
Caused by: javax.xml.bind.MarshalException
- with linked exception:
[javax.xml.bind.JAXBException: org.bean.PropertyBean nor any of its super class is known to this context]
at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:246)
at com.sun.xml.bind.v2.runtime.BridgeImpl.marshal(BridgeImpl.java:64)
at com.sun.xml.bind.api.Bridge.marshal(Bridge.java:86)
at com.sun.xml.ws.encoding.jaxb.JAXBBridgeInfo.serialize(JAXBBridgeInfo.java:86)
... 36 more
Caused by: javax.xml.bind.JAXBException: org.bean.PropertyBean nor any of its super class is known to this context
at com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java:219)
at com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java:234)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:562)
at com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.serializeItem(ArrayElementNodeProperty.java:29)
at com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.serializeListBody(ArrayElementProperty.java:132)
at com.sun.xml.bind.v2.runtime.property.ArrayERProperty.serializeBody(ArrayERProperty.java:101)
at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:293)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:594)
at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:241)
... 39 more
Caused by: javax.xml.bind.JAXBException: org.bean.PropertyBean nor any of its super class is known to this context
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextImpl.java:474)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:557)
... 45 more
Can any body help me im struck here for the last 2 days
thnx
RAJESHAre u sure that u correctly configure Apex (marvel.conf)?
Have u include this file in httpd.conf? -
Error in encoding SOAP Message
hii,
im new to web services ,im doing a test application using netbeans 5.5 which retrieves some information from database.Its working fine if i return eother a string or a list of strings from webservice method.
But if im using a user defined datatype as return value its giving follwing error
SEVERE: Error in encoding SOAP Message
Error in encoding SOAP Message
at com.sun.xml.ws.encoding.soap.server.SOAPXMLEncoder.toSOAPMessage(SOAPXMLEncoder.java:113)
at com.sun.xml.ws.handler.SOAPMessageContextImpl.getMessage(SOAPMessageContextImpl.java:97)
at org.handler.PropertyMessageHandler.handleMessage(PropertyMessageHandler.java:27)
at org.handler.PropertyMessageHandler.handleMessage(PropertyMessageHandler.java:24)
at com.sun.xml.ws.handler.HandlerChainCaller.callProtocolHandlers(HandlerChainCaller.java:675)
at com.sun.xml.ws.handler.HandlerChainCaller.internalCallHandlers(HandlerChainCaller.java:444)
at com.sun.xml.ws.handler.HandlerChainCaller.callHandlers(HandlerChainCaller.java:374)
at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.callHandlersOnResponse(SOAPMessageDispatcher.java:448)
at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.getResponse(SOAPMessageDispatcher.java:307)
at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher$SoapInvoker.invoke(SOAPMessageDispatcher.java:601)
at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.receive(SOAPMessageDispatcher.java:141)
at com.sun.xml.ws.server.Tie.handle(Tie.java:88)
at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.handle(WSServletDelegate.java:333)
at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServletDelegate.java:288)
at com.sun.xml.ws.transport.http.servlet.WSServlet.doPost(WSServlet.java:77)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Caused by: javax.xml.bind.MarshalException
- with linked exception:
[javax.xml.bind.JAXBException: org.bean.PropertyBean nor any of its super class is known to this context]
at com.sun.xml.ws.encoding.jaxb.JAXBBridgeInfo.serialize(JAXBBridgeInfo.java:88)
at com.sun.xml.ws.encoding.soap.SOAPEncoder.writeJAXBBridgeInfo(SOAPEncoder.java:252)
at com.sun.xml.ws.encoding.soap.SOAPEncoder.writeBody(SOAPEncoder.java:569)
at com.sun.xml.ws.encoding.soap.server.SOAPXMLEncoder.toSOAPMessage(SOAPXMLEncoder.java:95)
... 33 more
Caused by: javax.xml.bind.MarshalException
- with linked exception:
[javax.xml.bind.JAXBException: org.bean.PropertyBean nor any of its super class is known to this context]
at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:246)
at com.sun.xml.bind.v2.runtime.BridgeImpl.marshal(BridgeImpl.java:64)
at com.sun.xml.bind.api.Bridge.marshal(Bridge.java:86)
at com.sun.xml.ws.encoding.jaxb.JAXBBridgeInfo.serialize(JAXBBridgeInfo.java:86)
... 36 more
Caused by: javax.xml.bind.JAXBException: org.bean.PropertyBean nor any of its super class is known to this context
at com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java:219)
at com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java:234)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:562)
at com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.serializeItem(ArrayElementNodeProperty.java:29)
at com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.serializeListBody(ArrayElementProperty.java:132)
at com.sun.xml.bind.v2.runtime.property.ArrayERProperty.serializeBody(ArrayERProperty.java:101)
at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:293)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:594)
at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:241)
... 39 more
Caused by: javax.xml.bind.JAXBException: org.bean.PropertyBean nor any of its super class is known to this context
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextImpl.java:474)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:557)
... 45 more
Can any body help me im struck here for the last 2 days
thnx
RAJESHHello again,
because it seems to be a JavaScript issue, I opend this discussion in that forum: http://forums.adobe.com/message/6205851#6205851 -
Unable to set 'encoding' in XML prolog
Hi, we're trying to set 'encoding' in an XML prolog with the following code in an 11.2 environment: -
SQL> set serverout on size 1000000
SQL> declare
2 l_domnode dbms_xmldom.domnode;
3 l_domdoc dbms_xmldom.domdocument;
4 begin
5 l_domdoc := dbms_xmldom.newdomdocument;
6 l_domnode := dbms_xmldom.makenode( l_domdoc );
7 dbms_xmldom.setversion( l_domdoc, '1.0' );
8 dbms_xmldom.setcharset( l_domdoc, 'UTF-8' );
9 dbms_output.put_line ( dbms_xmldom.getxmltype ( l_domdoc ).getstringval(
10 end;
11 /
<?xml version="1.0"?>
PL/SQL procedure successfully completed.
what happened to the 'encoding' ?
thx,Encoding iis a function of serialization....
So
#1. Don't use legacy methods (.getStringVal(), getClobVal()) to serialize in 11.x enviroment. Use XMLSerialize() instead.
#2 XML Will be serialized in the client character set when displayed via SQL*PLUS. Oralce always encodes data into the character set requested by the client when dealing with Character date, so the actual value for the serialized XML and the value in the encoding could be different.
#3. The onyl way to requestt a speciifc characeter set is to get a BLOB (Binary Large Object) based serialization of the XML. This is only possible when using a 'C' or Java API to access the serialized content. When requesting a BLOB based serialization XMLSerialze supports an ENCOIDING option, which allows you to request a specific encoding and which will add the requested encoding to the XML declaration.
See many other posts on this subject.. -
XMLSerialize and case statement
Hi all,
I try using case statement on select like that
SELECT
xmlserialize(DOCUMENT
xmlroot(XMLELEMENT(kdpwdocument,XMLATTRIBUTES(
'xxxxxxxx' AS sndr,
'xxxxxxxx' AS rcvr,
'xxxxxxxx' AS "xmlns",
'xxxxxxxx' AS "xmlns:xsi",
'xxxxxxxx' AS "xsi:schemaLocation"
CASE WHEN REPO_STATUS=1 THEN
xmlagg(
XMLELEMENT("regio",
XMLELEMENT("Inf",
XMLELEMENT("Id",
XMLELEMENT("PmryId",'1111'),
XMLELEMENT("ScndryId",'1111')
ELSE
xmlagg(
XMLELEMENT("regio",
XMLELEMENT("Inf",
XMLELEMENT("Id",
XMLELEMENT("PmryId",'0000'),
XMLELEMENT("ScndryId",'0000')
END
VERSION '1.0" encoding="UTF-8'
) AS CLOB)
FROM REPO
WHERE 1=1
but i'm getting error:
00937. 00000 - "not a single-group group function"
Any idea how I can change my query to get results? When I'm using group by repo_status, I'm getting two rows, but that isn't a good result for meSolution:
SELECT
xmlserialize(DOCUMENT
xmlroot(XMLELEMENT(document,XMLATTRIBUTES(
'xxxxxxxx' AS sndr,
'xxxxxxxx' AS rcvr,
'xxxxxxxx' AS "xmlns",
'xxxxxxxx' AS "xmlns:xsi",
'xxxxxxxx' AS "xsi:schemaLocation"
xmlagg(
CASE WHEN repo_status=1 THEN
XMLELEMENT("regio",
XMLELEMENT("Inf",
XMLELEMENT("Id",
XMLELEMENT("PmryId",'1111'),
XMLELEMENT("ScndryId",'1111')
ELSE
XMLELEMENT("regio",
XMLELEMENT("Inf",
XMLELEMENT("Id",
XMLELEMENT("PmryId",'0000'),
XMLELEMENT("ScndryId",'0000')
END
, VERSION '1.0" encoding="UTF-8'
) AS CLOB)
FROM REPO
WHERE 1=1
RESULT:
"<?xml version="1.0" encoding="UTF-8"?>
<DOCUMENT SNDR="xxxxxxxx" RCVR="xxxxxxxx" xmlns="xxxxxxxx" xmlns:xsi="xxxxxxxx" xsi:schemaLocation="xxxxxxxx">
<regio>
<Inf>
<Id>
<PmryId>0000</PmryId>
<ScndryId>0000</ScndryId>
</Id>
</Inf>
</regio>
<regio>
<Inf>
<Id>
<PmryId>1111</PmryId>
<ScndryId>1111</ScndryId>
</Id>
</Inf>
</regio>
</DOCUMENT> -
WebLogic Literal encoding woes
Hi
I am trying to send a XML fragment to an Apache based web service
from a WL 6.1 client using Literal encoding.
Basically, I create a WebServiceProxy object, setup the
LiteralEncoder, add the method with the appropriate signature
and then invoke the method.
I'm passing a org.w3c.dom.Element object as the argument to the
method. And expecting that the WL SOAP library will encode it
in XML literal format.
However, it looks like the SoapEncoder is invoked, which then
attempts to serialize the org.w3c.dom.Element object using
SOAP encoding ... and fails.
Any ideas ?
-johnMy (obvious!) follow-on question would be:
How do I do document style - say, I get the XML out of a file
and want to transmit that as the content of the SOAP <Body>
element.
Document and RPC style are actually more of a phenomena of WSDL. For SOAP, it
(document style) just means that "the argument for the method" is to be considered
an XML document, not a data typed "argument for the method".
You are not using WSDL, but if you were, you'd find out that WLS 6.1's WSDL processor
doesn't handle the following extract from a WSDL:
<binding name="HertzReserveBinding" type="defs:HertzReservePortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="exec">
<soap:operation soapAction="http://oreilly.jaws.book/chapter03/HertzReserve"/>
<input>
<soap:body use="literal" namespace="urn:HertzReserveService"/>
</input>
<output>
<soap:body use="literal" namespace="urn:HertzReserveService"/>
</output>
</operation>
</binding>
It completely ignores the:
<soap:binding style="document"
And will throw an exception because it currently can't handle
<soap:body> elements that don't have an encodingStyle attribute. Just so you know
;-) I don't think this requirement that encodingStyle attribute is in the WSDL
spec, but I could be wrong.
As a general aside: there isn't much of a difference between
'RPC-literal' style and 'document' style, right ? Is there
some subtle, but key difference that I'm missing ?I'd say no. From a WLS 6.1 perspective, the difference between an RPC-style and
Message-style Web Service, is that the "service implementation" for an RPC-style
WS has a Stateless Session Bean as the entry point. Whereas the "service implementation"
for a Message-style Web Service, is a JMS destination (i.e. a Topic or Queue).
You will no doubt hear a lot of folks (including BEA's documentation) linking
Message-style Web Services to Message-Driven EJBs, but there is no requirement
that you use this J2EE component (the MDB) to pull things off the JMS destination!
Anything that implements javax.jms.MessageListener can be used.
I am a BEA employee, by the way. I'm a solution architect and a Web Services
"guru" for them. I know a lot about the WLS 6.1 WebLogic Web Services, because
I've been helping a lot of "internal" and external consultants and SEs with implementation
issues and training.
Regards,
Mike Wooten
"john mani" <[email protected]> wrote:
>
>
BTW:
The reason you are getting the <XML> element as the parent element of
the <Measurement>
element, is because you have specified that as the "name of the parameter"
you
are passing to notification ;-) Remember, you are still making and RPC-style
call
(i.e. uses method arguments as opposed to a document), even though you
are using
the literal XML encoding style. The root of the org.w3c.dom.Elementobject
(which
is <Measurement>, in this case), will be the value assigned to thatparameter
name, not the parameter name itself ;-) Do you see how that works?Ah, I think so :)
My (obvious!) follow-on question would be:
How do I do document style - say, I get the XML out of a file
and want to transmit that as the content of the SOAP <Body>
element.
As a general aside: there isn't much of a difference between
'RPC-literal' style and 'document' style, right ? Is there
some subtle, but key difference that I'm missing ?
thanx
-john
Happy Hacking,
Mike Wooten
"john mani" <[email protected]> wrote:
Thanks Michael.
Almost there :)
I can get my WL 6.1 SOAP client to send the message using
the apache-liternal encoding. However the actual XML fragment
is sent within a <XML> tag. i.e., the SOAP message sent out by
my WL SOAP client looks like this: (edited for brevity ..)
<SOAP-ENV:Body>
<ns0:notification SOAP-ENV:encodingStype=
'http://xml.apache.org/xml-soap/literalxml'>
<ns0:XML>
<Measurement>
<variable>my_var</variable>
<value>100.00</value>
</Measurement>
</ns0:XML>
</ns0:notification>
</SOAP-ENV:Body>
My XML fragment is within the <Measurement> tag. However its
being sent within a <XML> wrapper.
I was expecting the <Measurement> element to be directly
enclosed within the <notification> element.
I guess WL puts it like this because I am passing an
org.w3c.Element object to the method ... but, any way I
can get my desired effect ?
thanx
-john
"Michael Wooten" <[email protected]> wrote:
Hi John,
The more I thought about it, the more I figured you would want to
know
how I created
a client.jar, that contained all the classes to do the "client-side"
of literalxml
encoding, without having to have weblogic.jar in your class path.Long
sentence,
huh?
Anyway, here are the names (and paths) of the 24 classes that you'll
need to put
in one of your client.jar:
weblogic/soap/codec/LiteralCodec.class
weblogic/apache/xml/serialize/BaseMarkupSerializer.class
weblogic/apache/xml/serialize/DOMSerializer.class
weblogic/apache/xml/serialize/ElementState.class
weblogic/apache/xml/serialize/EncodingInfo.class
weblogic/apache/xml/serialize/Encodings.class
weblogic/apache/xml/serialize/HTMLdtd.class
weblogic/apache/xml/serialize/HTMLSerializer.class
weblogic/apache/xml/serialize/IndentPrinter.class
weblogic/apache/xml/serialize/LineSeparator.class
weblogic/apache/xml/serialize/Method.class
weblogic/apache/xml/serialize/OutputFormat$Defaults.class
weblogic/apache/xml/serialize/OutputFormat$DTD.class
weblogic/apache/xml/serialize/OutputFormat.class
weblogic/apache/xml/serialize/Printer.class
weblogic/apache/xml/serialize/Serializer.class
weblogic/apache/xml/serialize/SerializerFactory.class
weblogic/apache/xml/serialize/SerializerFactoryImpl.class
weblogic/apache/xml/serialize/SieveEncodingInfo$BAOutputStream.class
weblogic/apache/xml/serialize/SieveEncodingInfo.class
weblogic/apache/xml/serialize/TextSerializer.class
weblogic/apache/xml/serialize/XHTMLSerializer.class
weblogic/apache/xml/serialize/XMLSerializer.class
weblogicx/xml/stream/helpers/DOMBuilder.class
This could, of course, all change with the next release of WLS, souse
this information
at your own peril ;-)
Where do you get them from? I think you know that already. How do
you
get the
wsgen Ant Task to do it for you, so you don't have to? Ah, ha... Now
that's what
I'm talkin' about ;-) Send me an e-mail at [email protected],
and I'll
tell you.
Regards,
Mike Wooten
"john mani" <[email protected]> wrote:
Hi Michael
Hi John,
There are ways to use the WLS 6.1's Web Services stack, that don't
require
the
use of a WSDL, but they involve a little more of a "roll up your
sleeves"
attitude,
on the part of the developer ;-)Yes, there is no WSDL. I am invoking a webservice that's generated
and deployed in Apache, and as far as I know, Apache SOAP doesn't
provide facilities to generate WSDL for its web services.
Basically, I use the Apache SOAP tools to automatically generate
and deploy the SOAP wrappers for my Java classes, but this
process does not generate any WSDL.
I guess one option is to handcraft a WSDL. And the other option
would be to "roll up the sleeves" and use the WebLogic client
libs in a manner that doesn't require WSDL.
In fact, I am accessing a Apache SOAP RPC style webclient using
the WebLogic 6.1 libraries in a similar manner (i.e., no WSDL).
That was pretty straightforward, hence my surprise when it
didn't work in a literal style.
My code for the RPC style looks like this:
WebServiceProxy proxy = WebServiceProxy.createService(
"telemetry", "urn:telemetry",
new URL(apache_service_url));
proxy.setCodecFactory(factory);
SoapType arg = new SoapType("Measurement", Measurement.class);
proxy.addMethod("notification", null, new SoapType[]{arg});
SoapMethod method = proxy.getMethod("notification");
method.setObjectUrl("urn:telreceiver");
Measurement m = new Measurement(..... );
Object result = method.invoke(new Object[] { m } );
My code for the literal style looks quite similar, except
that I use a org.w3c.dom.Element class instead of the
Measurement class (which is a JavaBean). And I invoke the
target method with the Element class as arg.
Your advice ?
thanks
-john
Regards,
Mike Wooten
"john mani" <[email protected]> wrote:
Hi
I am trying to send a XML fragment to an Apache based web service
from a WL 6.1 client using Literal encoding.
Basically, I create a WebServiceProxy object, setup the
LiteralEncoder, add the method with the appropriate signature
and then invoke the method.
I'm passing a org.w3c.dom.Element object as the argument to the
method. And expecting that the WL SOAP library will encode it
in XML literal format.
However, it looks like the SoapEncoder is invoked, which then
attempts to serialize the org.w3c.dom.Element object using
SOAP encoding ... and fails.
Any ideas ?
-john -
Set XML encoding by saving with Xerces
hi there,
i parse a xml dokument which is encoded by Cp1252. then i do a lot of modifications an want to write it back by using
OutputFormat format = new OutputFormat(XmlParser.document);
format.setLineSeparator(LineSeparator.Windows);
format.setIndenting(true);
format.setLineWidth(0);
format.setPreserveSpace(true);
XMLSerializer serializer;
try {
serializer = new XMLSerializer(new FileWriter(file), format);
serializer.asDOMSerializer();
serializer.serialize(XmlParser.document);
} catch (IOException e) {
e.printStackTrace();
}but this sets the encoding to UTF-8. what should i change to save it with Cp1252 encoding?use the -
OutputFormat(org.w3c.dom.Document doc, java.lang.String encoding, boolean indenting)
constructor with encoding="windows-1252".... -
Adobe media encoder error in photoshop
Hi everyone!This morning i have tried to render a video timelapse in photoshop but it showed to me an error which says:''Could not complete the render video command because of a problem with Adobe Media Encoder''.Could anyone tell me how can i fix this error?
Nobody can tell you anything without proper system info or other technical details like exact versions, render settings, details about the source files and so on.
Mylenium -
Hello there ;-)
In After Effect CC u can render picture sequences using a filname like: "Project_[#####].jpg". The [#####] is replaced by the framenumber when rendering. When i render a picture sequenc in Media Encoder CC i Don´t have that oportunity. It allways starts with a Number like 000001. My Question - is it possible to change that in the encoder? So that i have the Frame number in the filename like in After Effect CC? If yes - how? I haven´t find anything!
THANX for your help!I have this issue too. It makes After effects impossible to use with media encoder. What we want is the actual frame number from After effects
Example
I have a 5000 frame AE export.
I can export the lot from AME
Render0000.png - Render5000.png
Client makes a change to Frames 4500-5000
Try and render Work area to AME
Result = Render0001.png - Render0499.png
The only way to keep file numbers is to use AE's render Queue which seem to be way slower than AME? -
Conversion of XML file from ANSI to UTF-8 encoding in SAP 4.6C
Hi All,
Im working on SAP 4.6C version.I have generated a XML file from my custom report.It is downloading in ANSI format.But i need to download this into UTF-8 format.So can anyone please let me know how to do this?
Is this possible in 4.6C version?
Thanks in Advance,
Aruna A NHello
It is possible in 4.6.
Try this code:
REPORT Z_TEST_XML_DOWN .
data:
lp_ixml type ref to if_ixml,
lp_xdoc type ref to if_ixml_document,
lp_sfac type ref to if_ixml_stream_factory,
lp_ostr type ref to if_ixml_ostream,
lp_rend type ref to if_ixml_renderer,
lp_enco type ref to if_ixml_encoding.
data:
lp_root type ref to if_ixml_element,
lp_coll type ref to if_ixml_element,
lp_elem type ref to if_ixml_element.
class cl_ixml definition load.
data:
udat like lfa1,
s type string.
select single * from lfa1 into udat where lifnr = '0000000001'. " <- set here real number
*** create xml
lp_ixml = cl_ixml=>create( ).
lp_xdoc = lp_ixml->create_document( ).
lp_root = lp_xdoc->create_simple_element( name = 'Node'
parent = lp_xdoc ).
s = udat-land1.
call method lp_root->set_attribute( name = 'country_name'
value = s ).
s = udat-name1.
call method lp_root->set_attribute( name = 'vendor_name'
value = s ).
s = udat-ort01.
call method lp_root->set_attribute( name = 'city_name'
value = s ).
*** render xml
types: begin of xml_tab_line,
line(256) type x,
end of xml_tab_line.
types: xtab type table of xml_tab_line.
data: t_xml type xtab,
size type i,
rc type i.
lp_sfac = lp_ixml->create_stream_factory( ).
lp_ostr = lp_sfac->create_ostream_itable( table = t_xml ).
lp_enco = lp_ixml->create_encoding( character_set = 'utf-8'
byte_order = if_ixml_encoding=>co_none ).
call method lp_ostr->set_encoding( encoding = lp_enco ).
lp_rend = lp_ixml->create_renderer( ostream = lp_ostr
document = lp_xdoc ).
rc = lp_rend->render( ).
*** export to file
size = lp_ostr->get_num_written_raw( ).
call function 'WS_DOWNLOAD'
exporting
bin_filesize = size
filename = 'c:\sapxml_test.xml'
filetype = 'BIN'
tables
data_tab = t_xml
exceptions
others = 1.
It is just simple example. -
Media Encoder CC mpeg2 Question
Basically what the title says. Where exactly is the option to format a video into an mpeg2 file? I've been Googling this to death. I know I've seen some people say they had it, then it disappeared. But I literally just downloaded Media Encoder and its nowhere to be found. Even under the DVD and Blue-ray section, the only options are for Blue-ray. I need to burn a wedding video onto a DVD. Is there something special you have to do to get this done? Are there limits on the free trial version that don't allow mpeg2 downloads? Help!
Are you using AME CC 2014? MPEG2 is included in AME under more strict license than other formats and is only activated only if you have Premiere Pro CC 2014, AfterEffects CC 2014 or Prelude CC 2014. If you are using them under a free trial, MPEG2 becomes unavailable after a trial period expires. After a trial has been expired, AME CC 2014 can be used extra 30 more days, but without MPEG2.
If you already used up a trial period, you can either 1) install one of three apps I mentioned earlier that you haven't installed before and activate it as a trial or 2) purchase a subscription for Creative Cloud. #1 option allows you to use MPEG2 30 more days. With #2 option, you can use MPEG2 as long as you keep your subscription active. I hope this helps.
Maybe you are looking for
-
Big problem with Ipad 2 IOS5b6
Hello friends. I have a serious problem. Download the version ofItunes 10.5 IOS5B6 and not being a developer. Now I can not use my IPAD2. I can not downgrade and 3194 error appears after trying DFU Restore to go back to 4.3.5. Once I managed torestor
-
Cannot be applied to (java.io.PrintWriter) error
Hi guys I get the following errors when trying to compile my program and I was wondering how to solve it printPay() in PaySlip cannot be applied to (java.io.PrintWriter) slip.printPay(slipWrite) import java.io.*; public class PayApp public static v
-
Adobe Bridge CS5 and CS6 need to uninstall
I have Adobe Bridge CS5 and CS6 that I need to uninstall off my mac I do not have Adobe Uninstall in the Utilities folder. Question how do I uninstall the applications
-
IMac Intel Quad duo & 10.4.5 Update
I have a brand new iMac - it worked perfectly with 10.4.4 which was already installed. I upgraded to 10.4.5 via Software update yesterday. Since then the machine has significantly slowed in response and numerous errors occur. This morning after check
-
Error on IOS 7 Download(Iphone-4s)
Iam trying to downlaod IOS 7 on my Iphone 4s. Getting error saying " There is a problem downlaoding the software for the iphone. An unknown error occured(502).....Kindly help if any body know fix for this.........Appreciate your help....Many Thanks i