Reading binary content from HTTP?

As long as i read text (ascii) data from a HttpURLConnection, the resulting stream (written to a file) is okay (readable). but when i want to read a PDF file with the same code, the written output file is not readable with the Acrobat reader (file type not supported or file corrupted):
                //read data from HTTP server:
                InputStream is = null;
                HttpURLConnection con = null;
                try {
                    System.out.print(key+": connecting ...");
                    con = (HttpURLConnection) url.openConnection();
                    if (con instanceof HttpsURLConnection) { //HTTPS URL?
                        //avoid "java.io.IOException: HTTPS hostname wrong:  should be <217.5.135.142>"
                        ((HttpsURLConnection) con).setHostnameVerifier(new HostnameVerifier() {
                            public boolean verify(String hostname, SSLSession session) {
                                return true;
                    System.out.print(" reading ...");
                    try {
                        is = con.getInputStream();
                        try { //in case input stream is compressed via GZIP:
                            is = new GZIPInputStream(is);
                        } catch (IOException ioe) {
                            //ignore (input stream is not GZIP compressed)
                    } catch (IOException ioe) {
                        System.err.println("Error getting input stream. HTTP return code: "+con.getResponseCode()+" ("+con.getResponseMessage()+"). "+ ioe);
                        return;
                    IOUtils.writeStream(is, os);
                } catch (Exception e) {
                    System.err.println("\nError getting content from URL: " + e);
                    return;
                } finally {
                    if (is != null) { try { is.close(); } catch (IOException ioe) { ioe.printStackTrace(System.err); } }
                    if (con != null) { try { con.disconnect(); } catch (Exception e) { e.printStackTrace(System.err); } }
                    if (os != null) { try { os.close(); } catch (IOException ioe) { ioe.printStackTrace(System.err); } }
                }when i open the written pdf file with a text editor, i noticed the the first line is
DF-1.4
so, the first character "P" is missing. but even when i add the "P" in the text file and save it, Acrobat Reader shows the same error.
is there another way to load binary data from a HttpUrlConnection and/or write it to a file?

yes, it's simple and works with text/ascii content from URLS:
     public static void writeStream(InputStream inputStream, OutputStream outputStream) throws IOException {
        if (inputStream != null && outputStream != null) {
            int count;
            byte[] bytes = new byte[128];
            while ((count = inputStream.read(bytes, 0, bytes.length)) != -1) { //use full read() method for GZIPInputStream to be treated correctly
                outputStream.write(bytes, 0, count);     
    }//writeStream()it's pdf content that doesn't work (completely). the first two characters "%P" are mssing. if i add them by hand (e.g. my writting this two characters to the outputSTream before continuing with the PDF content), the resulting file is okay (can be read by acrobat reader).
perhaps, some inner Java class misinterpret the "%P" characters as a special code sequence?

Similar Messages

  • Reading WebDAV Content from ABAP

    Hello,
    I like to read WebDAV Content from SAP NetWeaver Portal KM with ABAP.
    For writing Content with WebDAV I found this post:
    A small working example of how to use the Abap webdav client to write files
    With Method GET_CONTENT from CL_SWDCL_NAMESPACE_CLIENT I can read single files, but what I need is a list with files and folders for a given path.
    I also tried to use the Interface IF_SWDCL_BASIC_SEARCH_CLIENT, but I only get HTML-Errorcodes 400 or 422 since I don't know which parameters I need.
    Maybe there is someone here who can help me to solve this problem.
    Thank you.

    Hello,
    I face the same problem, did you already find a solution you can share?
    Thanks in advance
    Stefan

  • Encoding problem while reading binary data from MQ-series

    Dear all,
    we are running on 7.0 and we have an encoding problem while reading binary data from MQ-series. Because we are getting flat strings from queue we use module "Plain2ML" (MessageTransformBean) for wrapping xml-elements around the incoming data.
    The MQ-Series-Server is using CCSID 850, which we configured in connection parameters in communication channel (both parameters for Queuemanager CCSID and also CCSID of target).If there are special characters in the message (which HEX-values differ from codepage to codepage) we get errors in our adapter while executing, please see stack-trace for further analysis below.
    It seems to us that
    1. method ByteToCharUTF8.convert() expects UTF-8 in binary data
    2. Both CCSID parameters are not used anyway in JMS-adapter
    How can we solve this problem without changing anything on MQ-site?
    Here is the stack-trace:
    Catching com.sap.aii.af.mp.module.ModuleException: Transform: failed to execute the transformation: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException caused by: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException
        at com.sap.aii.af.modules.trans.MessageTransformBean.throwModuleException(MessageTransformBean.java:453)
        at com.sap.aii.af.modules.trans.MessageTransformBean.process(MessageTransformBean.java:387)
        at com.sap.aii.af.mp.module.ModuleLocalLocalObjectImpl0_0.process(ModuleLocalLocalObjectImpl0_0.java:103)
        at com.sap.aii.af.mp.ejb.ModuleProcessorBean.process(ModuleProcessorBean.java:292)
        at com.sap.aii.af.mp.processor.ModuleProcessorLocalLocalObjectImpl0_0.process(ModuleProcessorLocalLocalObjectImpl0_0.java:103)
        at com.sap.aii.adapter.jms.core.channel.filter.SendToModuleProcessorFilter.filter(SendToModuleProcessorFilter.java:84)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.ConvertBinaryToXiMessageFilter.filter(ConvertBinaryToXiMessageFilter.java:304)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.ConvertJmsMessageToBinaryFilter.filter(ConvertJmsMessageToBinaryFilter.java:112)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.InboundDuplicateCheckFilter.filter(InboundDuplicateCheckFilter.java:87)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.TxManagerFilter.filterSend(TxManagerFilter.java:123)
        at com.sap.aii.adapter.jms.core.channel.filter.TxManagerFilter.filter(TxManagerFilter.java:59)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.DynamicConfigurationFilter.filter(DynamicConfigurationFilter.java:72)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.PmiAgentFilter.filter(PmiAgentFilter.java:66)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.InboundCorrelationFilter.filter(InboundCorrelationFilter.java:60)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.JmsHeadersProfileFilter.filter(JmsHeadersProfileFilter.java:59)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageInvocationsFilter.filter(MessageInvocationsFilter.java:89)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.JarmMonitorFilter.filter(JarmMonitorFilter.java:57)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.ThreadNamingFilter.filter(ThreadNamingFilter.java:62)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.SenderChannelImpl.doReceive(SenderChannelImpl.java:263)
        at com.sap.aii.adapter.jms.core.channel.ChannelImpl.receive(ChannelImpl.java:437)
        at com.sap.aii.adapter.jms.core.connector.MessageListenerImpl.onMessage(MessageListenerImpl.java:36)
        at com.ibm.mq.jms.MQMessageConsumer$FacadeMessageListener.onMessage(MQMessageConsumer.java:399)
        at com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl$JmsProviderMessageListener.onMessage(JmsMessageConsumerImpl.java:904)
        at com.ibm.msg.client.wmq.v6.jms.internal.MQMessageConsumer.receiveAsync(MQMessageConsumer.java:4249)
        at com.ibm.msg.client.wmq.v6.jms.internal.SessionAsyncHelper.run(SessionAsyncHelper.java:537)
        at java.lang.Thread.run(Thread.java:770)
    Caused by: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException
        at com.sap.aii.messaging.adapter.Conversion.service(Conversion.java:714)
        at com.sap.aii.af.modules.trans.MessageTransformBean.processTransform(MessageTransformBean.java:538)
        at com.sap.aii.af.modules.trans.MessageTransformBean.processTransform(MessageTransformBean.java:528)
        at com.sap.aii.af.modules.trans.MessageTransformBean.processTransform(MessageTransformBean.java:471)
        at com.sap.aii.af.modules.trans.MessageTransformBean.process(MessageTransformBean.java:364)
        ... 36 more
    Caused by: sun.io.MalformedInputException
        at sun.io.ByteToCharUTF8.convert(ByteToCharUTF8.java:270)
        at sun.nio.cs.StreamDecoder$ConverterSD.convertInto(StreamDecoder.java:287)
        at sun.nio.cs.StreamDecoder$ConverterSD.implRead(StreamDecoder.java:337)
        at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:223)
        at java.io.InputStreamReader.read(InputStreamReader.java:208)
        at java.io.BufferedReader.fill(BufferedReader.java:153)
        at java.io.BufferedReader.readLine(BufferedReader.java:316)
        at java.io.LineNumberReader.readLine(LineNumberReader.java:176)
        at com.sap.aii.messaging.adapter.Conversion.convertPlain2XML(Conversion.java:310)
        at com.sap.aii.messaging.adapter.Conversion.service(Conversion.java:709)
        ... 40 more
    Any ideas?
    Kind regards, Stefan

    Hi Stefan,
    for the first MTB now we are using only one parameter: Transform.ContentType = text/plain;charset="ISO-8859-1"
    The second MTB, which does the XML-Wrapping, is configured like this:
    Transform.Class = com.sap.aii.messaging.adapter.Conversion
    Transform.ContentType = application/xml
    xml.conversionType = SimplePlain2XML
    xml.fieldNames = value
    xml.fieldSeparator = §%zulu§%
    xml.processFieldNames = fromConfiguration
    xml.structureTitle = payload
    Both CCSID configuration parameters from the "Source"-Tab we've set to 850.
    Now, we don't get an error anymore - sun.io.malformedInputException - , but, unfortunately, now special character conversion succeeded (we need an "ß" and we get an ISO-HEX-E1 -> á).  E1 is (different from ISO) an "ß" in 850.
    Any ideas?

  • Read MP3 tags from HTTP mp3 streaming

    Hi , how i can read MP3 tags from HTTP mp3 streaming (streaming url : http://94.25.53.133:80/nashe-9)
    Regards
    Alex

    Hi , how i can read MP3 tags from HTTP mp3 streaming (streaming url : http://94.25.53.133:80/nashe-9)
    Regards
    Alex

  • Problem in reading net content from java on unix environment

    Friends,
    I was trying to write sample java program which can able to connect to web and read the content.
    But facing some proble. Kindly help me
    package com.validate.email;
    import java.net.*;
    import java.io.*;
    public class ReadWSDL {
      public static void main(String args[]){
           String nextLine;
           URL url = null;
           URLConnection urlConn = null;
           InputStreamReader  inStream = null;
           BufferedReader buff = null;
           try{
                System.setProperty("http.proxyHost","proxy.resources.company.com");
                System.setProperty("http.proxyPort", "80");
              // Create the URL obect that points
              // at the default file index.html
              url  = new URL("http://ws.cdyne.com/emailverify/Emailvernotestemail.asmx?wsdl" );
              urlConn = url.openConnection();
             inStream = new InputStreamReader(
                               urlConn.getInputStream());
               buff= new BufferedReader(inStream);
           // Read and print the lines from index.html
            while (true){
                nextLine =buff.readLine(); 
                if (nextLine !=null){
                    System.out.println(nextLine);
                else{
                   break;
         } catch(MalformedURLException e){
           System.out.println("Please check the URL:" +
                                               e.toString() );
         } catch(IOException  e1){
          System.out.println("Can't read  from the Internet: "+
                                              e1.toString() );
    Error
    Can't read from the Internet: java.net.UnknownHostException: www.tpisoft.com

    my_forum wrote:
    The same code is working in Windows, where I get the proxy from Browser.How?
    But on Unix machine it is not working. And I am using the proxy which is DNS/hostname of the unix machine.Don't you mean the DNS/hostname of the proxy?

  • How to read the content from a External Content Type with out creating External List in Sharepoint 2013?

    Hi,
    I have a requirement to read the External Content Type and storing the Data in a Session Variable. The Reading of the content from External Content Type with out creating a External List.
    Please help I am trying to find the solution, but unable to do that.
    Thanks,
    Pradeep

    Hi,
    Firstly an external content type designed to work with SharePoint list and there is no way to read apart from this.
    If you are looking the solution out of the " Business Connectivity" then find that data source has been exposed through WCF and  Web Service ?
    So you can use REST API and CSOM to consume those data in SharePoint.
    You can also leverage the ADO.NET option if the datasources based on MS technologies.
    Murugesa Pandian| MCPD | MCTS |SharePoint 2010

  • Using UME to read binary attribute from LDAP (objectSID)

    Hi,
    I am trying to read the ObjectSID of an LDAP user (from MS Active directory) from an IUser object. This attribute is binary retrieved from the LDAP and if I defined a normal extra attribute in the datasourceconfiguration file and retrieve it as a String the value is wrong.
    So my question is how can I define this as a binary attribute?
    From the file C:\usr\sap\EWD\JC00\j2ee\configtool\dataSourceConfiguration.dtd you get the specification of the xml format for the datasourceconfiguration.
    The Attribute element  has the following specification:
    <!ATTLIST attribute name CDATA #REQUIRED          populateInitially (true|false) #IMPLIED
    readonly (true|false) #IMPLIED
    type (string|blob) #IMPLIED
    cacheTime CDATA #IMPLIED>
    Since you have type here, I tried setting it to blob under the user object as such:
    For user:
    <attribute name="guid" type="blob" populateInitially="true"/>
    For attribute mapping:
    <attribute name="guid">
    <physicalAttribute name="objectSid"/>                    </attribute>     
    However, I still get the following error when calling
    iuser.getBinaryAttribute(UME_NAMESPACE,UME_GUID_NAME ):
    Caused by: com.sap.security.api.UMRuntimeException: String attribute "com.sap.security.core.usermanagement"-->"guid" must be read using IPrincipal.getAttribute(com.sap.security.core.usermanagement,guid)
         at com.sap.security.core.imp.AbstractPrincipal.getBinaryAttribute(AbstractPrincipal.java:300)
         at com.sap.security.core.imp.UserWrapper.getBinaryAttribute(UserWrapper.java:261)
         at com.bouvet.portal.login.UserIntegrityLoginModule.getStatoilUser(UserIntegrityLoginModule.java:430)
         at com.bouvet.portal.login.UserIntegrityLoginModule.login(UserIntegrityLoginModule.java:255)
         at com.sap.engine.services.security.login.ModulesProcessAction.run(ModulesProcessAction.java:69)
         ... 41 more
    This error indicates that the attributes is a string and not a binary attribute.
    Anyone?

    Create OSS and initial message is that this is not supported eventhough some of the configuration files point that direction. It's really easy to implement so maybe if I am lucky I'll get a hotfix.
    Dagfinn
    btw the field was objectGUID not objectSID

  • Oracle reading binary files from other oracle home.

    Hi all,
    I have two oracle db installed on the same server but on different oracle home.
    It seems to me that the second oracle is reading the binaries from the other installation.
    I can start this database and the sap instance and it starts on the correct oracle home but I see that it is reading files on the first oracle home.
    for example, it saves the spfile under the first oracle_home\database directory. I started it using pfile=<the_correct_ora-home>\database\initSID.ora and set on this  init.ora file the correct path for  spfile.
    But even after this if i change any parameter, it stills change the spfile on the wrong <oracle_home>\database.
    Is there a way to fix this ? I mean to make the second oracle to see files under its own oracle home ?
    It is oracle 11g under windows 2008.
    Remember that all the environment variables is pointing to the correct oracle home and I can start SAP and Oracle as well on this oracle_home.
    Thanks in advance,
    Joao.

    Hi Orkun,
    No, we don't have anything else installed yet.
    Please see what I found out:
    Checking those binary errors I found out that the oracle service
    OracleServiceDPC (the second instance on this server) is being started from the wrong oracle_home path. Please
    see the path to the executables on that service properties:
    g:\oracle\dnc\11202\bin\ORACLE.EXE DPC
    It is pointing to the other oracle home DNC but starting instance DPC. How can I change that ?
    Please see that the oracle home, the listener, etc is correct pointing
    to oracle home G:\oracle\DPC\11202.
    I would like to disable this service and create the correct one.
    Is that possible ?
    thanks and regards,
    Joao

  • Reading email contents from a program

    Hello,
    I need to read an email content from a program, to attach it to an CRM activity. Does anybody know if there is a function for this? I will have the email data (Object id, folder, type, etc) available.
    Thank you!
    Paola

    Hi,
    My Requirement is :
    1)I got a requirement to read Bounce back mails in the CRM System .My present scenario is that once a campaign is executed , the mails which get bounce back are returned to outlook location.
    2)The required scenario demands that, to read email IDs which get Bounce back and need to be compared with Email Ids in the Target group , which is assigned to the campaign and update the 'COunter' field which is assigned to the E-mails in the Master Data.
    3)Is there any machanism to read the BOunce-Back mails in CRM System itself (or) It should be read from outlook location where the mails are returned presently, so that COUNTER which is tied up with the E-mails in Master Data can automatically updated.
    4) Is there any possibility to read the Mails in the Outlook location with Mail IDs in the CRM system.
    I have gone through Mr Thomas article and i think it works for my requirement  but i dont know how to proceed further to read bounce back mails when a campaign is executed in CRM System.
    Can any one guide  me how to solve this problem .
    THANKS
    SURESH

  • Read MIME content from POP Server

    Hi All,
    I just want to read the mails from POP Server and redirect the mails to different folders as per the content existing in the mail.
    Now I could able to read the messages from the mails from POP server as well. I'm facing problem while reading MIME type mails from the POP server.
    Can anyone guide me or send me some examples for reading mails from POP Server...
    Thanks in Advance.
    Regds,
    Murugesh

    Reading from a POP server is easy. If it's not working for you
    then please describe in more detail what you tried and what
    happened.
    Saving the messages in other folders can't be done using
    POP, since it supports only a single folder. You can save the
    messages in IMAP folders, or you can get a third party local
    store provider and save the messages in local files.

  • Vod content from http

    Is it possible to get vod content from a http adress ?

    Thank you for your answer. But neither rtmp nor hds/hls worked.
    for rtmp I edited the fms.ini and added the second substitution
    VOD_DIR2 = \\172.16.40.142\vod_ortak
    then edited the application.xml of applications/vod and added the custom stream tags;
    <Streams>/;${VOD_DIR2}</Streams>
    but I got the following error;
    Invalid substitution variable : VOD_DIR2
    for hds/hls I edited the apache2.2/conf/httpd.conf and did the following changes
    <Location /hls-vod>
        HLSHttpStreamingEnabled true
        HLSMediaFileDuration 8000
        # HttpStreamingContentPath "../webroot/vod"
        HttpStreamingContentPath "\\172.16.40.142\vod_ortak"
        HLSFmsDirPath ".."
    <Location /hds-vod>
        HttpStreamingJITPEnabled true
        #    HttpStreamingContentPath "../webroot/vod"
        HttpStreamingContentPath "\\172.16.40.142\vod_ortak"
        JitFmsDirPath ".."
        Options -Indexes FollowSymLinks
    however I see from logs that path is not the way I desire.
    mod_jithttp [404]: [err=1] C:/172.16.40.142/vod_ortak/n_HOBBIT_720p.mp4 does not exist
    besides these, my main question is if fms can refer to files from http adress instead of an network folder. For example
    my file location will be http:\\172.16.40.142\mediafiles not "\\172.16.40.142\vod_ortak" and if fms can cache these remote materials.
    I can send you logs and config files
    best regards

  • Why is performance so slow reading binary data from a SQL Azure DB with EF6.x

    I'm running a WPF client that hits a SQL Azure DB using EF 6.x. For the most part, everything seems to be working fine. The one exception is when I try to read a large binary column.
    I am storing files in the DB as a binary column.  When I test using the local DB, everything sings.  When I switch to the Azure DB, I get timeouts when I try to read the file contents.  I have no problem saving the binary data to the DB, just
    reading it.
    I don't know how to troubleshoot this.  I looked at the Query Performance page in the Azure portal, but it doesn't time stamp anything in there and you can't clear it, so I can't correlate what's running with the queries that show up there.
    I tried to start SQL profiler against the DB, but was denied because I'm not a member of the sysadmin fixed server role.
    If I query for the data directly, it comes back quickly.  So this seems to be an Azure via EF issue.
    Any help is appreciated.
    http://digitalcamel.blogspot.com/

    Hi Digital Camel,
    Since I don't know what your scenario is, I won't argue too much about not storing binaries in your SQL DB, but still: don't store binaries in your SQL DB :). The main reason is simple: first and foremost, in both the current and future pricing tier your
    levels are defines on the size of the DB. Basically, you pay way more by storing your binaries on your SQL layer rathern than storing them elsewhere, such as Azure Storage. Second, the protocol your binaries would be downloaded over the wire is prone to network
    connectivity issues: you could use HTTP(S) or FTP instead, if you'd use Azure Storage. Last but not least, when you download the binary from your DB, you keep a connection open which in the end is a connection other users might have used to query data instead.
    However, in regard to your question, how did you "query for the data directly"? Did you try to query the data using SSMS with the Client Statistics option on? This could tell you if the problem is network, server or client related.
    Hope this helps!
    Alex

  • Reading binary data from a URL

    Below are 2 snippets of code that read data from a binary file. A small sample of the output is shown at the bottom of each code fragment. The first one uses the URL class to read a remote file. The ouput for this fragment is incorrect in some cases. The second uses a stream reader to read a local file (the output is correct in this case). Both fragments read the same file.
    As you can notice, some of the bytes read are the same in both cases. Some others are not.
    I hope you can suggest how I can fix my URL version.
    Thanks for your help.
    Miguel
    Program A: Reads a remote file with URL
    URL url = new URL("http:localhost//myfile.awg");
    URLConnection connection = url.openConnection();
    BufferedReader bin = new BufferedReader(new InputStreamReader(connection.getInputStream()));
    while(true) {
    System.out.println(Integer.toHexString(bin.read()));
    7d 3 0 0
    22 30 3 3e
    fd b9 2a 0
    b2 2 0 1
    Program B: Rads a local file
    DataInputStream din = new DataInputStream(new BufferedInputStream
    (new FileInputStream("c:\\inetpub\\wwwroot\\myfile.awg")));
    while(true) {
    System.out.println(Integer.toHexString(din.read()));
    8e 3 0 0
    99 30 3 3e
    81 b9 2a 0
    b2 2 0 1

    What can I use instead?
    Thanks,
    MiguelBufferedInputStream as in Program B.

  • How to read XML content from IPortalComponentRequest and parse them

    Hi ,
    I have a portal application.The application has 2 components(Comp1,comp2).
    Comp1 is JspDynpage and Comp2 is AbstractPortalComponent.
    Comp1- has a iframe element which point to the external url and has a parameter return_url.
    retrun_url has a value as url to Comp2(http://ibm0343:50000/irj/servlet/prt/portal/prtroot/NewUrlProj.NewUrlComp)
    When an event occurs in the external site,i suppose to receive XML content in return_url(ie Comp2),how can i check using the request if the received content is XML and how do i parse them.
    I have already seen blogs from Prakash singh in which it refers a xml fixed location in webserver.

    Hi Detlev,
    i am reposting this once again as the previous
    reply didnt align good.
    Thanks for your reply.The scenario is that
    My portal application has to communicate with external GIS(Graphical information system)
    service provider client application.
    They say that i have to use iframe in my portal application.
    Here is the snipet of the iframe tags.
    <iframe
    id="Nedbrowser"
    name="Nedbrowser"
    width="100%"
    height="100%"
    frameborder="no"
    marginheight="0"
    marginwidth="0"
    scrolling="no"
    style="position:absolute; top:0; left:0; width:800; height:400; z-index:100; visibility:visible"
    src="http://nbg.nedg.nl/nbgint/NBG_INT_main.asp?action=CHART&datasource=NBGMV&product=INTERNET&size_x=300&size_y=300&result_frame=Results&
    result_url=http://ibm0343:50000/irj/servlet/prt/portal/prtroot/NewUrlProj.NewUrlComp&
    default_centre_x=256000&default_centre_y=471000&default_width=0.5">
    </iframe>
    <iframe
    id="Results"
    name="Results"
    width="100%"
    height="100%"
    frameborder="no"
    marginheight="0"
    marginwidth="0"
    scrolling="no"
    style="position:absolute; top:400; left:0; width:800; height:200; z-index:100; visibility:visible"
    src="about:blank">
    </iframe>
    When my portal application is started, comes the GIS map in the iframe with in my portal application.
    When the user clicks in the area of the map,Gis application returns xml data to the return_url.
    The reurn_url is my PortalAbstractComponent in which i have to parse the xml and use it for further processing in R3 system.

  • Read parameters content from dynpro

    Hello,
    I have a problem with reading a parameters content.
    Following coding:
    Log table
    DATA: BEGIN OF it_log OCCURS 0,
            matnr_short(10),
            matnr  TYPE matnr,
          END OF it_log.
    PARAMETERS s_matnr TYPE rmmg1-matnr.
    Now I enter numbers like 1234000000, 1235000000, 1236000000.
    Content of s_matnr will be 000000001234000000, etc.
    Q: How can I read all entries of s_matnr into it_log-matnr ?
    2.Q: How can I read 1234000000 to it_log-matnr_short ?
    Thanks a lot!

    What the user enters and sees is 1234000000. But internally, SAP stores it with leading zeroes, this is why you see 000000001234000000 in debug, and this value is also stored in database.
    The conversion from 1234000000 to 000000001234000000 is made by a function module named CONVERSION_EXIT_<routine>_INPUT, see below for value of <routine>.
    The conversion from 000000001234000000 to 1234000000 is made by a function module named CONVERSION_EXIT_<routine>_OUTPUT.
    To find out the <routine> value:
    Start SE11 transaction
    Look at structure "rmmg1"
    Look at the component of its field "matnr" (it is a data element)
    Look at the domain of this data element
    Look at the "routine" of this domain. If it is named MATN1, it means that the conversion functions are CONVERSION_EXIT_MATN1_INPUT and CONVERSION_EXIT_MATN1_OUTPUT.
    You can call yourself the second function module if you need to remove the zeroes.
    Sap library here : http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ee19446011d189700000e8322d00/frameset.htm

Maybe you are looking for

  • How to stop a Copy process?

    For years I have never been able to stop a Copy process. When I click on the "cross" button (near the progress bar) in the Copy window, nothing has ever happened! Copy refuses to stop! Any tip or clue?

  • How do I disable the annoying green links (advertising) found on some web pages?

    I'm not sure exactly what these green advertising links are called, but they're very annoying. Maybe "intellitxt"? I have downloaded Ad Blocker and it helps on the ads for facebook and twitter, which are also annoying, but I can't stop the dreaded gr

  • New ASA5512- 5515: content filter and WAN load balancing

    Hi, it's possible to make the content filter with the new models of asa? One of our customers would like to have content filter with the possibiliy to monitor the single client activity (log). It' s possible also make the load balancing between 2 WAN

  • Camera raw 6.6 update

    I can't download this for some reason, or rather I can, but it can't finish as it says I need to shut adobe bridge, which isn't open. I have PSE 9. Anyone any suggestions? I try to do it from adobe downlload manager as well, it can't unzip for some r

  • MAX capcity of file can be attched and sent To IXOS server

    Hi All want to know what will be the MAX capcity of file can be attched and sent To IXOS server ? can we contol it . =>How we attach document Store Business document in FD32 It in ->Go to - FD32 ->On Title BAR(customer credit management change :overv