Reading Structured Content with Apache Tika

Hi,
Is there a way to read structured content from word file using a java program with Apache Tika APIs? I know Tika internally used Apache POI
in POI we can have
Range range = doc.getOverallRange()
TableIterator ti = new TableIterator(range);
and other functions like getSection(), getParagraph()
I am not able to find corresponding functions in Tika. Please let me know.
Thanks

Hi,
The first column of excel is text and the second column is special(US ZipCode).
I am using the below code to read the contents:
InputStream is = new BufferedInputStream(
new FileInputStream(fileName));
XSSFWorkbook wb = new XSSFWorkbook(is);
XSSFSheet sheet = wb.getSheetAt(0);
int rows = sheet.getPhysicalNumberOfRows();
for (int r = 0; r < rows; r++) {
XSSFRow row = sheet.getRow(r);
int cells = row.getPhysicalNumberOfCells();
for (int c = 0; c < cells; c++) {
XSSFCell cell = row.getCell(c);
String value = null;
switch (cell.getCellType()) {
case XSSFCell.CELL_TYPE_FORMULA:
value =cell.getCellFormula();
break;
case XSSFCell.CELL_TYPE_NUMERIC:
value = Double.toString(cell.getNumericCellValue());
break;
case XSSFCell.CELL_TYPE_STRING:
value = cell.getStringCellValue();
break;
default:
System.out.println("CELL col=" + cell.getColumnIndex() + " VALUE="
+ value);
Regards,
Raj

Similar Messages

  • CQ search and Apache Tika

    I have a requirement to be able to allow the website users to search within the content of pdf and word docs. The site is planned to be built on CQ5.5. I belive CQ integrates with Apache Tika (look for full text extraction at http://dev.day.com/docs/en/crx/current/developing/searching_in_crx.html ) to achieve this.
    I polling this group to check if we have used this feature in any other project. How good or bad it is ? Any lessons learnt from it.
    Also have we successfully used any of the other features that the native lucene search in CQ provides . I am specially interested in spell check, stemming, synonym matching, similarity matching.
    Thanks in advance for all your responses.

    @Deepikaa  :-  Please install the 5.5 update1 package & then reindex.
    @Anoop
    -  stemming Porter stemmer is default one rather than dictionary-backed stemmer.The way Porter steamer works is both Country & Countries steam to countri. However you can write your own Analyzer implementation or other workaround would be to use QueryParser for search results.
    -  The spellchecker dictionary is actually built from the words contained in your site's content. This mighr be an optimal spellchecker and should handle cases where your product name is mispelled by users. In other words, you should not need to change the dictionary and if you did want to you would have to implement custom code to do that.
    -  IIRC To enable the synonym lookup mechanism need to use the tilda (~) character which can be configured in workspace.xml under the SearchIndex element.
    -  The new indexing rules http://wiki.apache.org/jackrabbit/IndexingConfiguration
    Some examples at http://dev.day.com/docs/en/crx/current/developing/searching_in_crx.html

  • Is there any way to read Processing instruction content with XMLDOM

    I am having problem to read the content of PRocessing instructions with PLSQL XMLDOM.
    Would appriciate if someone could help. with code sample.

    DOM doesn't have any direct way to select nodes. Processing-Instructions are child nodes to the corresponding node. If you know the tree structure you can traverse the tree and goto the particular PI node.
    The easiest way is to XPath expressions. The following example retrieves all the Processing Instructions in the document.
    XSLProcessor.selectNodes(document, '//processing-instruction()')

  • How to read the content of a blob col along with other cols as pipe delimit

    Hi,
    I would like to read the blob content along with the other columns . Assume table TAB1 has columns Response_log, Empcode and Ename. Here Response_log col is a blob data type, and the content of the blob is an xml file.Now i would like to read the content of the xml file of response_log column along with Empcode and Ename as pipe delimited . or else the best option would be to write to a text file with name extract.txt with the data being pipe delimited .
    create  table tab1(
    response_log blob,
    empcode  number,
    ename  varchar2(50 byte)
    )Sample code goes something like the one below .
    select xmltype( response_log, nls_charset_id( 'char_cs' ) ).getclobval() || '|' || empcode || '|' || ename
    from tab1 Can I have any other alternate way for this.
    Please advice

    Just Now one example is given in HOW TO WRITE ,SAVE A FILE IN BLOB COLUMN

  • How to read the content of .msg file type with attachments in SAP crm?

    Hi All,
    Need to develop a RFC FM which will take any BP number as input
    Read the attachments in the BP and identify the attachment which is an email( .msg).
    Identify by the mime type and file extension
    Scan through the email to get the attachments of that email read the content of the
    attachment as a binary file and return that binary file with file name, size
    etc.
    I need to read the data (in binary format) attachment of an attachment of .msg file type .
    I have done till step 2 .
    Please help me on step 3.
    Thanks&Regards,
    Pratap Naik

    Can any one help me on this ?
    Thanks in advance.
    Regards,
    Pratap Naik

  • BI content with folder structure in portal Content Area

    HI Dear Friends,
    I have  a requirement in my current project where i am integrating the BI reports with SAP EP.Iviews are associated with BI Reports.In the portal on clicking workset it should display folders in the portal content area with Icons instead of in Detail navigation .On click of the displayed folders it should display its sub content with Icons.
    I tried in all ways but later i came to know there there is a SAP BI business package which would come up with predifined iviews associated with BI. By importing this business package we can dispaly the  BI content in the portal in a folder format .
    I am using BI and EP 7.0 versions.
    Ratnakar

    Ratnakar,
       Let me understand your requirements, correct me if I understood it wrong. You need to display BI reports in Folder structure that is similar when you log on through BEx analyzer or WAD. If this is correct, then you need to upload the BI Role which contain all the required Folder structures and it BI Queries or BI Queries url assigned to that role.Once you upload this role on to portal , you will see folder structure on PCA.
    Example
    BI Reports  - Folder 1
      I--> FI reports  -- Subfolder 1
      I            I--> AP reports 1
      I--> CO reports  -- Subfolder 2
                   I--> Cost Report 1         
    Hope it helps,
    Cheers,
    Balaji

  • Reading from a text file and displaying the contents with in a frame

    Hi All,
    I am trying to read some data from a text file and display it on a AWT Frame. The contents of the text file are as follows:
    pcode1,pname1,price1,sname1,
    pcode2,pname2,price2,sname1,
    I am writing a method to read the contents from a text file and store them into a string by using FileInputStream and InputStreamReader.
    Now I am dividing the string(which has the contents of the text file) into tokens using the StringTokenizer class. The method is as show below
    void ReadTextFile()
                        FileInputStream fis=new FileInputStream(new File("nieman.txt"));
                         InputStreamReader isr=new InputStreamReader(fis);
                         char[] buf=new char[1024];
                         isr.read(buf,0,1024);
                         fstr=new String(buf);
                         String Tokenizer st=new StringTokenizer(fstr,",");
                         while(st.hasMoreTokens())
                                          pcode1=st.nextToken();
                               pname1=st.nextToken();
              price1=st.nextToken();
                              sname1=st.nextToken();
         } //close of while loop
                    } //close of methodHere goes my problem: I am unable to display the values of pcode1,pname1,price1,sname1 when I am trying to access them from outside the ReadTextFile method as they are storing "null" values . I want to create a persistent string variable so that I can access the contents of the string variable from anywhere with in the java file. Please provide your comments for this problem as early as possible.
    Thanks in advance.

    If pcode1,pname1,price1,sname1 are global variables, which I assume they are, then simply put the word static in front of them. That way, any class in your file can access those values by simply using this notation:
    MyClassName.pcode1;
    MyClassName.pname1;
    MyClassName.price1;
    MyClassName.sname1

  • Newly installed coldfusion 11 configured with apache cannot read css/js/jpg files

    I am sure I am missing something really easy, but I cannot get my css stylesheet to work on my fresh installation. 
    coldfusion 11 with apache 2.2
    my cfm files can be parsed in subfolders, but a css file (or anything else other than cfm files) in the same folder doesn't seem to be working as hoped
    if I type in something like "localhost/appName/css/main.css" I get a 404 File Not Found error
    Does this error indicate an apache or coldfusion problem?
    Thanks in advance for any help, Wayne

    Hi Wayne,
    Could you please confirm if the webroot you are referring to is the ColdFusion webroot, or Apache webroot.
    CSS files in the ColdFusion webroot may not be served when explicitly requested through the Apache port, since Apache would not even forward the request to ColdFusion.
    Of course, when a CFM page is requested, stylesheet's referenced within CFM pages must get loaded!
    - Immanuel

  • Reading a file with UTF-8 contents

    Hi,
    I am not sure whether this is the right forum for my question. If not, please tell me.
    I have a problem reading a file where some characters are stored in UTF-8. An example string from the file is: "M\u00f6hrchen"
    But If I read this in, with a BufferedReader this becomes "M\\u00f6hrchen". Why is this so?
    The code is the following:
    BufferedReader reader= new BufferedReader(
                               new InputStreamReader(
                                   new FileInputStream(filename, "UTF-8"));          
    while (reader.ready()) {
         String line= reader.readLine();
    }Any hints what is going wrong? It must be something with the input stream, since writing the String directly into the code works.
    Marco

    First - "\u00f6" isn't UTF-8 encoding; it's a unicode
    escape sequence.
    UTF-8 encoding would mean that your character is
    actually stored as a single unicde character - not 6
    ascii characters.Oh, than I misunderstood this.
    Second, just do:
    BufferedReader reader= new BufferedReader(
    new InputStreamReader(
    new
    new
    new FileInputStream(filename));          
    while (reader.ready()) {    
    String line= reader.readLine();
    I tried this along with other encodings. Nothing worked correctly. The output of specifiying UTF-8 and nothing is the same. Java seems to not understand that this is a unicode escape sequence, but rather escapes the backslash.

  • Svn with Apache Timeout issue

    Hello Archers,
    I've set up an svn Server with Apache folloing your wiki on my raspberry pi.
    https://wiki.archlinux.org/index.php/LAMP
    https://wiki.archlinux.org/index.php/Subversion_Setup
    Unfortunately I get errors when I try to commit several files (15 or so). I think it is a timeout issue, however I don't know where to specify the timeout in the httpd.conf (or httpd-ssl.conf)
    This is a client error message:
    Commit failed (details follow):
    Unexpected end of svndiff Input
    And this the corresponding server side log:
    [date] [dav:error] [pid 448:tid 2854220848] (70007)The timeout specified has expired: [client 192.168.178.55:63819] Timeout reading the body (URI: /Dokumente/!svn/txr/9-q/Music/myfile.mp3) [408, #0]
    [date] [dav:error] [pid 448:tid 2854220848] [client 192.168.178.55:63819] mod_dav_svn close_stream: error closing write stream [500, #185004]
    [date] [dav:error] [pid 448:tid 2854220848] [client 192.168.178.55:63819] Unexpected end of svndiff input [500, #185004]
    I assume it is some error like this: http://subversion.apache.org/faq.html#s … -truncated
    I think I don't have specified the timeouts correctly, since I haven't found the default option.
    tl:dr
    Do you know how to set the timeouts in the apache configuration file?
    I very much appreciate your help.
    arch on pi
    Here are my configuration Files with my position for the timeout order:
    httpd-ssl.conf:
    # This is the Apache server configuration file providing SSL support.
    # It contains the configuration directives to instruct the server how to
    # serve pages over an https connection. For detailed information about these
    # directives see <URL:http://httpd.apache.org/docs/2.4/mod/mod_ssl.html>
    # Do NOT simply read the instructions in here without understanding
    # what they do. They're here only as hints or reminders. If you are unsure
    # consult the online docs. You have been warned.
    # Required modules: mod_log_config, mod_setenvif, mod_ssl,
    # socache_shmcb_module (for default value of SSLSessionCache)
    # Pseudo Random Number Generator (PRNG):
    # Configure one or more sources to seed the PRNG of the SSL library.
    # The seed data should be of good random quality.
    # WARNING! On some platforms /dev/random blocks if not enough entropy
    # is available. This means you then cannot use the /dev/random device
    # because it would lead to very long connection times (as long as
    # it requires to make more entropy available). But usually those
    # platforms additionally provide a /dev/urandom device which doesn't
    # block. So, if available, use this one instead. Read the mod_ssl User
    # Manual for more details.
    #SSLRandomSeed startup file:/dev/random 512
    SSLRandomSeed startup file:/dev/urandom 512
    #SSLRandomSeed connect file:/dev/random 512
    SSLRandomSeed connect file:/dev/urandom 512
    # When we also provide SSL we have to listen to the
    # standard HTTP port (see above) and to the HTTPS port
    Listen 443
    ## SSL Global Context
    ## All SSL configuration in this context applies both to
    ## the main server and all SSL-enabled virtual hosts.
    # SSL Cipher Suite:
    # List the ciphers that the client is permitted to negotiate.
    # See the mod_ssl documentation for a complete list.
    SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
    # Speed-optimized SSL Cipher configuration:
    # If speed is your main concern (on busy HTTPS servers e.g.),
    # you might want to force clients to specific, performance
    # optimized ciphers. In this case, prepend those ciphers
    # to the SSLCipherSuite list, and enable SSLHonorCipherOrder.
    # Caveat: by giving precedence to RC4-SHA and AES128-SHA
    # (as in the example below), most connections will no longer
    # have perfect forward secrecy - if the server's key is
    # compromised, captures of past or future traffic must be
    # considered compromised, too.
    #SSLCipherSuite RC4-SHA:AES128-SHA:HIGH:MEDIUM:!aNULL:!MD5
    #SSLHonorCipherOrder on
    # Pass Phrase Dialog:
    # Configure the pass phrase gathering process.
    # The filtering dialog program (`builtin' is an internal
    # terminal dialog) has to provide the pass phrase on stdout.
    SSLPassPhraseDialog builtin
    # Inter-Process Session Cache:
    # Configure the SSL Session Cache: First the mechanism
    # to use and second the expiring timeout (in seconds).
    #SSLSessionCache "dbm:/run/httpd/ssl_scache"
    SSLSessionCache "shmcb:/run/httpd/ssl_scache(512000)"
    SSLSessionCacheTimeout 6000
    ## SSL Virtual Host Context
    <VirtualHost _default_:443>
    # General setup for the virtual host
    DocumentRoot "/mnt/sda1/svn"
    ServerName 192.168.178.48:443
    ServerAdmin [email protected]
    ErrorLog "/var/log/httpd/error_log"
    TransferLog "/var/log/httpd/access_log"
    # SSL Engine Switch:
    # Enable/Disable SSL for this virtual host.
    SSLEngine on
    # Server Certificate:
    # Point SSLCertificateFile at a PEM encoded certificate. If
    # the certificate is encrypted, then you will be prompted for a
    # pass phrase. Note that a kill -HUP will prompt again. Keep
    # in mind that if you have both an RSA and a DSA certificate you
    # can configure both in parallel (to also allow the use of DSA
    # ciphers, etc.)
    # Some ECC cipher suites (http://www.ietf.org/rfc/rfc4492.txt)
    # require an ECC certificate which can also be configured in
    # parallel.
    SSLCertificateFile "/etc/httpd/conf/server.crt"
    #SSLCertificateFile "/etc/httpd/conf/server-dsa.crt"
    #SSLCertificateFile "/etc/httpd/conf/server-ecc.crt"
    # Server Private Key:
    # If the key is not combined with the certificate, use this
    # directive to point at the key file. Keep in mind that if
    # you've both a RSA and a DSA private key you can configure
    # both in parallel (to also allow the use of DSA ciphers, etc.)
    # ECC keys, when in use, can also be configured in parallel
    SSLCertificateKeyFile "/etc/httpd/conf/server.key"
    #SSLCertificateKeyFile "/etc/httpd/conf/server-dsa.key"
    #SSLCertificateKeyFile "/etc/httpd/conf/server-ecc.key"
    # Server Certificate Chain:
    # Point SSLCertificateChainFile at a file containing the
    # concatenation of PEM encoded CA certificates which form the
    # certificate chain for the server certificate. Alternatively
    # the referenced file can be the same as SSLCertificateFile
    # when the CA certificates are directly appended to the server
    # certificate for convenience.
    #SSLCertificateChainFile "/etc/httpd/conf/server-ca.crt"
    # Certificate Authority (CA):
    # Set the CA certificate verification path where to find CA
    # certificates for client authentication or alternatively one
    # huge file containing all of them (file must be PEM encoded)
    # Note: Inside SSLCACertificatePath you need hash symlinks
    # to point to the certificate files. Use the provided
    # Makefile to update the hash symlinks after changes.
    #SSLCACertificatePath "/etc/httpd/conf/ssl.crt"
    #SSLCACertificateFile "/etc/httpd/conf/ssl.crt/ca-bundle.crt"
    # Certificate Revocation Lists (CRL):
    # Set the CA revocation path where to find CA CRLs for client
    # authentication or alternatively one huge file containing all
    # of them (file must be PEM encoded).
    # The CRL checking mode needs to be configured explicitly
    # through SSLCARevocationCheck (defaults to "none" otherwise).
    # Note: Inside SSLCARevocationPath you need hash symlinks
    # to point to the certificate files. Use the provided
    # Makefile to update the hash symlinks after changes.
    #SSLCARevocationPath "/etc/httpd/conf/ssl.crl"
    #SSLCARevocationFile "/etc/httpd/conf/ssl.crl/ca-bundle.crl"
    #SSLCARevocationCheck chain
    # Client Authentication (Type):
    # Client certificate verification type and depth. Types are
    # none, optional, require and optional_no_ca. Depth is a
    # number which specifies how deeply to verify the certificate
    # issuer chain before deciding the certificate is not valid.
    #SSLVerifyClient require
    #SSLVerifyDepth 10
    # TLS-SRP mutual authentication:
    # Enable TLS-SRP and set the path to the OpenSSL SRP verifier
    # file (containing login information for SRP user accounts).
    # Requires OpenSSL 1.0.1 or newer. See the mod_ssl FAQ for
    # detailed instructions on creating this file. Example:
    # "openssl srp -srpvfile /etc/httpd/conf/passwd.srpv -add username"
    #SSLSRPVerifierFile "/etc/httpd/conf/passwd.srpv"
    # Access Control:
    # With SSLRequire you can do per-directory access control based
    # on arbitrary complex boolean expressions containing server
    # variable checks and other lookup directives. The syntax is a
    # mixture between C and Perl. See the mod_ssl documentation
    # for more details.
    #<Location />
    #SSLRequire ( %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \
    # and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \
    # and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \
    # and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \
    # and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20 ) \
    # or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
    #</Location>
    # SSL Engine Options:
    # Set various options for the SSL engine.
    # o FakeBasicAuth:
    # Translate the client X.509 into a Basic Authorisation. This means that
    # the standard Auth/DBMAuth methods can be used for access control. The
    # user name is the `one line' version of the client's X.509 certificate.
    # Note that no password is obtained from the user. Every entry in the user
    # file needs this password: `xxj31ZMTZzkVA'.
    # o ExportCertData:
    # This exports two additional environment variables: SSL_CLIENT_CERT and
    # SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
    # server (always existing) and the client (only existing when client
    # authentication is used). This can be used to import the certificates
    # into CGI scripts.
    # o StdEnvVars:
    # This exports the standard SSL/TLS related `SSL_*' environment variables.
    # Per default this exportation is switched off for performance reasons,
    # because the extraction step is an expensive operation and is usually
    # useless for serving static content. So one usually enables the
    # exportation for CGI and SSI requests only.
    # o StrictRequire:
    # This denies access when "SSLRequireSSL" or "SSLRequire" applied even
    # under a "Satisfy any" situation, i.e. when it applies access is denied
    # and no other module can change it.
    # o OptRenegotiate:
    # This enables optimized SSL connection renegotiation handling when SSL
    # directives are used in per-directory context.
    #SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
    <FilesMatch "\.(cgi|shtml|phtml|php)$">
    SSLOptions +StdEnvVars
    </FilesMatch>
    <Directory "/srv/http/cgi-bin">
    SSLOptions +StdEnvVars
    </Directory>
    # SSL Protocol Adjustments:
    # The safe and default but still SSL/TLS standard compliant shutdown
    # approach is that mod_ssl sends the close notify alert but doesn't wait for
    # the close notify alert from client. When you need a different shutdown
    # approach you can use one of the following variables:
    # o ssl-unclean-shutdown:
    # This forces an unclean shutdown when the connection is closed, i.e. no
    # SSL close notify alert is sent or allowed to be received. This violates
    # the SSL/TLS standard but is needed for some brain-dead browsers. Use
    # this when you receive I/O errors because of the standard approach where
    # mod_ssl sends the close notify alert.
    # o ssl-accurate-shutdown:
    # This forces an accurate shutdown when the connection is closed, i.e. a
    # SSL close notify alert is send and mod_ssl waits for the close notify
    # alert of the client. This is 100% SSL/TLS standard compliant, but in
    # practice often causes hanging connections with brain-dead browsers. Use
    # this only for browsers where you know that their SSL implementation
    # works correctly.
    # Notice: Most problems of broken clients are also related to the HTTP
    # keep-alive facility, so you usually additionally want to disable
    # keep-alive for those clients, too. Use variable "nokeepalive" for this.
    # Similarly, one has to force some clients to use HTTP/1.0 to workaround
    # their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
    # "force-response-1.0" for this.
    BrowserMatch "MSIE [2-5]" \
    nokeepalive ssl-unclean-shutdown \
    downgrade-1.0 force-response-1.0
    # Per-Server Logging:
    # The home of a custom SSL log file. Use this when you want a
    # compact non-error SSL logfile on a virtual host basis.
    CustomLog "/var/log/httpd/ssl_request_log" \
    "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
    #SSLSessionTimeout 5m
    Timeout 600000
    <Location />
    DAV svn
    SVNParentPath /mnt/sda1/svn/repos
    AuthzSVNAccessFile /home/svn/.svn-policy-file
    AuthName "SVN Repositories"
    AuthType Basic
    AuthUserFile /home/svn/.svn-auth-file
    # Satisfy Any
    Require valid-user
    </Location>
    </VirtualHost>
    httpd.conf
    # This is the main Apache HTTP server configuration file. It contains the
    # configuration directives that give the server its instructions.
    # See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
    # In particular, see
    # <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
    # for a discussion of each configuration directive.
    # Do NOT simply read the instructions in here without understanding
    # what they do. They're here only as hints or reminders. If you are unsure
    # consult the online docs. You have been warned.
    # Configuration and logfile names: If the filenames you specify for many
    # of the server's control files begin with "/" (or "drive:/" for Win32), the
    # server will use that explicit path. If the filenames do *not* begin
    # with "/", the value of ServerRoot is prepended -- so "logs/access_log"
    # with ServerRoot set to "/usr/local/apache2" will be interpreted by the
    # server as "/usr/local/apache2/logs/access_log", whereas "/logs/access_log"
    # will be interpreted as '/logs/access_log'.
    # ServerRoot: The top of the directory tree under which the server's
    # configuration, error, and log files are kept.
    # Do not add a slash at the end of the directory path. If you point
    # ServerRoot at a non-local disk, be sure to specify a local disk on the
    # Mutex directive, if file-based mutexes are used. If you wish to share the
    # same ServerRoot for multiple httpd daemons, you will need to change at
    # least PidFile.
    ServerRoot "/etc/httpd"
    Timeout 60000
    # Mutex: Allows you to set the mutex mechanism and mutex file directory
    # for individual mutexes, or change the global defaults
    # Uncomment and change the directory if mutexes are file-based and the default
    # mutex file directory is not on a local disk or is not appropriate for some
    # other reason.
    # Mutex default:/run/httpd
    # Listen: Allows you to bind Apache to specific IP addresses and/or
    # ports, instead of the default. See also the <VirtualHost>
    # directive.
    # Change this to Listen on specific IP addresses as shown below to
    # prevent Apache from glomming onto all bound IP addresses.
    #Listen 12.34.56.78:80
    Listen 80
    # Dynamic Shared Object (DSO) Support
    # To be able to use the functionality of a module which was built as a DSO you
    # have to place corresponding `LoadModule' lines at this location so the
    # directives contained in it are actually available _before_ they are used.
    # Statically compiled modules (those listed by `httpd -l') do not need
    # to be loaded here.
    # Example:
    # LoadModule foo_module modules/mod_foo.so
    LoadModule authn_file_module modules/mod_authn_file.so
    #LoadModule authn_dbm_module modules/mod_authn_dbm.so
    #LoadModule authn_anon_module modules/mod_authn_anon.so
    #LoadModule authn_dbd_module modules/mod_authn_dbd.so
    #nach fehlermeldung
    LoadModule authn_socache_module modules/mod_authn_socache.so
    LoadModule authn_core_module modules/mod_authn_core.so
    LoadModule authz_host_module modules/mod_authz_host.so
    LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
    LoadModule authz_user_module modules/mod_authz_user.so
    #LoadModule authz_dbm_module modules/mod_authz_dbm.so
    #LoadModule authz_owner_module modules/mod_authz_owner.so
    #LoadModule authz_dbd_module modules/mod_authz_dbd.so
    LoadModule authz_core_module modules/mod_authz_core.so
    #LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
    LoadModule access_compat_module modules/mod_access_compat.so
    LoadModule auth_basic_module modules/mod_auth_basic.so
    #LoadModule auth_form_module modules/mod_auth_form.so
    #LoadModule auth_digest_module modules/mod_auth_digest.so
    #LoadModule allowmethods_module modules/mod_allowmethods.so
    #LoadModule file_cache_module modules/mod_file_cache.so
    #Felhermeldung undefined symbols
    LoadModule cache_module modules/mod_cache.so
    #LoadModule cache_disk_module modules/mod_cache_disk.so
    #nach Fehlermeldung
    LoadModule cache_socache_module modules/mod_cache_socache.so
    #nochne Fehlermeldung
    LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
    #LoadModule socache_dbm_module modules/mod_socache_dbm.so
    #LoadModule socache_memcache_module modules/mod_socache_memcache.so
    #LoadModule watchdog_module modules/mod_watchdog.so
    #LoadModule macro_module modules/mod_macro.so
    #LoadModule dbd_module modules/mod_dbd.so
    #LoadModule dumpio_module modules/mod_dumpio.so
    #LoadModule echo_module modules/mod_echo.so
    #LoadModule buffer_module modules/mod_buffer.so
    #LoadModule data_module modules/mod_data.so
    #LoadModule ratelimit_module modules/mod_ratelimit.so
    LoadModule reqtimeout_module modules/mod_reqtimeout.so
    #LoadModule ext_filter_module modules/mod_ext_filter.so
    #LoadModule request_module modules/mod_request.so
    LoadModule include_module modules/mod_include.so
    LoadModule filter_module modules/mod_filter.so
    #LoadModule reflector_module modules/mod_reflector.so
    #LoadModule substitute_module modules/mod_substitute.so
    #LoadModule sed_module modules/mod_sed.so
    #LoadModule charset_lite_module modules/mod_charset_lite.so
    #LoadModule deflate_module modules/mod_deflate.so
    #LoadModule xml2enc_module modules/mod_xml2enc.so
    #LoadModule proxy_html_module modules/mod_proxy_html.so
    LoadModule mime_module modules/mod_mime.so
    #LoadModule ldap_module modules/mod_ldap.so
    LoadModule log_config_module modules/mod_log_config.so
    #LoadModule log_debug_module modules/mod_log_debug.so
    #LoadModule log_forensic_module modules/mod_log_forensic.so
    #LoadModule logio_module modules/mod_logio.so
    #LoadModule lua_module modules/mod_lua.so
    LoadModule env_module modules/mod_env.so
    #LoadModule mime_magic_module modules/mod_mime_magic.so
    #LoadModule cern_meta_module modules/mod_cern_meta.so
    #LoadModule expires_module modules/mod_expires.so
    LoadModule headers_module modules/mod_headers.so
    #LoadModule ident_module modules/mod_ident.so
    #LoadModule usertrack_module modules/mod_usertrack.so
    #LoadModule unique_id_module modules/mod_unique_id.so
    LoadModule setenvif_module modules/mod_setenvif.so
    LoadModule version_module modules/mod_version.so
    #LoadModule remoteip_module modules/mod_remoteip.so
    LoadModule proxy_module modules/mod_proxy.so
    LoadModule proxy_connect_module modules/mod_proxy_connect.so
    LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
    LoadModule proxy_http_module modules/mod_proxy_http.so
    LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
    LoadModule proxy_scgi_module modules/mod_proxy_scgi.so
    #LoadModule proxy_fdpass_module modules/mod_proxy_fdpass.so
    LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so
    LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
    LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
    LoadModule proxy_express_module modules/mod_proxy_express.so
    #LoadModule session_module modules/mod_session.so
    #LoadModule session_cookie_module modules/mod_session_cookie.so
    #LoadModule session_crypto_module modules/mod_session_crypto.so
    #LoadModule session_dbd_module modules/mod_session_dbd.so
    LoadModule slotmem_shm_module modules/mod_slotmem_shm.so
    #LoadModule slotmem_plain_module modules/mod_slotmem_plain.so
    #Fuer die cipher suite
    LoadModule ssl_module modules/mod_ssl.so
    #LoadModule dialup_module modules/mod_dialup.so
    LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so
    LoadModule lbmethod_bytraffic_module modules/mod_lbmethod_bytraffic.so
    LoadModule lbmethod_bybusyness_module modules/mod_lbmethod_bybusyness.so
    LoadModule lbmethod_heartbeat_module modules/mod_lbmethod_heartbeat.so
    LoadModule mpm_event_module modules/mod_mpm_event.so
    LoadModule unixd_module modules/mod_unixd.so
    #LoadModule heartbeat_module modules/mod_heartbeat.so
    #LoadModule heartmonitor_module modules/mod_heartmonitor.so
    #1 for svn
    LoadModule dav_module modules/mod_dav.so
    LoadModule status_module modules/mod_status.so
    LoadModule autoindex_module modules/mod_autoindex.so
    #LoadModule asis_module modules/mod_asis.so
    #LoadModule info_module modules/mod_info.so
    #LoadModule suexec_module modules/mod_suexec.so
    #LoadModule cgid_module modules/mod_cgid.so
    #LoadModule cgi_module modules/mod_cgi.so
    #2 for svn
    LoadModule dav_fs_module modules/mod_dav_fs.so
    #LoadModule dav_lock_module modules/mod_dav_lock.so
    #LoadModule vhost_alias_module modules/mod_vhost_alias.so
    LoadModule negotiation_module modules/mod_negotiation.so
    LoadModule dir_module modules/mod_dir.so
    #LoadModule imagemap_module modules/mod_imagemap.so
    #LoadModule actions_module modules/mod_actions.so
    #LoadModule speling_module modules/mod_speling.so
    LoadModule userdir_module modules/mod_userdir.so
    LoadModule alias_module modules/mod_alias.so
    #LoadModule rewrite_module modules/mod_rewrite.so
    #3 for svn
    LoadModule dav_svn_module modules/mod_dav_svn.so
    LoadModule authz_svn_module modules/mod_authz_svn.so
    <IfModule unixd_module>
    # If you wish httpd to run as a different user or group, you must run
    # httpd as root initially and it will switch.
    # User/Group: The name (or #number) of the user/group to run httpd as.
    # It is usually good practice to create a dedicated user and group for
    # running httpd, as with most system services.
    User http
    Group http
    </IfModule>
    # 'Main' server configuration
    # The directives in this section set up the values used by the 'main'
    # server, which responds to any requests that aren't handled by a
    # <VirtualHost> definition. These values also provide defaults for
    # any <VirtualHost> containers you may define later in the file.
    # All of these directives may appear inside <VirtualHost> containers,
    # in which case these default settings will be overridden for the
    # virtual host being defined.
    # ServerAdmin: Your address, where problems with the server should be
    # e-mailed. This address appears on some server-generated pages, such
    # as error documents. e.g. [email protected]
    ServerAdmin [email protected]
    # ServerName gives the name and port that the server uses to identify itself.
    # This can often be determined automatically, but we recommend you specify
    # it explicitly to prevent problems during startup.
    # If your host doesn't have a registered DNS name, enter its IP address here.
    #ServerName www.example.com:80
    # Deny access to the entirety of your server's filesystem. You must
    # explicitly permit access to web content directories in other
    # <Directory> blocks below.
    <Directory />
    AllowOverride none
    Require all denied
    </Directory>
    # Note that from this point forward you must specifically allow
    # particular features to be enabled - so if something's not working as
    # you might expect, make sure that you have specifically enabled it
    # below.
    # DocumentRoot: The directory out of which you will serve your
    # documents. By default, all requests are taken from this directory, but
    # symbolic links and aliases may be used to point to other locations.
    DocumentRoot "/mnt/sda1"
    #<Directory "/mnt/sda1/svn/repos">
    # # Possible values for the Options directive are "None", "All",
    # # or any combination of:
    # # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    # # Note that "MultiViews" must be named *explicitly* --- "Options All"#
    # # doesn't give it to you.
    # # The Options directive is both complicated and important. Please see
    # # http://httpd.apache.org/docs/2.4/mod/core.html#options
    # # for more information.#
    # Options Indexes FollowSymLinks
    # # AllowOverride controls what directives may be placed in .htaccess files.
    # # It can be "All", "None", or any combination of the keywords:
    # # AllowOverride FileInfo AuthConfig Limit
    # AllowOverride None
    # # Controls who can get stuff from this server.
    # Require all granted
    #</Directory>
    # DirectoryIndex: sets the file that Apache will serve if a directory
    # is requested.
    <IfModule dir_module>
    DirectoryIndex index.html
    </IfModule>
    # The following lines prevent .htaccess and .htpasswd files from being
    # viewed by Web clients.
    <Files ".ht*">
    Require all denied
    </Files>
    # ErrorLog: The location of the error log file.
    # If you do not specify an ErrorLog directive within a <VirtualHost>
    # container, error messages relating to that virtual host will be
    # logged here. If you *do* define an error logfile for a <VirtualHost>
    # container, that host's errors will be logged there and not here.
    ErrorLog "/var/log/httpd/error_log"
    # LogLevel: Control the number of messages logged to the error_log.
    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn
    <IfModule log_config_module>
    # The following directives define some format nicknames for use with
    # a CustomLog directive (see below).
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common
    <IfModule logio_module>
    # You need to enable mod_logio.c to use %I and %O
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    </IfModule>
    # The location and format of the access logfile (Common Logfile Format).
    # If you do not define any access logfiles within a <VirtualHost>
    # container, they will be logged here. Contrariwise, if you *do*
    # define per-<VirtualHost> access logfiles, transactions will be
    # logged therein and *not* in this file.
    CustomLog "/var/log/httpd/access_log" common
    # If you prefer a logfile with access, agent, and referer information
    # (Combined Logfile Format) you can use the following directive.
    #CustomLog "/var/log/httpd/access_log" combined
    </IfModule>
    <IfModule alias_module>
    # Redirect: Allows you to tell clients about documents that used to
    # exist in your server's namespace, but do not anymore. The client
    # will make a new request for the document at its new location.
    # Example:
    # Redirect permanent /foo http://www.example.com/bar
    # Alias: Maps web paths into filesystem paths and is used to
    # access content that does not live under the DocumentRoot.
    # Example:
    # Alias /webpath /full/filesystem/path
    # If you include a trailing / on /webpath then the server will
    # require it to be present in the URL. You will also likely
    # need to provide a <Directory> section to allow access to
    # the filesystem path.
    # ScriptAlias: This controls which directories contain server scripts.
    # ScriptAliases are essentially the same as Aliases, except that
    # documents in the target directory are treated as applications and
    # run by the server when requested rather than as documents sent to the
    # client. The same rules about trailing "/" apply to ScriptAlias
    # directives as to Alias.
    ScriptAlias /cgi-bin/ "/srv/http/cgi-bin/"
    </IfModule>
    <IfModule cgid_module>
    # ScriptSock: On threaded servers, designate the path to the UNIX
    # socket used to communicate with the CGI daemon of mod_cgid.
    #Scriptsock cgisock
    </IfModule>
    # "/srv/http/cgi-bin" should be changed to whatever your ScriptAliased
    # CGI directory exists, if you have that configured.
    <Directory "/srv/http/cgi-bin">
    AllowOverride None
    Options None
    Require all granted
    </Directory>
    <IfModule mime_module>
    # TypesConfig points to the file containing the list of mappings from
    # filename extension to MIME-type.
    TypesConfig conf/mime.types
    # AddType allows you to add to or override the MIME configuration
    # file specified in TypesConfig for specific file types.
    #AddType application/x-gzip .tgz
    # AddEncoding allows you to have certain browsers uncompress
    # information on the fly. Note: Not all browsers support this.
    #AddEncoding x-compress .Z
    #AddEncoding x-gzip .gz .tgz
    # If the AddEncoding directives above are commented-out, then you
    # probably should define those extensions to indicate media types:
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
    # AddHandler allows you to map certain file extensions to "handlers":
    # actions unrelated to filetype. These can be either built into the server
    # or added with the Action directive (see below)
    # To use CGI scripts outside of ScriptAliased directories:
    # (You will also need to add "ExecCGI" to the "Options" directive.)
    #AddHandler cgi-script .cgi
    # For type maps (negotiated resources):
    #AddHandler type-map var
    # Filters allow you to process content before it is sent to the client.
    # To parse .shtml files for server-side includes (SSI):
    # (You will also need to add "Includes" to the "Options" directive.)
    #AddType text/html .shtml
    #AddOutputFilter INCLUDES .shtml
    </IfModule>
    # The mod_mime_magic module allows the server to use various hints from the
    # contents of the file itself to determine its type. The MIMEMagicFile
    # directive tells the module where the hint definitions are located.
    #MIMEMagicFile conf/magic
    # Customizable error responses come in three flavors:
    # 1) plain text 2) local redirects 3) external redirects
    # Some examples:
    #ErrorDocument 500 "The server made a boo boo."
    #ErrorDocument 404 /missing.html
    #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
    #ErrorDocument 402 http://www.example.com/subscription_info.html
    # MaxRanges: Maximum number of Ranges in a request before
    # returning the entire resource, or one of the special
    # values 'default', 'none' or 'unlimited'.
    # Default setting is to accept 200 Ranges.
    #MaxRanges unlimited
    # EnableMMAP and EnableSendfile: On systems that support it,
    # memory-mapping or the sendfile syscall may be used to deliver
    # files. This usually improves server performance, but must
    # be turned off when serving from networked-mounted
    # filesystems or if support for these functions is otherwise
    # broken on your system.
    # Defaults: EnableMMAP On, EnableSendfile Off
    #EnableMMAP off
    #EnableSendfile on
    # Supplemental configuration
    # The configuration files in the conf/extra/ directory can be
    # included to add extra features or to modify the default configuration of
    # the server, or you may simply copy their contents here and change as
    # necessary.
    # Server-pool management (MPM specific)
    Include conf/extra/httpd-mpm.conf
    # Multi-language error messages
    Include conf/extra/httpd-multilang-errordoc.conf
    # Fancy directory listings
    Include conf/extra/httpd-autoindex.conf
    # Language settings
    Include conf/extra/httpd-languages.conf
    # User home directories
    Include conf/extra/httpd-userdir.conf
    # Real-time info on requests and configuration
    #Include conf/extra/httpd-info.conf
    # Virtual hosts
    #Include conf/extra/httpd-vhosts.conf
    # Local access to the Apache HTTP Server Manual
    #Include conf/extra/httpd-manual.conf
    # Distributed authoring and versioning (WebDAV)
    #Include conf/extra/httpd-dav.conf
    # Various default settings
    Include conf/extra/httpd-default.conf
    # Configure mod_proxy_html to understand HTML4/XHTML1
    <IfModule proxy_html_module>
    Include conf/extra/proxy-html.conf
    </IfModule>
    # Secure (SSL/TLS) connections
    Include /etc/httpd/conf/extra/httpd-ssl.conf
    # Note: The following must must be present to support
    # starting without SSL on platforms with no /dev/random equivalent
    # but a statically compiled-in mod_ssl.
    <IfModule ssl_module>
    SSLRandomSeed startup builtin
    SSLRandomSeed connect builtin
    </IfModule>
    # uncomment out the below to deal with user agents that deliberately
    # violate open standards by misusing DNT (DNT *must* be a specific
    # end-user choice)
    #<IfModule setenvif_module>
    #BrowserMatch "MSIE 10.0;" bad_DNT
    #</IfModule>
    #<IfModule headers_module>
    #RequestHeader unset DNT env=bad_DNT
    #</IfModule>
    Edit: inserted tl;dr
    Last edited by arch_on_pi (2014-05-18 21:33:24)

    Remember that Arch Arm is a different distribution, but we try to bend the rules and provide limited support for them.  This may or may not be unique to Arch Arm, so you might try asking on their forums as well.

  • Help on how to read the content of an XML file from the payload

    I have a receiver channel / mail adapter, that sends e-mails with a XML attachment.
    I’m trying to write a Bean, that should make it possible to rename the attached XML file dynamically.
    In the Bean I want to read the content of the attached XML file, it could be the “order number”.
    The filename should then be “Order number”.XML.
    <u><i>Can anyone help me with how to read the content of the XML file from the payload.</i></u>
    <i><b>Frank</b></i>

    hi,
    check this: http://jakarta.apache.org/poi/

  • Catch all error information while validating xml content with xsd schema

    Hi experts,
    I created a java mapping to validating the input xml content with xsd schema (schema validation). What I want is to catch all error message to the xml not just the first error. I used SAXParser in sapxmltoolkit.jar to do the schema validation. The below is a part of my java mapping.
    XMLReader parser = XMLReaderFactory.createXMLReader("com.sap.engine.lib.xml.parser.SAXParser");
    parser.setFeature( "http://xml.org/sax/features/validation" ,  true);
    parser.setFeature( "http://apache.org/xml/features/validation/schema" , true);
    parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema");          parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaSource",this.getClass().getClassLoader().getResourceAsStream(schema)); // schema is my schema name
    parser.setErrorHandler(new ParseErrorHandler()); // ParseErrorHandler is my own ErrorHandler which extends DefaultHandler
    parser.parse(new InputSource(new ByteArrayInputStream(sinput.getBytes())));
    // In error handler, I comment all code so as not to throw any exception
    public class ParseErrorHandler extends DefaultHandler
         public void error(SAXParseException e) throws SAXException
              // sSystem.out.println("Error" + e.getMessage());
              // throw e;
         public void fatalError(SAXParseException e)
              // throw e;
              // System.out.println("SAP Fatal Error" + e.getMessage());
    Unfortunately the program always stopped while catching the first error. Check the below log.
    com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException:
    ERRORS :
    cvc-simple-type : information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' is not valid, because it's value does not satisfy the constraints of facet 'minLength' with value '1'.
    cvc-data : information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' is is not valid with respoct to the corresponding simple type definition.
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' is associated with invalid data.
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]' is not valid with respect to it's complex type definition..
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]' is not valid with respect to it's complex type definition..
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]/:To[1]' is not valid with respect to it's complex type definition..
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]' is not valid with respect to it's complex type definition..
    cvc-element : element information item '/:ShipNotice[1]' is not valid with respect to it's complex type definition..
    -> com.sap.engine.lib.xml.parser.ParserException:
    I tried using Xerces and JAXP to do validation, the same error happened. I have no idea on this. Does xi has its own error handler logic? Is there any body can make me get out of this?
    Thanks.

    <h6>Hi experts,
    <h6>
    <h6>I created a java mapping to validating the input xml content with xsd schema (schema validation). What I want is to catch all <h6>error message to the xml not just the first error. I used SAXParser in sapxmltoolkit.jar to do the schema validation. The below <h6>is a part of my java mapping.
    <h6>XMLReader parser = XMLReaderFactory.createXMLReader("com.sap.engine.lib.xml.parser.SAXParser");
    <h6>parser.setFeature( "http://xml.org/sax/features/validation" ,  true);
    <h6>parser.setFeature( "http://apache.org/xml/features/validation/schema" , true);
    <h6>parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema");          <h6>parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaSource",this.getClass().getClassLoader().getResourceAsStream(schema)); <h6>// schema is my schema name
    <h6>parser.setErrorHandler(new ParseErrorHandler()); // ParseErrorHandler is my own ErrorHandler which extends Default Handler
    <h6>parser.parse(new InputSource(new ByteArrayInputStream(sinput.getBytes())));
    <h6>
    <h6>// In error handler, I comment all code so as not to throw any exception
    <h6>public class ParseErrorHandler extends DefaultHandler
    <h6>{
    <h6>     public void error(SAXParseException e) throws SAXException
    <h6>     {
    <h6>          // sSystem.out.println("Error" + e.getMessage());
    <h6>          // throw e;
    <h6>     }
    <h6>
    <h6>     public void fatalError(SAXParseException e)
    <h6>     {
    <h6>          // throw e;
    <h6>          // System.out.println("SAP Fatal Error" + e.getMessage());
    <h6>
    <h6>     }
    <h6>
    <h6>}
    <h6>
    <h6>Unfortunately the program always stopped while catching the first error. Check the below log.
    <h6>
    <h6>com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException:
    <h6>ERRORS :
    <h6>cvc-simple-type : information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' <h6>is not valid, because it's value does not satisfy the constraints of facet 'minLength' with value '1'.
    <h6>cvc-data : information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' <h6>is is not valid with respoct to the corresponding simple type definition.
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' <h6>is associated with invalid data.
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]' <h6>is not valid with respect to it's complex type definition..
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]' <h6>is not valid with respect to it's complex type definition..
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]' <h6>is not valid with respect to it's complex type definition..
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]' <h6>is not valid with respect to it's complex type definition..
    <h6>cvc-element : element information item '/:ShipNotice[1]' is not valid with <h6>respect to it's complex type definition..
    <h6> -> com.sap.engine.lib.xml.parser.ParserException:
    <h6>
    <h6>
    <h6>I tried using Xerces and JAXP to do validation, the same error happened. I have no idea on this. Does xi has its own error <h6>handler logic? Is there any body can make me get out of this?
    <h6>Thanks.

  • I Need PHP 5.3 no longer avail in a VC6 compatable with Apache 2.2.15

    I appologize if this question is already answered somewhere (I did search a bit)..
    1. I have written a significant amount of my site using functions only available in PHP 5.3+ (ie not in PHP5.2)
    ( see php.net /manual/en/migration53.new-features.php )
    2. PHP (in thier infinite wisdom) have decicided that not only is there no longer a VC6 (ie Apache 2.2.15 compatable) build of php 5.3.6 but they removed the 5.3.3 build and are offering only 5.2.17 in a VC6 build suitable for use with the version of Apache built into FMS4.
    (see windows.php.net/download/ and note the lines:
    Do NOT use VC9 version with apache.org binaries.
    and
    VC9 versions of Apache can be fetched at Apache Lounge. We use their binaries to build the Apache SAPIs.)
    3. The FMS4 documentation says:
    (see help.adobe.com/en_US/flashmediaserver/configadmin/WSE2A5A7B9-E118-496f-92F9-E295038DB7DB. html#WS02f7d8d4857b1677-469e53bb12984254411-8000
    The recommended approach to upgrading the Apache web server is to install or build the Apache server in a directory that is separate from the existing server. Then copy the contents of newly-installed directories to the existing server.
    In most cases, you do not replace the existing Apache configuration files with the newer versions of these files. This is because the Apache web server installation for Flash Media Server is pre-configured with specific modules and settings.)
    My Question is:
    Does this even work? I sounds like a REALY BAD idea to me to instal a version of Apache built to use the Visual C 9 runtime and then kludge in an httpd.conf file that starts loading modules that were built to interact with a version that uses the Visual C 6 library. Has anyone actually done this successfully???
    I don't blame the FMS developers here (well except for the really bad idea of making Apache "part" of the FMS package in the first place) but you a shipping with a version of Apache that is incompatable with PHP! (OK, the _latest versions_ of PHP.. but that still makes this _your_ problem.. and a big problem at that if you ask me).
    Suggestions?

    # This section includes everything in the Apache 2.2.19 httpd.conf file's module load section.
    # The modules named in the FMS version of the httpd.conf file are _almost_ a subset of the 2.2.19 collection but
    # many statements are "live" only in the FMS version.
    # The numbers in parentheses are line numbers in the indicated httpd.conf file
    # 2.2.19(60) LoadModule actions_module modules/mod_actions.so
    # FMS(136)
    LoadModule actions_module modules/mod_actions.so
    # 2.2.19(61) LoadModule alias_module modules/mod_alias.so
    # FMS(137)
    LoadModule alias_module modules/mod_alias.so
    # 2.2.19(62) LoadModule asis_module modules/mod_asis.so
    # FMS(138)
    LoadModule asis_module modules/mod_asis.so
    # 2.2.19(63) LoadModule auth_basic_module modules/mod_auth_basic.so
    # FMS(139)
    LoadModule auth_basic_module modules/mod_auth_basic.so
    # 2.2.19(64) #LoadModule auth_digest_module modules/mod_auth_digest.so
    # FMS(140)
    LoadModule auth_digest_module modules/mod_auth_digest.so
    # 2.2.19(65) #LoadModule authn_alias_module modules/mod_authn_alias.so
    # 2.2.19(66) #LoadModule authn_anon_module modules/mod_authn_anon.so
    # FMS(141)
    LoadModule authn_anon_module modules/mod_authn_anon.so
    # 2.2.19(67) #LoadModule authn_dbd_module modules/mod_authn_dbd.so
    # 2.2.19(68) #LoadModule authn_dbm_module modules/mod_authn_dbm.so
    # FMS(142) #LoadModule authn_dbm_module modules/mod_authn_dbm.so
    # 2.2.19(69) LoadModule authn_default_module modules/mod_authn_default.so
    # FMS(143)
    LoadModule authn_default_module modules/mod_authn_default.so
    # 2.2.19(70) LoadModule authn_file_module modules/mod_authn_file.so
    # FMS(144)
    LoadModule authn_file_module modules/mod_authn_file.so
    # 2.2.19(71) #LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
    # 2.2.19(72) #LoadModule authz_dbm_module modules/mod_authz_dbm.so
    # FMS(145) #LoadModule authz_dbm_module modules/mod_authz_dbm.so
    # 2.2.19(73) LoadModule authz_default_module modules/mod_authz_default.so
    # FMS(146)
    LoadModule authz_default_module modules/mod_authz_default.so
    # 2.2.19(74) LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
    # FMS(147)
    LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
    # 2.2.19(75) LoadModule authz_host_module modules/mod_authz_host.so
    # FMS(148)
    LoadModule authz_host_module modules/mod_authz_host.so
    # 2.2.19(76) #LoadModule authz_owner_module modules/mod_authz_owner.so
    # 2.2.19(77) LoadModule authz_user_module modules/mod_authz_user.so
    # FMS(149)
    LoadModule authz_user_module modules/mod_authz_user.so
    # 2.2.19(78) LoadModule autoindex_module modules/mod_autoindex.so
    # FMS(150)
    LoadModule autoindex_module modules/mod_autoindex.so
    # 2.2.19(79) #LoadModule cache_module modules/mod_cache.so
    # 2.2.19(80) #LoadModule cern_meta_module modules/mod_cern_meta.so
    # FMS(151) #LoadModule cern_meta_module modules/mod_cern_meta.so
    # 2.2.19(81) LoadModule cgi_module modules/mod_cgi.so
    # FMS(152..154)
    <IfModule mpm_winnt_module>
    LoadModule cgi_module modules/mod_cgi.so
    </IfModule>
    # FMS(155..157)
    <IfModule worker_module>
    LoadModule cgid_module modules/mod_cgid.so
    </IfModule>
    # 2.2.19(82) #LoadModule charset_lite_module modules/mod_charset_lite.so
    # 2.2.19(83) #LoadModule dav_module modules/mod_dav.so
    # FMS(158)
    LoadModule dav_module modules/mod_dav.so
    # 2.2.19(84) #LoadModule dav_fs_module modules/mod_dav_fs.so
    # FMS(159)
    LoadModule dav_fs_module modules/mod_dav_fs.so
    # 2.2.19(85) #LoadModule dav_lock_module modules/mod_dav_lock.so
    # 2.2.19(86) #LoadModule dbd_module modules/mod_dbd.so
    # 2.2.19(87) #LoadModule deflate_module modules/mod_deflate.so
    # FMS(160)
    LoadModule deflate_module modules/mod_deflate.so
    # 2.2.19(88) LoadModule dir_module modules/mod_dir.so
    # FMS(161)
    LoadModule dir_module modules/mod_dir.so
    # 2.2.19(89) #LoadModule disk_cache_module modules/mod_disk_cache.so
    # 2.2.19(90) #LoadModule dumpio_module modules/mod_dumpio.so
    # 2.2.19(91) LoadModule env_module modules/mod_env.so
    # FMS(162)
    LoadModule env_module modules/mod_env.so
    # 2.2.19(92) #LoadModule expires_module modules/mod_expires.so
    # FMS(163) #LoadModule expires_module modules/mod_expires.so
    # 2.2.19(93) #LoadModule ext_filter_module modules/mod_ext_filter.so
    # 2.2.19(94) #LoadModule file_cache_module modules/mod_file_cache.so
    # FMS(164) #LoadModule file_cache_module modules/mod_file_cache.so
    # 2.2.19(95) #LoadModule filter_module modules/mod_filter.so
    # 2.2.19(96) #LoadModule headers_module modules/mod_headers.so
    # FMS(165) #LoadModule headers_module modules/mod_headers.so
    # 2.2.19(97) #LoadModule ident_module modules/mod_ident.so
    # 2.2.19(98) #LoadModule imagemap_module modules/mod_imagemap.so
    # FMS(166)
    LoadModule imagemap_module modules/mod_imagemap.so
    # 2.2.19(99) LoadModule include_module modules/mod_include.so
    # FMS(167)
    LoadModule include_module modules/mod_include.so
    # 2.2.19(100) #LoadModule info_module modules/mod_info.so
    # FMS(168)
    LoadModule info_module modules/mod_info.so
    # 2.2.19(101) LoadModule isapi_module modules/mod_isapi.so
    # FMS(169..171)
    <IfModule mpm_winnt_module>
    LoadModule isapi_module modules/mod_isapi.so
    </IfModule>
    # 2.2.19(102) #LoadModule ldap_module modules/mod_ldap.so
    # 2.2.19(103) #LoadModule logio_module modules/mod_logio.so
    # 2.2.19(104) LoadModule log_config_module modules/mod_log_config.so
    # FMS(172)
    LoadModule log_config_module modules/mod_log_config.so
    # 2.2.19(105) #LoadModule log_forensic_module modules/mod_log_forensic.so
    # 2.2.19(106) #LoadModule mem_cache_module modules/mod_mem_cache.so
    # 2.2.19(107) LoadModule mime_module modules/mod_mime.so
    # FMS(173)
    LoadModule mime_module modules/mod_mime.so
    # 2.2.19(108) #LoadModule mime_magic_module modules/mod_mime_magic.so
    # FMS(174)
    LoadModule mime_magic_module modules/mod_mime_magic.so
    # 2.2.19(109) LoadModule negotiation_module modules/mod_negotiation.so
    # FMS(181)
    LoadModule negotiation_module modules/mod_negotiation.so
    # 2.2.19(110) #LoadModule proxy_module modules/mod_proxy.so
    # FMS(175) #LoadModule proxy_module modules/mod_proxy.so
    # 2.2.19(111) #LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
    # FMS(176) #LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
    # 2.2.19(112) #LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
    # FMS(177) #LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
    # 2.2.19(113) #LoadModule proxy_connect_module modules/mod_proxy_connect.so
    # FMS(178) #LoadModule proxy_connect_module modules/mod_proxy_connect.so
    # 2.2.19(114) #LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
    # FMS(180) #LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
    # 2.2.19(115) #LoadModule proxy_http_module modules/mod_proxy_http.so
    # FMS(179) #LoadModule proxy_http_module modules/mod_proxy_http.so
    # 2.2.19(116) #LoadModule proxy_scgi_module modules/mod_proxy_scgi.so
    # 2.2.19(117) #LoadModule reqtimeout_module modules/mod_reqtimeout.so
    # 2.2.19(118) #LoadModule rewrite_module modules/mod_rewrite.so
    # FMS(182)
    LoadModule rewrite_module modules/mod_rewrite.so
    # 2.2.19(119) LoadModule setenvif_module modules/mod_setenvif.so
    # FMS(183)
    LoadModule setenvif_module modules/mod_setenvif.so
    # 2.2.19(120) #LoadModule speling_module modules/mod_speling.so
    # FMS(184) #LoadModule speling_module modules/mod_speling.so
    # 2.2.19(121) #LoadModule ssl_module modules/mod_ssl.so
    # FMS(190) #LoadModule ssl_module modules/mod_ssl.so
    # 2.2.19(122) #LoadModule status_module modules/mod_status.so
    # FMS(185)
    LoadModule status_module modules/mod_status.so
    # 2.2.19(123) #LoadModule substitute_module modules/mod_substitute.so
    # 2.2.19(124) #LoadModule unique_id_module modules/mod_unique_id.so
    # FMS(186)
    LoadModule unique_id_module modules/mod_unique_id.so
    # 2.2.19(125) #LoadModule userdir_module modules/mod_userdir.so
    # FMS(187)
    LoadModule userdir_module modules/mod_userdir.so
    # 2.2.19(126) #LoadModule usertrack_module modules/mod_usertrack.so
    # FMS(188) #LoadModule usertrack_module modules/mod_usertrack.so
    # 2.2.19(127) #LoadModule version_module modules/mod_version.so
    # 2.2.19(128) #LoadModule vhost_alias_module modules/mod_vhost_alias.so
    # FMS(189) #LoadModule vhost_alias_module modules/mod_vhost_alias.so
    # FMS(191)
    LoadModule f4fhttp_module modules/mod_f4fhttp.so
    # This section includes items that appear in _BOTH_ in the FMS version of httpd.conf and the 2.2.19 version
    # The numbers in parentheses are line numbers in the indicated httpd.conf file.
    # In some case the lines appear identically in both versions.
    # In some case the changes are not simple alternatives (see mpm_winnt_module for example)
    # 2.2.19(46)
    # Listen 80
    # FMS(12)
    Listen 8134
    # 2.2.19(130..144)
    # <IfModule !mpm_netware_module>
    # <IfModule !mpm_winnt_module>
    # User daemon
    # Group daemon
    # </IfModule>
    # </IfModule>
    # FMS(123..126)
    <IfModule mpm_winnt_module>
    ThreadsPerChild 250
    MaxRequestsPerChild 0
    </IfModule>
    # 2.2.19(179)
    # DocumentRoot "c:/Apache2/htdocs"
    # FMS(39)
    DocumentRoot "../webroot"
    # 2.2.19(189..194)
    # <Directory />
    #     Options FollowSymLinks
    #     AllowOverride None
    #     Order deny,allow
    #     Deny from all
    # </Directory>
    # FMS(43..50)
    <Directory />
    Options FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
    Satisfy all
    </Directory>
    # 2.2.19(206..234)
    # <Directory "c:/Apache2/htdocs">
    #     Options Indexes FollowSymLinks
    #     AllowOverride None
    #     Order allow,deny
    #     Allow from all
    # </Directory>
    # FMS(51..56)
    <Directory "../webroot">
    Options -Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
    </Directory>
    # 2.2.19(240.242)
    # <IfModule dir_module>
    #     DirectoryIndex index.html
    # </IfModule>
    # FMS(41)
    DirectoryIndex index.html index.html.var index.php index.php3 index.php4 index.php5 index.py index.pl index.rb
    # 2.2.19(248..252)
    # <FilesMatch "^\.ht">
    #     Order allow,deny
    #     Deny from all
    #     Satisfy All
    # </FilesMatch>
    # FMS(118..121)
    <FilesMatch "^\.ht">
    Order allow,deny
    Deny from all
    </FilesMatch>
    # 2.2.19(261)
    # ErrorLog "logs/error.log"
    # FMS(34)
    ErrorLog logs/error_log
    # 2.2.19(268)
    # LogLevel warn
    # FMS(35)
    LogLevel info
    # 2.2.19(270..297)
    # <IfModule log_config_module>
    #     LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    #     LogFormat "%h %l %u %t \"%r\" %>s %b" common
    #     <IfModule logio_module>
    #       LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    #     </IfModule>
    #     CustomLog "logs/access.log" common
    # </IfModule>
    # FMS(36..37)
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    CustomLog logs/access_log combined
    # 2.2.19(299..328)
    # <IfModule alias_module>
    #     ScriptAlias /cgi-bin/ "c:/Apache2/cgi-bin/"
    # </IfModule>
    # FMS(77)
    ScriptAlias /cgi-bin/ "cgi-bin/"
    # 2.2.19(342..347)
    # <Directory "c:/Apache2/cgi-bin">
    #     AllowOverride None
    #     Options None
    #     Order allow,deny
    #     Allow from all
    # </Directory>
    # FMS(78..83)
    <Directory "cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
    </Directory>
    # 2.2.19(358)
    # DefaultType text/plain
    # FMS(196)
    DefaultType text/plain
    # 2.2.19(360..406)
    # <IfModule mime_module>
    #     TypesConfig conf/mime.types
    #     #AddEncoding x-compress .Z
    #     #AddEncoding x-gzip .gz .tgz
    #     AddType application/x-compress .Z
    #     AddType application/x-gzip .gz .tgz
    #     #AddHandler cgi-script .cgi
    #     #AddHandler type-map var
    #     #AddType text/html .shtml
    #     #AddOutputFilter INCLUDES .shtml
    # </IfModule>
    # FMS(194)
    TypesConfig conf/mime.types
    # FMS(200..201)
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
    # FMS(204..206)
    AddHandler type-map var
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
    # 2.2.19(413)
    #MIMEMagicFile conf/magic
    # FMS(195)
    MIMEMagicFile conf/magic
    # 2.2.19(474..484)
    # <IfModule ssl_module>
    # SSLRandomSeed startup builtin
    # SSLRandomSeed connect builtin
    # </IfModule>
    # FMS(208.211)
    <IfModule ssl_module>
    SSLRandomSeed startup builtin
    SSLRandomSeed connect builtin
    </IfModule>

  • What to Do Now That I've Got Structured Content?

    Hello FrameMaker Gurus.
    I've been working as a lone writer for a software company for many years. We have a 1300 page product manual that was originally authored in unstructured FrameMaker. We then use WebWorks to generate "Webhelp" that is both hosted online publically and installable with the software. You can see it here:
    http://www.tableausoftware.com/currentonlinehelp
    In preparation for multiple writers as well as multiple products, I have since converted the content to structured XML using the DITA DTD. I still author in Structured FrameMaker working from the XML files. I am now considering my options for how to generate the final output. My problem with webhelp templates is that the output is a framed help system connected by javascript links. That format makes it difficult to get the help pages to be indexed by search engines because they cannot get into the frames and if they do they cannot follow the javascript links. Further, webhelp output is isolated from our other UA content on the corporate website (e.g., knowledge base articles, forums, etc.). Our customers need to be able to search across all of these resources. The webhelp is a stand alone system with its own search. Additionally, we would like to have more cross linking into the help pages from other sources. The framed webhelp seems to make those deep dive links difficult. Finally, the look and feel of most webhelp (even with a fair amount of CSS/customization) is clunky at best. 1999 called, they want their help system back.
    My thinking is that in order to get a help system that is easily indexable by search engines and integrates with our other content (managed by Drupal), I will have to generate unframed HTML pages that have the TOC built into the pages. Then I can either point a search appliance at it to unify Drupal content and help content in a single search or I can import the HTML into Drupal as part of my publish process. The HTML pages would be generated using the DITA open toolkit and custom XSLT stylesheets to do the transform.
    Those pieces are outside of my technical skill level and would require a lot of time and money to put together. Before going down that route, I am trying to learn what other people do once they've gotten to an XML source using Structured FrameMaker. Does everyone just generate webhelp and be happy with it? If so, are they using DITA open toolkit or are they using other tools? How do they solve the search problems associated with webhep?
    Any advice will be greatly appreciated. I don't want to dig down a hole of custom development to design the perfect help pages before I know that the solution is not already out there.
    Thanks,
    Erin

    Dimi,
    First question to ask is "Can DUPAL do batch  importing (as in import this folder) of XHTML (and associated graphics/media files)?"
        ==> If yes, then sub questions.
    Second question:  Does DRUPAL do automatic overwrites of previously loaded XHTML files?  This is important because a DITA => XHTML will regenerate a lot of content with identical filenames which then have to be replaced in the DRUPAL database.  However, this is a tricky question because I think DRUPAL can be used to track changes and cooperative editing.  If you are using this feature, then the question should be re-phrased to take that into account.  
        ==>  If yes you really don't need much else.  Just use the DITA-OT to dump XHTML (very reliable).  In a reasonable universe everything should be fine.  
    Third question
    Also visit this site:    http://www.ditainfo.info/  It is an implementation of a FrameMaker / DITA authoring system with publishing to DRUPAL.  
    Other comments
    Personally I would not trust MS-Word  to produce HTML for any commercial purpose unless your IT department can guanrantee a total lock down (no updates  without prior testing for impact on production) on every installation of MS-Word used in the production, and in some cases the feed-in to the production process.  MS Word is, IMH-but-experienced opinion, the most expensive authoring tool on the planet. 
    The problem with  authouring tools like MS Word, even FrameMaker (but see note ** below), is that the SW provider can change the HTML output at anytime (but see note *** below).  Most likely this will happen a few hours before a major deadline.   I've wasted too much trying to get predictable results from MS Word in it's HTML output.  Things may have improved somewhat since the introduction of .docx, but not that I've seen -- though I have to admit I have not taken a very close look at it recently.
    However, if the authoring system changes to be authouring of small chunks of information in many many many files extracted from a CMS, then MS Word might be able to handle that, especially if you can automate the imposition of an MS WORD styles sheet + automate post-HTML production clean up or the CMS and MS Word comes as a complete system.  But, if you do this then you may as well stick with DITA XML in FrameMaker or any one of the other DITA authouring tools (as long as they produce valid DITA XML) (see note * below) .   Doing that will 
    reduce maintenance
    reduce debugging cost
    improve testability of the suite
    improve predictability
    improve production to XHTML
    liberate you from vendor-specific authouring and production tools
    and will be much cheaper in the long run.  
    These benefits alll come from the fact that you are dealing with knowable inputs to production if you use DITA XML and a processing engine like the DITA-OT.  Yes, both get updated, but you do not have to accespt the update on the SW providers terms.  If you don't want to upgrade to the latest DITA or DITA-OT, then don't.  This is not true of MS Word and similar programs.  
    Which leaves you with the problem of getting stuff into DRUPAL.  Check the link above for more info or go to one of the DRUPAL forums.   
    Finally, you should test the idea of authouring in DITA and exporting to MS Word DOCX format.  oXygen I think has a default transform that does this.  Also FrameMaker 10 has a pretty good Save As Word function.   The oXygen DITA-OT transform will generate predictable stable MS Word.   The FrameMaker save As Word is subject to the same updating problem mentioned in relation to HTML. 
    Hope that helps
    *   "valid" is critically important.  Valid means that the structured and all required elements and attributes are present in a way that programs like DITA-OT have been designed to handle.   Any DITA file can be opened and edited in any good DITA authouring tool.  Valid is not "well formed".  Well formed wasa a concept floating around a while ago that tried to say each XML statement had a start and stop and was validly nested.  However, well formed does not require a pre-defined structure.  
    **  I would not trust MS Word  or FrameMaker for HTML production because of the automatic update problem -- you cannot predict what the output will be after the update.  However, FrameMaker remains an excellent choice for authoring DITA (as are many other tools) because they should always save to valid DITA (otherwise it  whines and whines and whines ... a good thing).  This is almost true    but certainly in the case of FrameMaker, close enough for most purposes.  I have always been very impressed with FrameMaker's capability of inserting and using tool-specific XML code into a document without interfering with the validity of the DITA XML in the document.   It enhances the DITA authouring experience without sacrificing portability.    Therefore, since your production of XHTML will be from the DITA XML, not FrameMaker, you will find yourself in a very  safe, happy,  place. 
    *** Rather than use MS Word to produce the XHTML, you could use the XML in the .docx files to produce the XHTML.  My company has done that (docx => DITA => XHTML) and it can work quite well if authours stick with certain styles.  This at least gets around the problem of trusting MS Word to produce the XHTML. 

  • Read the content of a file (via socket)

    Hi,
    I need to read the content of a file (.txt, or better, .jpg) and to write it again in another file.
    I have this code (in Javascript):
        conn = new Socket;
        conn.encoding = "BINARY";
        if (conn.open ("127.0.0.1:8888")) {
        conn.timeout=30;
        conn.writeln("GET variousFiles/file.jpg HTTP/1.1");
        reply = conn.read(999999);
        conn.close();
        var file = new File("C:/APPS/New_File.txt");
        file.encoding = 'BINARY';
        var open_file = file.open("w+");
        file.write(reply);
        } else { alert("Errore: " + conn2.error); }
    However my new file is always empty, because I can not read the content of the first file.
    My variable "reply" is always empty.
    Thanks and best regards.

    There is a particular case with sugested function, if content is generated on the fly by the server -php, cgi, etc.-
    In this case, http server doesn´t knows total size of response data, so response shows a chunked transfer-encoding header and data is parted in chunks, each one starting with it´s size, and following the data.
    HTTP/1.1 200 OK
    Date: Tue, 30 Apr 2013 12:43:41 GMT
    Server: Apache/1.3.31 (Win32) mod_fastcgi/2.4.1
    Connection: close
    Transfer-Encoding: chunked
    Content-Type: image/jpeg
    f49
    ÿØÿà  JFIF
    I´m using this function to decode parted response, with initial chunkedString with firs chunk size; in this case, f49:
    PartsSeparator="\r\n";
    function getPartedBody(partedBodyString) {
        var separatorPosition=partedBodyString.indexOf(PartsSeparator);
        var chunkSize=new Number("0x"+partedBodyString.substring(0,separatorPosition));
        separatorPosition+=PartsSeparator.length;
        var bodyString=new String("BINARY");
        bodyString="";
        if (chunkSize>0)
            bodyString=partedBodyString.substring(separatorPosition,separatorPosition+chunkSize)+
                getChunkedResponse(partedBodyString.substring(separatorPosition+chunkSize+PartsSeparator. length));
        return bodyString;
    Hope this helps
    regards

Maybe you are looking for

  • How to delete a row in the table in servlets

    I have met a problem in deleting a row in table using servlets. My table looks like this: ID Name Type 12 Milienium S 15 USIA O My code looks like this: String query = "SELECT * FROM tb_Funds"; rs = statement.executeQuery(query); while(rs.next()) {  

  • Quicktime on Windows clients can't open files in folders with long names!!

    Hi, we've got a really strange problem. We have an Intel Xserve with Leopard Server 10.5.4 which is sharing files over SMB. Everything works fine, except Quicktime on Windows clients (XP Pro and Vista). It looks like the length of the folder names is

  • InDesign CC crashing when exporting file to idml

    I am working on a large document (600+ pages). Whenever I export to idml InDesign crashes. It always crashes when the progress bar is at about 24%. I am able to export to PDF with no issues and also save as a new indd file with no issues. I am using

  • No Sound in Fedora Linux with flash-plugin-9.0.115.0

    Hi ... I've checked everything I think I can ... I have alsa configured and that works ... confirmed with mplayer: mplayer -ao alsa:device=INTERNAL http://wnyc2.streamguys.com:80 Yet no sound from flash ??? Flash 7 was working fine .... Thoughts???

  • Difference between FI01 and FBZP

    Hi, My friends, I would like to know what is the real diference between using the transactions: FI01 (insert a bank in SAP). There are a LOT (16.000) of banks in my enviroment FBZP > House Bank.  There are only 4 banks in my environment I ask that be