New How-To: Exchanging Binary Content Using MTOM

Hello,
One of the new features of the OracleAS Web Services (10.1.3.1) is the support of Message Transmission and Optimization Mechanism (MTOM) to exchange binary content using SOAP Web Services.
This is documented in the following how to:
- How-To Use MTOM to Exchange Binary Data Using Web Services
Regards
Tugdual Grall

hi All,
I m stuck in a similar kind of issue, in my case content selectors is used but after that i need to perform some filteration and sorting to select the necessary node, at the last i end up with a node object or a input stream and then how to render this to the screen is issue (node has a binary property with html file)
I have tries the the option discussed in this thread but it didnt worked, as most of them are aroung jsp tags.
Brad
<%@ taglib uri="http://www.bea.com/servers/portal/tags/content" prefix="cm"%>
<%@ taglib uri="http://www.bea.com/servers/content/ui/jsp/templates" prefix="templates"%>
<cm:getNode id="node" path="/path/to/node"/>
${templates:getFileContents(node)}
this looks simple but not working, difference is, in place of "<cm:getNode id="node" path="/path/to/node"/>" i have node object.
Code snippet
<pz:contentSelector rule="ContentDisplaySelector" versionedContent="true" id="nodes"/>
<%
InputStream in =null;
if(nodes.length>1)
     ArrayList<Version> nodeArrayList = new ArrayList<Version>();
     for(int i=0;i<nodes.length;i++)
          if(null != nodes[i] && Workflow.PUBLISHED == nodes.getStatus())
          nodeArrayList.add(nodes[i]);
//sorts as per start date and end date
     Collections.sort(nodeArrayList,new VersionedNodeComparator());
     IVersionManager versionManager = ContentManagerFactory.getVersionManager();
     ContentContext contentContext = new ContentContext();
//how can i use this input stream to render the html output
     in = versionManager.getStream(contentContext,nodeArrayList.get(nodeArrayList.size()-1).getNodeId(),nodeArrayList.get(nodeArrayList.size()-1).getProperty("file").getId());
%>
${templates:getFileContents(<%nodeArrayList.get(nodeArrayList.size()-1)%>)}
i m also looking for a tag based solution.
please help with ur suggestions.
chandar..

Similar Messages

  • LSADMIN CMS authorization problem - How To Transport XI Content Using CMS

    We are configuring CMS using the "How To Transport XI Content Using CMS".  For the LSADMIN user we have added the SAP_XI_CMS_SERV_USER and SAP_SLD_ORGANIZER roles.  We have followed all of the steps in the guide.
    The problem we are encountering is that when we define the domain but put in the LSADMIN as the user, we get an error - "SLD (URL http://server:50000) server exception: HTTP response code: 403 Forbidden"
    We then gave the LSADMIN all of the roles of XISUPER and restarted the J2EE engine.  We still have the same problem.  So we changed the CMS User to be XISUPER and we could save the domain.  Now, we have another problem - when we try to export from dev using CMS, we get the following problem:
    "Sent on 3/9/06 at 1:26 PM: Unable to establish connection to CMS server http://servername:50000. Unable to transfer the following transport lists:  Export list for ...
    Details: unknown exception: com.sap.cms.util.exception.conf.CMSCFinderException: Workspace name does not exist: com.sap.cms.util.exception.conf.CMSCFinderException: Workspace name does not exist: version=0,dtrWSName=
    Check the availability of the CMS and the user authorizations and send the transport request again if necessary
    We are on SP16.  Anyone encountered this issue?
    Regards,
    Jay

    Here are all of roles we have given LSADMIN in client 100:
    SAP_CMS_ADMINISTRATOR
    SAP_SLD_DEVELOPER
    SAP_SLD_GUEST
    SAP_SLD_ORGANIZER
    SAP_XI_BPE_MONITOR_ABAP
    SAP_XI_CMS_SERV_USER
    SAP_XI_CMS_SERV_USER
    SAP_XI_DEMOAPP
    SAP_XI_DEVELOPER
    SAP_XI_DEVELOPER_ABAP
    SAP_XI_DEVELOPER_J2EE
    SAP_XI_MONITOR
    SAP_XI_MONITOR_ABAP
    SAP_XI_MONITOR_J2EE
    But on the J2EE side, we only see the following roles for LSADMIN:
    - Authenticated Users Built-in Group Authenticated Users
    - Everyone Built-in Group Everyone
    - SAP_XI_CMS_SERV_USER Exchange Infrastructure: Change Management Service User
    I checked client 000, and noticed that LSADMIN only had the SAP_XI_CMS_SERV_USER.  So this the problem.  I added all of the roles to LSADMIN in client 000 and restarted J2EE and now i can see all of the roles under the LSADMIN user in UME.
    We noticed the problem that our UME configuration was pointing to client 000 and not client 100.  If we go to Visual administrator and go to the Services->UME Provider, we see that - ume.r3.connection.master.client points to client 000.  We will need to change this.
    That was the issue.  UME was pointing to the wrong ABAP client.  I appreciate all of your help.
    Regards,
    Jay

  • How to view alerlog contents using SQL?

    How to view alertlog contents using SQL?

    Hi,
    Why don't you use the OEM Database Console ?? Now, in order to view the contents of the alert log file using a SELECT statement, you need to create a external table:
    create or replace
    directory background_dump_dest_dir
    as '<your_oracle_home>/bdump';
    CREATE table alert_log_external
    (line varchar2(4000) )
    ORGANIZATION EXTERNAL
    (TYPE oracle_loader
    DEFAULT DIRECTORY background_dump_dest_dir
    ACCESS PARAMETERS (
    RECORDS DELIMITED BY newline
    nobadfile
    nologfile
    nodiscardfile
    FIELDS TERMINATED BY '#$~=ui$X'
    MISSING FIELD VALUES ARE NULL
    (line)
    LOCATION ('alert_<sid_of your_database>.log') )
    REJECT LIMIT UNLIMITED;Cheers

  • How to display binary content in EP 5.0?

    I  would like to display binary content in a http-response. Formerly using a BSP-Application in Web-AS I achieved this by something like
    call method mserver->response->set_header_field(
                name = 'Content-Type' value = mimetype ).
    call method mserver->response->set_data( data = mimedata ).
    Within the context of AbstractPortalComponent I dont find a way to set the content type in a way to directly display binary content in a PRT-Context.
    What did I miss ..?

    I know this is a little out of date but you can do the following:
    /* Get the underlying HttpServletReponse object */
    HttpServletResponse httpresp = response.getRequest().getServletResponse(true);
              try {
    // This seems to be required to get rid of any buffered
    // content
                   httpresp.reset();
    //Set appropriate content type here
                   httpresp.setContentType("application/pdf");
    //write out data
    //in this case just a PDF in string format
                   httpresp.getWriter().write(data);
              } catch (Exception e) {
    // handle errors appropriately
    <b>NOTE:</b> I haven't tested this in a productive environment so test this fully before implementing
    Michael

  • How to access Infocube content using an ABAP program

    Hi,
       I am trying to access infocube contents using a ABAP program in BW.
       It is easy to access ODS content as we have NEW DATA or ACTIVE DATA
       tables. Is there any way we can access Infocube content.
       I tried using the FACT table but it has only Keyfigure data.
    thanks
    arshad.

    Hi,
    I would suggest to use a transactionnal cube, even if you do not use BPS to feed it.
    Then, you create a layout in transaction BPS0 (~ similar to a query), and you can access the cube content by simply using the SAP function <b>API_SEMBPS_GETDATA</b>.
    This is easy and fast.
    Regards,

  • How to load binary content of a .class file?

    Hello everyone,
    I want to load the binary content of a .class file in a dynamic approach. In more detail, I want it to work in the following approach. When given the name of a class, I can retrieve the binary content of the .class file. I have written the following sample but it does not work. Can anyone help to find what is wrong with my sample? How to achieve my goal?
    String className = this.getClass().getName();
    InputStream inputStream = this.getClass().getResourceAsStream (className);When executing the above code, the inputStream is always returned as "null".
    Thanks in advance,
    George

    Thanks ruthf104,
    I haven't tested this, but I think you will need to
    transform the class name
    "test.Foo"
    into the resource path
    "/test/Foo.class"
    ie change '.' to '/', append '/' at the beginning
    and ".class" at the end.
    See the following paragraph from the
    Class.getResourceAsStream specification:
    "This method delegates the call to its class loader,
    , after making these changes to the resource name: if
    the resource name starts with "/", it is unchanged;
    otherwise, the package name is prepended to the
    resource name after converting "." to "/". If this
    object was loaded by the bootstrap loader, the call
    is delegated to
    ClassLoader.getSystemResourceAsStream."
    By these rules, the method will not be able to
    automatically transform the class name into a
    resource path for you (it doesn't append the
    ".class"), so you'll have to do it yourself.I have verified that your approach is working!
    regards,
    George

  • How to retrieving the content using Links

    Hi
    Please suggest me how to retrive content using link property.
    I have added link property to my Content. and i have added in internal resource path to the Link property.
    But my question is how access the page which is linked to my Content.
    How can i use it with anchor tag when i want show display the linked page content.
    what are tags to be used to retrive the linked content in the page.
    I found below line in CM documentation
    "These relationships are used by developers in their content queries when retrieving content to display in
    your portal."
    But i could found how to retrive.
    Genarally what technique we use to link an internal resource of our Content management
    thanks in advance
    Edited by: vamshi krishna on Jun 12, 2011 12:32 AM

    It sounds like there may be a misunderstanding about our link property feature.
    That feature is not for web hyperlinks. For that you can just use a string property. The links feature is for pointers to other pieces of content.
    (from: http://download.oracle.com/docs/cd/E13155_01/wlp/docs103/cm/contentTypesCm.html)
    "Using Link Properties
    You can create properties that allow content contributors to associate content items. Content contributors can link to content within the same or different repositories within the Virtual Content Repository. For example, if you have related content items that are stored in different folders, you can use content link properties to create relationships among content items. These relationships are used by developers in their content queries when retrieving content to display in your portal.
    Link properties can also be multi-valued to allow content contributors to link to multiple content items. For detailed instructions on adding a link property, see Define the Properties of a Content Type."
    Edited by: Chris Bales on Jun 13, 2011 2:56 PM

  • UCM 11g - how to accessing secured content using open WCM service

    Hi All,
    Does any one has an idea on how to access the contents that are checked in with security groups as "Secured". If the contents are checked in as "Public" then, we can easily access the same with the following open WCM servervice:l
    http://<ucm_server>:16200/cs/idcplg??IdcService=WCM_PLACEHOLDER&dataFileDocName=<data_file_name>&templateDocName=<region_template_name>
    Regards,
    Sanjay

    Hi Donato,
    Did you ever get an answer for this issue? I'm trying to get a similar case working and would be curious on how you ended up doing this...
    For what I know so far, this may help you:
    1) The trigger-EBSProfile requires you to pass th afGuid value, this value, is created automatically by the IPM process, basically, when you click the MA button in EBS, the SOA call to IPM does 2 things:
    First, it creates a row in the AFGRANTS table in the WCContent DB, this basically overwrites UCM security and give the user access to the documents, this table has the information of the EBS record (Business Object, and Primary Key) as well as the auto generated afGuid
    Second it sends back the URL to WCContent, mainly "/cs/idcplg/_p/min/af/trigger-EBSProfile?IdcService=GET_SEARCH_RESULTS_FORCELOGIN" and passes the afGuid created in the first step, which identifies the EBS record.
    So if you need to make direct calls to UCM under the trigger-EBSProfile you will need to manually (custom) add the afGuid and details of the EBS record to the table, the entries in this table get removed automatically based on the dexpirationdate value
    2) While the IPM SOA call overwrites the UCM security, if you have implemented your own security structure (assign a different security group to the documents and give the users access to it) you could make calls directly to UCM bypassing the "trigger-EBSProfile"..
    for example, in the call you were trying to make originally to DOC_INFO, if you know the dDocName of the document, you can simply call the service as "/cs/idcplg?IdcService=DOC_INFO_BY_NAME&dDocName=POC2001" (I use DOC_INFO_BY_NAME because you need to know the dDocId for DOC_INFO)
    You can do the same with other services like checkin/checkout etc, (for checking you will need to pass the additional parameters dfBusinessObejct, dAFBusinessObject and dfApplication to link the document to the EBS record)
    Regards,
    Juan Becerra

  • How to play offline content using Smooth Streaming Client SDK for Windows 8.1 and/or Windows Phone 8.1

    Hi there,
    The Smooth Streaming Client SDK for Windows 8.1 at
    https://visualstudiogallery.msdn.microsoft.com/0170c67c-c183-4fee-8dd4-c2b44d710d40 specifies "Offline playback scenarios via Downloader Plugin*". I have been searching the web to find info on how to download content for offline playback scenarios
    using the Downloader Plugin, but can't find nothing, so is there any samples, API docs or blogs out there showing how to do this?
    Sandip Ahluwalia

    Hi Sandip,
    As stated in the sample you linked:
    For feedback and future requests please use IIS.net forum and related forum tread which can be accessed from
    here
    --Rob

  • How to exchange lines when using dual sim card with 2 different pnone lines in the same iphone 4s

    I have an iPhone 4S with a dual SIM card since I use 2 different phone lines (1 professional and 1 personal) They work well but, how can I change from one line to another without having to switch off the phone and then restart it introducing a different PIN?
    Thank you

    Hi raffettax,
    Time goes by and I have no answer. There is lso no answer on Movistar Communities, the only one is really disappointing and is not given by a Movistar employee. An iOS beta tester told that beta 2 resolved the issue, but with beta 3 it stops working again .
    Do you have any news about this issue?
    Regards.

  • How to transfer tabl content using ALE

    Hi All
    I need to to transfer the content of a HR table (T526) using an ALE scenario. However I have not found a way to do this. I stumpled over CONDA2 but not quite sure if this suits the bill. Anybody out there who can help.
    I am not an HR wiz so bear with me if this is dead obvious.
    Hope somebody can help
    Cheers

    Hello Bowie,
    Could you please help in how to use CONDA2 message type in ditributing HR Configuration data like data from following tables..
    T001P     Personnel Area/Subarea
    T500P     Personnel Areas
    T503     Employee Group/Subgroup
    T511     Wage Types
    T512T     Wage Type Texts
    T512Z     Permissibility of Wage Types per Infotype
    T528B     Positions
    T554S     Attendance and Absence Types
    T554T     Attendance and Absence Texts
    Thaks,
    Venkat

  • How to get restriction contents using eclipse xsd while reading schema's

    Hello,
    I am using XSD package from eclipse to read my schema structure (which is very complex) The code part where i am problem is as:
    If the schema is having element like :
    <xs:element name="Alignment" default="Center">
    <xs:annotation>
    <xs:documentation>
         Alignment can be any of the following three.     Left Right Center
    </xs:documentation>
    </xs:annotation>
    <xs:simpleType>
    <xs:restriction base="xs:string">
         <xs:enumeration value="Left"/>
         <xs:enumeration value="Center"/>
         <xs:enumeration value="Right"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    Then i am able to read all part. By the way the problem is how to read the restriction part (that is the base ) from the simple part. Any body is having any clue ?
    Regards,

    Pleast take a look at "Definer's rights and invoker's rights" in the following article:
    http://docs.oracle.com/cd/E11882_01/timesten.112/e21639/accesscntl.htm#BABDDCHC
    I guess you need to define a stored procedure with "invoker's rights".
    If this is what you are looking for will have to define it in the stored procedure that you are going to call.
    The syntax is as follows:
    create or replace procedure <yourprocedure> authid current_user ...
    ...or (the following is the default, you don't have to use the "authid definer" keywords):
    create or replace procedure <yourprocedure> authid definer ...
    ...hm

  • How to access request content using MultipartMessage Object

    I want to take a file from the Client and upload it as a FileInputStream on the server.
    I have a simple form as follows:
    <form action="scan" name="scan_files" method="post"
    enctype="multipart/form-data">
    <input type="file" name="file1">
    <input type="file" name"file2"/>
    <input type="Submit" name="insert_scaned" value="Upload"/>
    </form>
    In my servlet I tried to use the com.sap.engine.services.servlets_jsp.lib.multipart.MultipartMessage
    class to parse the form information.
    protected void doPost(
    HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {
    MultipartMessage multipartMsg =
    (MultipartMessage)request.getAttribute("com.sap.servlet.multipart.body");     
    if (multipartMsg != null) {
         multipartMsg.addFormParametersToRequest();
    The help said that once this is done the form information should be accessible via the
    request getParameter() method. However, I can't seem to get it working?
    How can I access the file so that I can parse it into a FileInputStream?
    Thanks.

    Hi Mat,
    first, welcome on SDN!
    About your question:
    From the APIDoc - https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/javadocs/nw04/sp12/j2ee%20engine/com/sap/engine/services/servlets_jsp/lib/multipart/multipartmessage.html - I would expect this as a solution:
    MultipartMessage multipartMsg = (MultipartMessage)request.getAttribute(MultipartMessage.MULTIPART_BODY_KEY);
    if (multipartMsg != null) {
      for (int i = 0; i < multipartMsg.getCount(); i++) {
        MultiPart mp = multipartMsg.getBodyPart(i);
        // mp.getInputStream, mp.getBody() or whatever you need
    Hope it helps
    Detlev
    PS: Please consider rewarding points for helpful answers on SDN. Thanks in advance!

  • Binary content in XML document

    Hi all,
    I'm currently facing a problem regarding XML and binary content. What I need to do is basically send an XML-RPC message to invoke a method that has a parameter which accepts a file. I'm not sure how to include binary content in an XML document. Other than that, does anybody know if I can use some sort of common multipart request class to accept the XML-RPC calls from the client? In the end I should have a servlet that takes care of transferring the request (XML-RPC with file) to the apropriate service and construct and send a response...

    How does the aproach of establishing a momentary peer-to-peer connection for a file transfer compare with HTTP uploads? Does it work just about the same way?
    Basically, this means I would need to build a client program that first opens a server socket for the actual file transfer, then sends a message to the application server that it wishes to upload a file and then accepts a connection from that application server to transmit the file...
    Sure. ;-) However, if you're asking where you might find such an animal then I can't help you...
    Apparently I don't need such a class anyway, if I use common XML-RPC messages and transfer binary content in another way... ;)

  • Printing Web contents using Java Fx.

    Hi,
    How to Print Web contents using Java Fx application? ie, displaying a web page as it is on the application..........
    Thanks......

    You might want to try to SwingComponentize third-party Java web browser (JDic, NativeSwing).
    Another recommended alternative is to wait for the JWebPane because it is designed to work with JavaFX (http://weblogs.java.net/blog/alex2d/archive/2008/12/jwebpane_projec_1.html). No date is given to JWebPane's release though. JWebPane will be my Christmas's wish.

Maybe you are looking for

  • How do I delete my Visa gift card from iTunes?

    So I got a visa giftcard and put it in my iTunes to get some music. But now I have used it all, and it will NOT let me download free apps, or even update apps. It keeps saying "Theres a billing problem with your previous purchase.Please update your p

  • How to get the name of the subform

    Hi All, My form is designed in the below structure. masgterpage-->form1-->table                               -->subform How can i get the name of the subform dynamically(as it varies from page to page, but the rest of the structure is same). Please

  • RESTORE TABLESPACE

    Hi, We have our EUL set up and working fine until last week. Today I received a call from the user saying that they are unable to open any workbooks, complaining that it has lost the joins. Upon investigation found that, these workbooks are built upo

  • Large app icon submission not working

    I've been trying to update my app with recent code that fixed a bunch of bugs, but I'm currently stuck on this large app icon submission. I'm honestly using the same picture (1024x1024) as I used in my first submission of my app and now it just refus

  • Questions on Mac Pro

    Hello I never had a mac computer. I have a dell computer. My birthday is coming up and am considering to get a Mac pro. So i have several questions. 1) this is a fairly new product, are there a lot of problems with it? I hear about new products that