SOAP Attachment & performances for WLI

Dear all,
I am implementing webservices, accepting a SOAP attachment as parameter. The implementation is based on Workshop / WLI jws file. The web service is RPC style since WorkShop is unable to generate a correct WSDL file with SOAP atttachment & document style (known limitation from BEA).
My problem is concerning attachments. Indeed, in my mind, attaachement are there in order to prevent extra load into the XML parser and to speedup processing and avoid heavy use of memory.
So I made some tests with a simple soap request and attachments. Here are the results (I calculate the time to send and receive response from web service), the web service itself just prints the content type, anything else.
Attachement size | Time
39 kb 344ms
78 kb 406ms
155 kb 484ms
300 kb 750ms
463 kb 1000ms
1389 kb 4600ms
2700 kb 23609ms
5500 kb 140000ms
Of course, the client and server are running on the same machine and are using the loopback interface. So there is no network bootleneck to take into account.
As conclusion, we can see that for small messages, (<300kb) the curve is good... But performances start to fall drastically with messages larger than 300kb. This is not a problem of memory but CPU usage (fully used diring the 1400 seconds).
Any idea, any opened cases ?
Thansk for all,
Pascal Bourgeois

This post :
http://soastuff.wordpress.com/2007/06/06/handling-opaque-datatypes-in-bpelesb/
Describes how to use the opaque-schema for sending files over the ESB.
Hope you can use this.
or do you want to use the soap-headers for this?

Similar Messages

  • Maximum SOAP attachment Size?

    Gurus
    I have synchronous scenario that is SOAP - PI - PROXY where the proxy responds with an attachment containing the actual data.  The response message contains 5 fields and PI just passes through the attachment back to original SOAP call.  There is no mapping in this scenario.
    While this scenario is working perfectly, we would like to determine the maximum size attachment that can come through the PI server without adversely impacting the server performance.  I can not seem to find any documentation that discusses the maximum attachment size for server performance.  
    Do any of you have any you have anything booked marked or know from experience what the maximum attachment size should be?  Is it simply a matter of a timeout on the HTTPs connection?
    Thanks in advance.

    Thanks for all of the great answers so far.  
    I am able to run larger files through by adjusting the timeout feature in WSnavigator.  We had some discussion here about this and we think that the amount of RAM on the machine will also be a factor.  The blog seems to confirm that. 
    The servers we have are pretty hefty, but in order to not impact the other interfaces we have running through PI we want to keep the attachments to a reasonable size so that the consumer application is not opening more HTTP connections to our box than needed.
    I guess we will only be able to answer this by testing.

  • OSB - send file in email attachment in SOAP attachment

    Hi!
    I would like to send a file in email in SOAP attachment.
    I thought it would be a simple task, I will create a proxy service, which calls a business service. There is a routing action in proxy service to business service and after the rouiting there is a replace action, I replace the attachments variable with this:
    <con:attachment xmlns:con="http://www.bea.com/wli/sb/context">
    <con:Content-Type>application/pdf</con:Content-Type>
    <con:Content-Transfer-Encoding>base64</con:Content-Transfer-Encoding>
    <con:Content-Disposition>attachment; filename="Simple.pdf"</con:Content-Disposition>
    <con:body>{$attachments/ctx:attachment/ctx:body}</con:body>
    </con:attachment>
    I received the email, but i cannot open the document, because it is corrupted...
    Please, could someone help me?
    I can't find out the solution.
    Thanks!
    Viktor

    Hi Anuj!
    Thanks for your answer again! :)
    I tried the blog and I could send email with attachment. My problem is that I have to put the file content into the webservice body when i call the proxy service as a webservice. But I want to put the file into the SOAP attachment. So this is my scenario:
    1. the service counsumer calls the proxy service webservice and the service consumer (client) put the file into the request SOAP attachment
    2. the proxy service calls the business service
    3. the business service sends the email with an attachment (and the file is into this attachment)
    Could You help me?
    Thanks!

  • "Content is not allowed in prolog" with SOAP Attachment

    I'm writing an application using SAAJ that sends a soap message to a servlet which responds with some information, including HTML which the client application will display. The HTML has to go into a SOAP attachment so the tags won't get confused with XML.
    I had the whole thing working with plain text sending within a normal node, and I only switched a few lines to make that text an attachment with HTML instead, but now I'm getting the exception "Content is not allowed in prolog" on the Client side when it tries to create the envelope from the SOAPMessage.
    Code for building answering SOAPMessage with attachment (Servlet to Client)
         public static SOAPMessage buildXML(Message newMessage){
              SOAPMessage msg = null;
              try {
                   MessageFactory msgFactory = MessageFactory.newInstance();
                   msg = msgFactory.createMessage();
                   // Create an envelope in the message
                   SOAPEnvelope envelope = msg.getSOAPPart().getEnvelope();
                   msg.setProperty(SOAPMessage.WRITE_XML_DECLARATION, "true");
                   msg.setProperty(SOAPMessage.CHARACTER_SET_ENCODING, "UTF-8");
                   //Get hold of the the body
                   SOAPBody body = envelope.getBody();
                   SOAPElement soap_message = body.addChildElement("MESSAGE");
                   if (newMessage.message_type != null){
                        SOAPElement soap_message_type = soap_message.addChildElement("MESSAGETYPE");
                        soap_message_type.addTextNode(newMessage.message_type);
                   if (newMessage.questionID != 0){
                        SOAPElement soap_questionID = soap_message.addChildElement("QUESTIONID");
                        soap_questionID.addTextNode("" + newMessage.questionID);
                   if (newMessage.username != null){
                        SOAPElement soap_username = soap_message.addChildElement("USERNAME");
                        soap_username.addTextNode(newMessage.username);
                   if (newMessage.password != null){
                        SOAPElement soap_password = soap_message.addChildElement("PASSWORD");
                        soap_password.addTextNode(newMessage.password);
                   if (newMessage.message_text != null){
                        AttachmentPart soap_message_text = msg.createAttachmentPart("<html><body>" + newMessage.message_text + "</body></html>", "text/html");
                        soap_message_text.setContentId("MESSAGETEXT");
                        msg.addAttachmentPart(soap_message_text);
                        //SOAPElement soap_message_text = soap_message.addChildElement("MESSAGETEXT");
                        //soap_message_text.addTextNode(newMessage.message_text);
                   if (newMessage.sampleString != null){
                        SOAPElement soap_password = soap_message.addChildElement("SAMPLESTRING");
                        soap_password.addTextNode(newMessage.sampleString);
                   SOAPElement tmpEl;
                   for (int i=0; i<newMessage.numArrayUsed; i++){
                        tmpEl = soap_message.addChildElement("SAMPLEINT");
                        tmpEl.addTextNode("" + newMessage.sampleInt);
                   msg.saveChanges();
              } catch (Exception e) {
                   e.printStackTrace();
              return msg;
    You can see in the area where it adds MESSAGETEXT there are two clients commented out which work. The three lines above it are what changed to make it an attachment instead.
    Code in Client for recieving reply from Servlet
    SOAPMessage reply = connection.call(soap_msg, endpoint);
    System.out.println("\nReceived reply from: " + endpoint);
    reply.writeTo(System.out);
    System.out.println("");
    reply_msg = ProcessXML.parse(reply);This is the console output:
    Edit: These forums seem to be inserting an extra > before the <?xml version="1.0" encoding="UTF-8"?> line, but it doesn't exist in the code I'm pasting
    Received reply from: http://localhost:8080/kuj/CaseStudyServlet
    ------=_Part_2_371807.1137465625031
    Content-Type: text/xml; charset=UTF-8
    <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header/><SOAP-ENV:Body><MESSAGE><MESSAGETYPE>deliverquestion</MESSAGETYPE><QUESTIONID>1</QUESTIONID><USERNAME>zac</USERNAME></MESSAGE></SOAP-ENV:Body></SOAP-ENV:Envelope>
    ------=_Part_2_371807.1137465625031
    Content-Type: text/html
    Content-Id: MESSAGETEXT
    <html><body>This is an Array sort Question. You will be given 10 random integers and you must sort and return them in the order of greatest to least.</body></html>
    ------=_Part_2_371807.1137465625031--
    ERROR:  'Content is not allowed in prolog.'
    17-Jan-2006 02:40:25 com.sun.xml.messaging.saaj.soap.EnvelopeFactory createEnvelope
    SEVERE: SAAJ0511: Unable to create envelope from given source
    com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to create envelope from given source:
         at com.sun.xml.messaging.saaj.soap.EnvelopeFactory.createEnvelope(EnvelopeFactory.java:111)
         at com.sun.xml.messaging.saaj.soap.ver1_1.SOAPPart1_1Impl.createEnvelopeFromSource(SOAPPart1_1Impl.java:39)
         at com.sun.xml.messaging.saaj.soap.SOAPPartImpl.getEnvelope(SOAPPartImpl.java:98)
         at com.zacwittedesign.xml.ProcessXML.realParse(ProcessXML.java:32)
         at com.zacwittedesign.xml.ProcessXML.parse(ProcessXML.java:26)
    (snip)And this is the beginning of the code for extracting the info from the SOAPMessage on the Client side:
    private static Message realParse(SOAPMessage msg){
              Message newMessage = new Message();
              try {
                   SOAPEnvelope envelope = msg.getSOAPPart().getEnvelope();
                   SOAPBody body = envelope.getBody();
    (snip)It dies on SOAPEnvelope envelope = msg.getSOAPPart().getEnvelope();
    Does anyone know what I'm doing wrong?

    I suppose I should also include the bit where the Servlet actually SENDs the resulting SOAPMessage
    SOAPMessage msg = ProcessXML.buildXML(outMessage);
    // try to send it
    try {
         response.setContentType("text/xml");
         msg.writeTo(response.getOutputStream());

  • Unique Problem: Returning SOAP+ Attachment using a class based webservice

    Hi everyone,
    Im trying to return a Soap+ attachment response back using the following:
    attachDoc(byte[] bdoc, String sTransactionNumber,
                   String sRequestedType)
    Where byte[] is the attachment and the 2 string parameters are soap message contents.
    The attachment is attached successfully to the message and i can send a response back to the clients console using :
    message.writeTo(System.out);
    My problem is that i dont know how to return this soapmessage+attachment back to the client.
    Ive tried using the return type of the method as :
    public SOAPMessage attachDoc(byte[] bdoc, String sTransactionNumber,
                   String sRequestedType)
    but i cant return a SOAPMessage return type in axis.
    Does anyone have any clues how i should sort this out so that the client gets the SOAPMessage and attachment when the method is called ?
    Please help :S
    Thanks,

    I dunno if this is what you asked for....
    Hope this helps a bit
    You may want to check this link out
    http://www-unix.globus.org/mail_archive/discuss/2007/02/msg00037.html
    MessageContext msgContext = MessageContext.getCurrentContext();
    File file = new File("filename.txt");
    org.apache.axis.attachments.AttachmentPart replyPart=
    new org.apache.axis.attachments.AttachmentPart(new DataHandler(new
    FileDataSource(file)));
    Message rspMsg= msgContext.getResponseMessage();
    rspMsg.addAttachmentPart(replyPart);
    so ur basically adding the file to the reply message.
    The link i gave has a better description, it has the entire process of sending file to server and downloading file from server codes.

  • Exception when trying to create a soap attachment javax.activation. Unsuppo

    I am trying to pass an object String [] as a soap attachment.
    Reading the docs, if I pass a parameter as type datahandler, it is automatically treated as an Attachment.
    I used the constructor DataHandler (Object obj, String mimeType)
    where the object was my StringArray, and MIME is the XML representation of
    a java type, which according to weblogic docs is NMTOKENS,IDREF or ENTITIES.
    It threw the same error for the other two.
    Am I using DataHandler correctly, is MIME the SOAP representation of the Java Object in memory.
    Thanks for any help
    Tony

    I am trying to pass an object String [] as a soap attachment.
    Reading the docs, if I pass a parameter as type datahandler, it is automatically treated as an Attachment.
    I used the constructor DataHandler (Object obj, String mimeType)
    where the object was my StringArray, and MIME is the XML representation of
    a java type, which according to weblogic docs is NMTOKENS,IDREF or ENTITIES.
    It threw the same error for the other two.
    Am I using DataHandler correctly, is MIME the SOAP representation of the Java Object in memory.
    Thanks for any help
    Tony

  • How to download a SOAP attachment using pl/sql

    Gurus,
    I have a custom pl sql application that is web services based. The custom pl sql application invokes the external web services and updates Oracle Field Service application.
    One of the new requirements is to get the signatures from SOAP Attachments (a binary file) and attach it to Field Services transactions in Oracle.
    Does anyone has an example of how to download the SOAP attachment file from web service using pl/sql.
    The pl sql program uses UTL_HTTP to access web services.
    Much Thanx.

    I think you may be in the wrong forum, but anyways...
    What I think your looking for is the htp.print('insert html here'); function. It's plsql, and writes out html to the web server that calls it.
    if you search for htp.print you should find loads of examples.
    hope this helps.
    Merv.

  • SOAP Attachment question

    Hi!
    I've got a question about SOAP Attachment. It is possible to use "Datahandler" class to attach a file. But is it possible to put the datahandler in a business class ( as an attribute of the class), and the business class is a parameter of the service?
    Thank you for your help!
    Best Regards,
    Nguyen Gilbert

    I tried making the DataHandler object as a attribute of the parameter object and there were some exceptions. I think weblogic does not allow that.

  • SOAP attachment - module development?

    Hi,
    I have an IDOC -> SOAP scenario where I have to call a webservice that uses SOAP attachment.
    Example:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ueb="IBrokerInterface">
       <soapenv:Header/>
       <soapenv:Body>
          <ueb:TEBIBrokerInterface_PublishWS>
             <aClientId>TEST</aClientId>
             <aMessage>cid:file.xml</aMessage>
             <aDuplicates>0</aDuplicates>
          </ueb:TEBIBrokerInterface_PublishWS>
       </soapenv:Body>
    </soapenv:Envelope>
    The "file.xml" has to be a SOAP attachment.
    If I use a SOAP receiver channel how do I get the IDOC payload moved into a SOAP attachment and still keep the SOAP envelope?
    Can this only be done with module development?
    Thanks Rasmus

    Hi Rasmus,
    You cannot create an attachment in mapping.
    In PI 7.1 there will be a Java Mapping API for working with attachments, but the code will be similar to an adapter module. It will not be possible with XSLT.
    Regards
    Stefan

  • Modify the SOAP attachment name

    hi,
    I have a Service with Party, which sends messages in SOAP format to XI.
    When the SOAP message sent to XI contains a '&' character in its attachment name, the message gets failed to processed through XI.
    I believe this happens since '&' character is a wildcard character in XML hence XI expects a escape character sequence following it and cannot parse through the '&' character. Also as per the IR tests executed for the SOAP message, when the '&' is replaced with its escape sequence the message is processed through successfully.
    Is it possible to replace the '&' character with its escape sequence in the SOAP attachment name before it is processed by the XI Integration Engine. That is at the adapter level?
    regards,
    Diptee
    Edited by: diptee s on Oct 26, 2010 4:47 PM

    hi,
    i have created the Java Mapping .
    in the pdf document How Tou2026Work with Character Encodings in Process Integration from SAP, for the Escape sequences it is said that for adding Escape sequences to the unescaped characters, add the Java mapping before the required mapping.
    however, i am not able to test the interface in the IR even after adding the new Java mapping.
    please suggest.
    regards,
    Diptee

  • How to improve the performance for integrating third party search engine

    hi,
    I have been working on integrating verity search engine with KM. the performance for retrieving search result totally depend on how many search result returned, for example if there is less than 10 records, it only takes 3 seconds, but if there are 200 records, it takes about 3 minutes, is it normal? anyway to improve it? Thanks!
    T.J.

    Thilo,
    thanks for the response, would you recommend some document for configuring KM cache service, I did change memory cache, and also dynamic web reposity, whatelse out there that I can change? right now, I have one instance(EP6.4 sp11) works well, it returns 200 records from Stellent within 6s. But when I put this KM global service on EP6.0 sp2 (our current system) it takes about 15s. I am not sure is this because of different EP version, or something else. I have tried my best to slim down SOAP component from Stellent. I don't think anything else can be done from that side anymore. before I changed the SOAP, it tooks about 60s. just wonder what else I can do on KM side to improve it performance? Thanks!
    T.J.

  • Return zip file as soap attachment  from server..

    Dear Friends,
    Requirement:
    I would like to download a zip file from server(tomcat) with soap attachment using wsdl.
    I have tried googling but didn't get exact information and samples on this.
    Please help me on this and it would be helpful if u can provide me one sample on this.
    Thanks in advance.
    Cheers
    Cap

    pls http://www.catb.org/~esr/faqs/smart-questions.html#writewell
    How To Ask Questions The Smart Way
    Eric Steven Raymond
    Rick Moen
    Write in clear, grammatical, correctly-spelled language
    We've found by experience that people who are careless and sloppy writers are usually also careless and sloppy at thinking and coding (often enough to bet on, anyway). Answering questions for careless and sloppy thinkers is not rewarding; we'd rather spend our time elsewhere.
    So expressing your question clearly and well is important. If you can't be bothered to do that, we can't be bothered to pay attention. Spend the extra effort to polish your language. It doesn't have to be stiff or formal - in fact, hacker culture values informal, slangy and humorous language used with precision. But it has to be precise; there has to be some indication that you're thinking and paying attention.
    Spell, punctuate, and capitalize correctly. Don't confuse "its" with "it's", "loose" with "lose", or "discrete" with "discreet". Don't TYPE IN ALL CAPS; this is read as shouting and considered rude. (All-smalls is only slightly less annoying, as it's difficult to read. Alan Cox can get away with it, but you can't.)
    More generally, if you write like a semi-literate b o o b you will very likely be ignored. So don't use instant-messaging shortcuts. Spelling "you" as "u" makes you look like a semi-literate b o o b to save two entire keystrokes.

  • Soap transformation example for Service Link

    soap transformation example for Service Link
    RC2008.3
    Oracle 10g
    Websphere 61
    IE6 & IE7
    Does anyone have a transformation example of a SOAP?
    I have been trying to build my trandformation, but I either get a NULL output or all of the data from the newScale output.
    Thank you
    Daniel
    Safeway

    Hi Daniel, I've attached two sample XSL files, an outbound and inbound. As you may already know, the 'payload' of the outbound XML depends on what's required by the external endpoint (3rd party system you're connecting to).

  • Unable to send a SOAP attachment(pdf) in a BPEL process

    Dear Forum,
    I have a requirement to attach a pdf and send it as part of a BPEL process response. Following are the details,
    1) I have a webservice which does the logic of building the pdf and returns it as a SOAP attachment. I have tested this service through SOAP UI and it works fine.
    2) I have a BPEL process which invokes the above webservice and returns the received pdf as a SOAP attachment.
    3) Since BPEL designer doesn't directly support the MIME attachments, I have modified the WSDL related to BPEL process to include MIME parts. Followed the steps as mentioned in the SOA suite documentation - http://docs.oracle.com/cd/B14099_19/integrate.1012/b14448/manipdoc.htm#BABDEEEB
    4) I have tested my bpel service through SOAP UI tool (cannot test it in 'em' console since my service has mime parts) but unable to receive the pdf attachment. BPEL process is throwing the following exception,
    <Mar 26, 2012 5:21:07 PM EDT> <Warning> <oracle.adfinternal.view.faces.renderkit
    .rich.TreeRendererUtils> <BEA-000000> <Context menu child is not a RichMenu>
    <Mar 26, 2012 5:22:19 PM EDT> <Error> <oracle.soa.bpel.engine.ws> <BEA-000000> <
    got RuntimeException
    java.lang.NullPointerException
    at oracle.integration.platform.attchmnt.AttachmentManagerImpl.encodeProp
    erties(AttachmentManagerImpl.java:569)
    at oracle.integration.platform.attchmnt.AttachmentManagerImpl.insertAtta
    chment(AttachmentManagerImpl.java:483)
    at oracle.integration.platform.attchmnt.AttachmentManagerImpl.storeAttac
    hment(AttachmentManagerImpl.java:189)
    at oracle.integration.platform.attchmnt.AttachmentManagerImpl.storeAttac
    hment(AttachmentManagerImpl.java:144)
    From the SOAP UI response(error message), I found that 'Content-Type' for this request is coming as 'text/xml' rather than 'mimemultipartrelated'. Is it not possible to send pdf attachments through BPEL? Please provide your inputs to resolve this issue. I am stuck up with this issue for a while now.

    Hi Vamsee,
    In my case pdf is returned by a webservice, not from any physical location. The example given there shows attaching a pdf file from physical location. But I will get the pdf as part of another webservice response. So I am assigning the attachment to a bpel variable after getting the webservice response. This is where my bpel process is throwing an exception mentioned above.
    Regards,
    Satya.

  • SOA Suite 11g - Email with attachments (Attachment from SOAP attachment)

    Hello,
    Can any one please help as to how I can do the following in Oracle SOA 11g:
    Using a BPEL process how can I send an Email with attachments where the attachment itself is coming from a SOAP attachment.
    The back ground is that we have portal sites from where the users can upload a document and then from their a SOA service is invoked and the attachment would be passed as (SOAP attachments) and then emails have to be send to users containing this uploaded document as the attachment.
    Thanks.
    feel free to email me [email protected]

    Yes, I need all supported standards and their version of SOA Suite 11g because my customer wants to upgrade from 10g to 11g, especially all supported standards and version number of OBPM 11g and OBPM 10g.
    A people has pasted all support standards and version number of OBPM 10g. I get a standard list of OSB.
    OBPM 11g supports:
    BPEL
    xml 1.0
    Servlet 2.3\JSP1.2 (J2EE 1.2),
    Servlet 2.4\JSP2.0(J2EE 1.4),
    Servlet 2.5\JSP2.1(Java EE 1.5)
    UDDI
    SOAP
    WSDL
    WS-BPEL for People
    XML Schema
    XPDL
    SOAP
    XQuery
    XLIFF
    XSL map
    XSLT
    UML
    Ant
    EJB 2.1, JPA/EJB 3.0
    JAAS
    Spring
    JAXB 1.0, JAXB 2.0
    XHTML
    HTML
    JSP
    JSF
    JSR-168
    XSQL
    WS-Policy
    But I cannot find the document about version number of the above standards

Maybe you are looking for

  • Why is dataacq.h missing from my installed version of CVI 5.5?

    I need the header file dataacq.h for some applications that I am using. I know the file is present on other versions of CVI 5.5 and want to know why the file was not installed (using standard install) on my system (Windows 98)

  • Dataguard Readonly Mode Script

    Is there any script available that shutdown the physical standby database, roll forward accumulated archivelogs , and then bring the database back up in a read only mode. I am trying to setup this for 10g dataguard and call from Enterprise manager or

  • What is sql query to print BOM hierarchy for a give item_number

    Hi, anyone is having sql query to print entire bom hiereachy for a given item number. Regards, ashok

  • I lost my labview CD and changed computer long time ago

    I lost my labview CD and changed computer long time ago. I bought labview student edition 8.6 years ago and I lost both the CD and the computer. Now I want to use the software again but I cant find were to download it or how to activate it. I have in

  • Can i keep installed cs4 cs3 and cs2 on a pc

    Hi I don't know if there are issues about have cs4 , cs3 and cs2 installed in the same pc I bought cs2 in italian and i have installed cs3 in english to follow the turorial more easily thanks