Soap w/Attachment

Hello All,
Is there any size limit for attachment in BPEL PM? I use 10.1.3 ver. I have a requirement of sending a word doc of size 1MB
Thanks,
Arun

Hi John,
I have attached a zip containing a little example that might help you. It shows
how to use a server-side handler to invoke a different operation (in the same
web service) than the one the caller invoked. The "backend" webservice implementation
(a SLSB) exposes two operations; sayHello(int,String) and sayHelloWithExtraData(int,String,String).
The caller calls sayHello, but the server-side handler intercepts the call and
invokes sayHelloWithExtraData instead! The results of the sayHelloWithExtraData
operation are what's actually returned to the caller of the sayHello operation.
Regards,
Mike Wooten
"John" <[email protected]> wrote:
>
Don Ferguson <[email protected]> wrote:
You could use a thread local variable. Unless you are dispatching
through JMS, the back end component will be invoked in the same threadas the
handler.
Hi Don.
Thanks for getting back to me, but I'm not sure I understand your answer.
How I would I go about creating a local variable on the thread in question?
As far as I know, the thread which invokes both the back-end component
and the
handler is transparent to the developer, so how would I code it in?
Or are you saying access the handler from the back-end via Thread.currentThread()?
In which case, assuming it's public, how would I know the instance name?
Would you clarify with a bit of code?
Thanks.
[johnkim.zip]

Similar Messages

  • Soap with Attachment

    Hello,
    I need to develop a WebDynpro application with NetWeaver 2.0 for SAP EP6 that call a remote web service in order to send an attached file with SWA (Soap With Attachment) methodology. The kind of file to attach is XML.
    Can someone give me refers or indications to implement it?
    Thanks and best regards,
    Matteo.
    Edited by: Matteo De Santis on Oct 21, 2008 11:45 AM

    Following link might help you :
    http://help.sap.com/erp2005_ehp_03/helpdata/EN/5e/ea656273b74cf386a1f29fc55721fd/frameset.htm
    Thanks.

  • Send SOAP DIME Attachment (please comment on my sample code)

    Hi All,
    I had hard time trying to find a send SOAP DIME attachment
    code for the web service. And here it is, I wrote one,
    but I use to easy way to deploy the service.
    I just simply change the extension .java to .jws,
    so, can you all tell me whether it will be a problem or not ?
    And please review my code below, I debugged and no error,
    but I am not sure if it is working right.
    Basiclly 2 operations:
    public String generateID(int artID)
    public File detachFile(String filename)
    Please comment on this code, I am trying to make it
    more robust, so, that I can redo it and post it to share with
    everybody.
    thanks,
    Derek
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.Iterator;
    import java.io.*;
    import java.security.*;
    import java.security.NoSuchAlgorithmException;
    import javax.activation.DataHandler;
    import javax.activation.FileDataSource;
    import javax.xml.soap.AttachmentPart;
    import org.apache.axis.AxisFault;
    import org.apache.axis.Message;
    import org.apache.axis.MessageContext;
    import org.apache.axis.attachments.Attachments;
    import org.apache.axis.attachments.AttachmentsImpl;
    import org.apache.log4j.Logger;
    public class AttachmentYPMG
         private static final Logger _logger = Logger.getLogger(AttachmentYPMG.class);
         public AttachmentYPMG()
         public String generateID(int artID)
              String artid = Integer.toString(artID);
              String md5_hash_string = plainStringToMD5(artid);
              return md5_hash_string;
         private String plainStringToMD5(String input) {
                // Some stuff we will use later
                MessageDigest md = null;
                byte[] byteHash = null;
                StringBuffer resultString = new StringBuffer();
                // Bad things can happen here
                try {
                  // Choose between MD5 and SHA1
                       md = MessageDigest.getInstance("MD5");
                } catch(NoSuchAlgorithmException e) {
                    System.out.println("NoSuchAlgorithmException caught!");
                    System.exit( -1);
                // Reset is always good
                md.reset();
                // We really need some conversion here
               md.update(input.getBytes());
                // There goes the hash
                byteHash = md.digest();
               //  Now here comes the best part
                for(int i = 0; i < byteHash.length; i++) {
                  resultString.append(Integer.toHexString(0xFF & byteHash));
              // That's it!
              return(resultString.toString());
         public File detachFile(String filename)
              InputStream is = null;
              FileOutputStream os = null;
              File file = null;
              int totalAttachments ;
              try
                   //Get all the attachments
                   AttachmentPart[] attachments = getMessageAttachments();
                   * getMessageAttachments() as provided by Steve Loughran in his mail
                   * to axis-user group
                   * http://www.mail-archive.com/[email protected]/msg08732.html
                   //Put the logic in a loop for totalAttachments for multiple
                   // attachments.
                   totalAttachments = attachments.length;
                   _logger.debug("saveFile(String filename = " + filename + ") - " +
                                  "Total Attachments Received Are: "+ totalAttachments);
                   //Extract the first attachment. (Since in this case we have only one attachment sent)
                   DataHandler dh = attachments[0].getDataHandler();
                   //Extract the file name of the first attachment.
                   String name = filename;
                   _logger.debug("saveFile(String filename = " + filename + ") - File received on server is: " + name);
                   //Get the streams to file and from attachment, then stream to disk
                   is = dh.getInputStream();
                   file = new File(name);
                   os = new FileOutputStream(file);
                   this.writeBuffersAndClose(is, os);
              } catch (Exception e)
                   _logger.error("detachFile(String filename = " + filename + ")", e);
                   //throw new AttachmentException(e);
              //if(file!= null)
                        return file;
              //else
                   //throw new AttachmentException("The attachment was not saved");
         * extract attachments from the current request
         * @return a list of attachmentparts or an empty array for no attachments
         * support in this axis buid/runtime
         private AttachmentPart[] getMessageAttachments() throws AxisFault
              * Reusing the method implementation for AttachmentPart[]
              * getMessageAttachments() as provided by Steve Loughran in his mail to
              * axis-user group
              * http://www.mail-archive.com/[email protected]/msg08732.html
              MessageContext msgContext = MessageContext.getCurrentContext();
              Message reqMsg = msgContext.getRequestMessage();
              Attachments messageAttachments = reqMsg.getAttachmentsImpl();
              if (null == messageAttachments)
                   System.out.println("no attachment support");
                   return new AttachmentPart[0];
              int attachmentCount = messageAttachments.getAttachmentCount();
              AttachmentPart attachments[] = new AttachmentPart[attachmentCount];
              Iterator it = messageAttachments.getAttachments().iterator();
              int count = 0;
              while (it.hasNext())
                   AttachmentPart part = (AttachmentPart) it.next();
                   attachments[count++] = part;
              return attachments;
         * Simple method for writing one stream from another.
         * @param is
         * @param os
         * @throws IOException
         private void writeBuffersAndClose(InputStream is, OutputStream os)
              throws IOException
              int i = 0;
              byte [] buffer = new byte[1024];
              while (i != -1)
                   i = is.read(buffer, 0, buffer.length);
                   if(i > 0)
                        os.write(buffer, 0, buffer.length);
              is.close();
              os.close();

    Hi All,
    I had hard time trying to find a send SOAP DIME attachment
    code for the web service. And here it is, I wrote one,
    but I use to easy way to deploy the service.
    I just simply change the extension .java to .jws,
    so, can you all tell me whether it will be a problem or not ?
    And please review my code below, I debugged and no error,
    but I am not sure if it is working right.
    Basiclly 2 operations:
    public String generateID(int artID)
    public File detachFile(String filename)
    Please comment on this code, I am trying to make it
    more robust, so, that I can redo it and post it to share with
    everybody.
    thanks,
    Derek
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.Iterator;
    import java.io.*;
    import java.security.*;
    import java.security.NoSuchAlgorithmException;
    import javax.activation.DataHandler;
    import javax.activation.FileDataSource;
    import javax.xml.soap.AttachmentPart;
    import org.apache.axis.AxisFault;
    import org.apache.axis.Message;
    import org.apache.axis.MessageContext;
    import org.apache.axis.attachments.Attachments;
    import org.apache.axis.attachments.AttachmentsImpl;
    import org.apache.log4j.Logger;
    public class AttachmentYPMG
         private static final Logger _logger = Logger.getLogger(AttachmentYPMG.class);
         public AttachmentYPMG()
         public String generateID(int artID)
              String artid = Integer.toString(artID);
              String md5_hash_string = plainStringToMD5(artid);
              return md5_hash_string;
         private String plainStringToMD5(String input) {
                // Some stuff we will use later
                MessageDigest md = null;
                byte[] byteHash = null;
                StringBuffer resultString = new StringBuffer();
                // Bad things can happen here
                try {
                  // Choose between MD5 and SHA1
                       md = MessageDigest.getInstance("MD5");
                } catch(NoSuchAlgorithmException e) {
                    System.out.println("NoSuchAlgorithmException caught!");
                    System.exit( -1);
                // Reset is always good
                md.reset();
                // We really need some conversion here
               md.update(input.getBytes());
                // There goes the hash
                byteHash = md.digest();
               //  Now here comes the best part
                for(int i = 0; i < byteHash.length; i++) {
                  resultString.append(Integer.toHexString(0xFF & byteHash));
              // That's it!
              return(resultString.toString());
         public File detachFile(String filename)
              InputStream is = null;
              FileOutputStream os = null;
              File file = null;
              int totalAttachments ;
              try
                   //Get all the attachments
                   AttachmentPart[] attachments = getMessageAttachments();
                   * getMessageAttachments() as provided by Steve Loughran in his mail
                   * to axis-user group
                   * http://www.mail-archive.com/[email protected]/msg08732.html
                   //Put the logic in a loop for totalAttachments for multiple
                   // attachments.
                   totalAttachments = attachments.length;
                   _logger.debug("saveFile(String filename = " + filename + ") - " +
                                  "Total Attachments Received Are: "+ totalAttachments);
                   //Extract the first attachment. (Since in this case we have only one attachment sent)
                   DataHandler dh = attachments[0].getDataHandler();
                   //Extract the file name of the first attachment.
                   String name = filename;
                   _logger.debug("saveFile(String filename = " + filename + ") - File received on server is: " + name);
                   //Get the streams to file and from attachment, then stream to disk
                   is = dh.getInputStream();
                   file = new File(name);
                   os = new FileOutputStream(file);
                   this.writeBuffersAndClose(is, os);
              } catch (Exception e)
                   _logger.error("detachFile(String filename = " + filename + ")", e);
                   //throw new AttachmentException(e);
              //if(file!= null)
                        return file;
              //else
                   //throw new AttachmentException("The attachment was not saved");
         * extract attachments from the current request
         * @return a list of attachmentparts or an empty array for no attachments
         * support in this axis buid/runtime
         private AttachmentPart[] getMessageAttachments() throws AxisFault
              * Reusing the method implementation for AttachmentPart[]
              * getMessageAttachments() as provided by Steve Loughran in his mail to
              * axis-user group
              * http://www.mail-archive.com/[email protected]/msg08732.html
              MessageContext msgContext = MessageContext.getCurrentContext();
              Message reqMsg = msgContext.getRequestMessage();
              Attachments messageAttachments = reqMsg.getAttachmentsImpl();
              if (null == messageAttachments)
                   System.out.println("no attachment support");
                   return new AttachmentPart[0];
              int attachmentCount = messageAttachments.getAttachmentCount();
              AttachmentPart attachments[] = new AttachmentPart[attachmentCount];
              Iterator it = messageAttachments.getAttachments().iterator();
              int count = 0;
              while (it.hasNext())
                   AttachmentPart part = (AttachmentPart) it.next();
                   attachments[count++] = part;
              return attachments;
         * Simple method for writing one stream from another.
         * @param is
         * @param os
         * @throws IOException
         private void writeBuffersAndClose(InputStream is, OutputStream os)
              throws IOException
              int i = 0;
              byte [] buffer = new byte[1024];
              while (i != -1)
                   i = is.read(buffer, 0, buffer.length);
                   if(i > 0)
                        os.write(buffer, 0, buffer.length);
              is.close();
              os.close();

  • RFC to soap with attachment

    Hi all,
    I need to implement a synchronous scenario where an R/3 system sends data via RFC to an external system that expects it in the format of soap with attachment. Then the external system responds with soap message without attachment.
    My main concern is how to create a soap attachment from payload that I get from the RFC sender adapter.
    I would appreciate any your suggestion how to implement this scenario. If possible, I would prefer to avoid using java modules and BPM, since I am not very skilled with them.
    Thanks Janos.

    >
    janos malizero wrote:
    > Hi all,
    >
    > I need to implement a synchronous scenario where an R/3 system sends data via RFC to an external system that expects it in the format of soap with attachment. Then the external system responds with soap message without attachment.
    > My main concern is how to create a soap attachment from payload that I get from the RFC sender adapter.
    > I would appreciate any your suggestion how to implement this scenario. If possible, I would prefer to avoid using java modules and BPM, since I am not very skilled with them.
    >
    > Thanks Janos.
    well i think your darkest fears just came true ... the only option here is to write a module to create the attachments for you. The trick is once the module create the attachment, you need to check the option keep attachments in the SOAP receiver CC.
    How to create modules -
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3bdc14e1-0901-0010-b5a9-a01e29d75a6a

  • InvalidSecurity Exception in WS and SOAP with Attachment

    Hi all, <bR>
    <br>
    I created a EJB based webservice with the following signature:      <br><br>
    public String businessMethod2(byte[] arg1) {..}<br>
    <br>
    <br>
    This Method is exposed as webservice, which is configured as SOAP with Attachment. <br>
    All security or authentication settings are disabled by intention. <br>
    The input param arg1 should be a binary file.
    <br><br>
    When I call this webservice I always get the following response: <br><bR>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" <br>
    xmlns:xs="http://www.w3.org/2001/XMLSchema" <br>
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><bR>
       <SOAP-ENV:Body><bR>
          <SOAP-ENV:Fault><bR>
             <faultcode xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><b>wsse:InvalidSecurity</b></faultcode><bR>
             <faultstring>000F1F90EDDB006C00000012000014D8000437A5EE6DAE4E : <b>WS Security can only be applied on a SOAP document.</b></faultstring><bR>
             <detail><bR>
                <ns1:com.sap.security.core.server.ws.service.WSSecurityException xmlns:ns1="http://sap-j2ee-engine/error">000F1F90EDDB006C00000012000014D8000437A5EE6DAE4E : WS Security can only be applied on a SOAP document.</ns1:com.sap.security.core.server.ws.service.WSSecurityException><bR>
             </detail><bR>
          </SOAP-ENV:Fault><bR>
       </SOAP-ENV:Body><bR>
    </SOAP-ENV:Envelope><bR>
    <br>
    <br>
    My guess is, that the WAS 7.00 SP11 is magically configured for applying WS-Security to every webservice. <br>
    <br>
    The Security Profile settings for Inbound / Outbound - Paramters is "None" in Visual Admin Webservice Security. <br>
    <br>
    How can I get rid of this Exception and make the webservice work?
    <br>
    <br>
    regards <br>
    Gabi  <br>

    http://newsgroups.bea.com/cgi-bin/dnewsweb?cmd=article&group=weblogic.developer.interest.webservices&item=4967
    grazieee wrote:
    >
    HI, i have found an example that illustrates the reception and return of SOAP attachments
    in web service method. However, the weblogic workshop I am using does not recognise
    'DataHandler'. I typed 'public String echoAttachment(DataHandler dh) and it said
    'web service does not support such data type'. Is there any resolution to it?
    And if convenient, can i have the source code of attaching images to SOAP?
    Thanks alot.
    Good Day!
    grazieee
    P/S: I'm using weblogic version 8.1

  • How can I get JAXM SOAP with Attachement parts?

    I received a SOAP with attachment message.
    Attached data is XML document("text/xml" type).
    But when I try to get a attachment part by using below source code, I got a NullPointerException.
    Iterator it = message.getAttachments();
    AttachmentPart attachment = (AttachmentPart)it.next();
    StreamSource content = (StreamSource)attachment.getContent(); <=content is not Null.
    InputStream inputstream = content.getInputStream(); <= inputstream is Null.
    StreamSource object is OK, but it doesn't return InputStream object.
    Does anyone know what the problem is?
    Thanks in advance.
    Junhong.

    Hi!
    Use the following to get the stream:
    InputStream is = attachment.getDataHandler().getInputStream();

  • SOAP w/Attachment: SwA question

    I am working on a SOAP w/Attachment web service to return an octet stream for a PDF file.
    If I understand how this works, the SOAP envelope indicates that the real data (the octet stream) is coming after the SOAP envelope. I have setup the web service in the HTML DB web services area and tested it. It returns a SOAP envelop and after it comes a bunch of data which I assume is the octet stream.
    I do not know what I need in the way of an XSL rendering style sheet to make this work. Is it even the right place to be looking to redirect the octet stream to the web browser as a know file format, in this case a PDF file.

    repost

  • Tool to test Webservices using SwA (Soap with Attachements)

    Hi All,
    I generally use the took xmlspy to test any webservice.
    But now i am working with a webservice that is using SOAP with Attachemtns.
    it seems we cannot use xmlspy to test/invoke webservices that use soap with attachements.
    is there any tool by which we can send/receive soap message along with attachements to and from webservices.

    Hi,
    Have you tried SoapUI?
    The standard (free) version & SoapUI Pro both support soap with attachments. Try it out & see if it works for you. SoapUI is proving to be one of the best tools for testing web services.
    Regards, Trevor

  • In Receiver Mail Adapter ,how to ignore SOAP Header attachment

    HI Folks,
    Am using Receiver Mail Adapter and am getting 2 attachments.
    1. one is Soap header which contains Control records
    2. payload
    I want only Payload as attachment and need to ignore SOAP Header(AT00001.xml).
    The configuration is as below:-Trasport protocol : SMTP
                                                Message Protocol: XIALL
    Please provide Inputs.
    Thanks & Regards
    Ashok Reddy

    Hi Gagandeep,
    Scenario: File------>mail( Bypass scenario)
    i had posted file in FTP and am getting attachment properly but aditionally am getting ATT00001.xml as SoapHeader.this i need to ignore.
    PFB Module Parametrs i used:
    localejbs/AF_Modules/MessageTransformBean   LocalEnterpriseBean    transform
    Modulekey                      Parameterattribute                        value
    transform                      Transform.ContentDisposition            attachment;filename=”Pocr_860.txt”
    transform                     Tansform.ContentType                       text/plain
    Regards
    Ashok

  • Issue in File to SOAP as Attachment

    Hi,
    I have scenario from File to SOAP.
    I ma to send two files one file as content of SOAP request and other one as file attachment. The problem is i cannot send message both file content and file attachment.
    Because when i select the "keep attachment" in the SOAP adapter  both content and attachment become attachment, but if i didn't tick, only content is display by the recipient without the attachment.
    How can i configure SOAP adapter so the recipient can receive both  content file and attachment file.
    Solution will be rewarded
    Thanks
    Jaideep Baid

    hi gaurav,
       actually my SOAP payload will be a file only but I wnat to send till a perticular node as a SOAP payload and rest part as an attachment.
    like
    message----Root node
          field 1
          field 2
          field 3
             subfield 1
             subfield 2
             subfield 3
             subfield 4
    SO i want till field2 it should go as payload and from field 3 i should go as attachment.
    OR i can make two files of different name.
    file1's content
       field 1
       field 2
    file2's content
        field 3
             subfield 1
             subfield 2
             subfield 3
             subfield 4
    Now in this case file 1 should go as SOAP payload and File2 as attachment.
    So that In XI i can see two different file one named as mainDocument and other one name as Attachment.
    Plzz suggest any solution
    Thanks
    Jaideep jain

  • Soap with attachment  To File scenario

    Hi All,
    In my scenario I need to read data on webservice with file in attachments. Webservice in will have two values- data in payload and file in attachments. And on the target side  two files one XML with data and one attachment must be created on the file directory.
    Can any one help me how this task can be implemented in XI
    Thanks in advance.
    Regards,
    Vikram

    Hi,
    some links about this topic:
    SOAP to file scenario
    Send a file usring SOAP adapter
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d23cbe11-0d01-0010-5287-873a22024f79
    Hope it helps.
    Regards
    Patrick

  • SOAP Message Attachment MIME Problem

    Hi there,
    I'm having problem trying to send a binary file with SOAP.
    I can send an XML Doc (MIME type text/xml) but when I try to put the ByteArrayInputStream that holds the binary file and the content to application/octec-stream
    I got this exception:
    javax.activation.UnsupportedDataTypeException: no object DCH for MIME type application/octet-stream
         at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:851)
         at javax.activation.DataHandler.writeTo(DataHandler.java:305)
         at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1089)
         at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:635)
         at javax.mail.internet.MimeMultipart.writeTo(MimeMultipart.java:233)
         at com.sun.xml.messaging.soap.MessageImpl.saveChanges(MessageImpl.java:371)
    Anyone had this problem ?
    Any work around ?
    Or this is a problem because the JAXM is not fineshed yet ?
    Thanks,
    Marcio

    Hey guys... I pray you are all still listening.
    I have been on the most mind numbing cookie trail ever (I'm blatantly lying - I'm a Java programmer!) following these blasted exception trails to an 'Unknown Source'
    After initially reading this thread I quickly knocked up ObjectDataSource as follows:
    import java.io.ByteArrayInputStream;
    import java.io.ByteArrayOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.ObjectInputStream;
    import java.io.ObjectOutputStream;
    import java.io.OutputStream;
    import java.io.Serializable;
    import javax.activation.DataSource;
    public class ObjectDataSource
    implements DataSource
         public static final long serialVersionUID;
         public static final String CONTENT_TYPE;
         static {
              serialVersionUID = 42L;
              CONTENT_TYPE = "application/x-java-serialized-object";
         } // end static initializer
         private byte[] objectBytes;
         private String contentId;
         public ObjectDataSource(Serializable object, String contentId)
         throws IOException
              if (contentId == null || contentId.equals(""))
                   this.contentId = object.getClass().getName();
              else
                   this.contentId = contentId;
              ByteArrayOutputStream baoStream = new ByteArrayOutputStream();
              ObjectOutputStream ooStream = new ObjectOutputStream(baoStream);
              ooStream.writeObject(object);
              ooStream.flush();
              ooStream.close();
              objectBytes = baoStream.toByteArray();
         } // end primary constructor
         public InputStream getInputStream()
         throws java.io.IOException
              ByteArrayInputStream baiStream = new ByteArrayInputStream(objectBytes);
              return new ObjectInputStream(baiStream);
         } // end getInputStream
         public OutputStream getOutputStream()
         throws java.io.IOException
              throw new IOException("Cannot write to this stream");
         } // end getOutputStream
         public String getContentType()
              return CONTENT_TYPE;
         } // end getContentType
         public String getName()
              return contentId;
         } // end getName
    } // end ObjectDataSource classand use it as follows:
    AttachmentPart attachment = soapResponse.createAttachmentPart();
    ObjectDataSource ods = new ObjectDataSource(requestedObject, null);
    attachment.setDataHandler(new DataHandler(ods));
    attachment.setContentId(ods.getName());
    soapResponse.addAttachmentPart(attachment);
    soapResponse.saveChanges();... this is within my 'SOAPServlet extends JAXMServlet' servlet, which happens to work fine when testing the servlet outside a web-container. But testing with Tomcat 5.5.x It doesn't work... infact, it damn well dissappears. I try readObject after retrieving and casting the InputStream to an ObjectInputStream from the AttachmentPart, but I get a:
    Exception in thread "main" java.lang.ClassCastException: java.io.ByteArrayInputStream which is totally bizzare!
    So I do a bit of investigation to discover ....
    application/x-java-serialized-object
    java.lang.String
    javax.mail.internet.MimePartDataSource
    java.io.ByteArrayInputStream
    0 // this would be the available bytes in the ByteArrayInputStreamNow the first two lines confirm my ObjectDataSource is there somewhere or that that data was sent over the wire (ha, i'm on the same damn machine), but where the hell did MimePartDataSource come from?
    I have previously encountered the various exceptions including java.io.EOFException when trying to read from the byte stream and java.io.StreamCorruptedException when wrapping that byte stream with an object stream.
    These setbacks have royally ****ed my project; cahnces are slim that it will get finished. I'm ready to give up.
    Any help will be appreciated?
    Warm regards,
    Darren B

  • File(PDF as attachment)-- XI-- WebService(SOAP with attachment)

    Hi i have following Scenerio in my hand,
    File>XI>WebService(SOAP)
    Kindly help me in implementing the Following Scenerio;
    I need to attach PDF to File Adapter as PayLoad or give it to File Adapter as Attachment which in turn send this data to XI and then XI wud generate WebService having this PDF as attachment.
    Kindly Walk me thru all the steps during Configuration and design and do guide me how to test wether this scenerio works or not.
    Also tell me abt the WebService i need to use to test the Scenerio.
    Thanks.

    Hi Jeet,
    If you want your file adapter to read contents from a PDF file, check out the folloing blog,
    <a href="/people/sap.user72/blog/2005/07/31/xi-read-data-from-pdf-file-in-sender-adapter">Sender File Adapter with PDF</a>
    If you want your file adapter to generate its output into a PDF file, then check the following blog,
    <a href="/people/sap.user72/blog/2005/07/27/xi-generate-pdf-file-out-of-file-adapter">Receiver File Adapter With PDF</a>
    Sriram's blog on FILE to HTTP scenario might of be help to you too. It also deals with Syn / Async Bridge which can be ignored.
    <a href="/people/sriram.vasudevan3/blog/2005/01/11/demonstrating-use-of-synchronous-asynchronous-bridge-to-integrate-synchronous-and-asynchronous-systems-using-ccbpm-in-sap-xi">File to HTTP</a>
    Do let us know if you need any further help,
    regards,
    Bhavesh

  • XML BLOB to SOAP with attachment

    Is it possible to receive in XI an asyc. message with BLOB information in an XML tag
    and transform it to SOAP message with attachment?

    >how to convert the BLOB to the pdf\jpg\tiff file attachment in the SOAP?
    refer this link for sample.. If you are not java programmer take help from java experts. Basically you have to use jdbc java classes to retrieve and convert the display into image.
    http://www.techlabs4u.com/2011/10/reading-blob-data-in-db2-using-java-how.html
    For soap attachment refer payloadswapbean module. Refer sdn forum related to this.... also see this help [link|http://help.sap.com/saphelp_nw73/helpdata/en/2e/bf37423cf7ab04e10000000a1550b0/frameset.htm]

  • Help converting or reading SOAP XML-attachment instead of payload

    Hi,
    I have to setup a webservice that excepts an xml-file as an attachment and read that xml-file as if it where the main payload of the message.
    The messages we receive holds all the data I need in the attachment instead of the data being in the SOAP-body itself. This isnt something I can change since this is a solution provided by amadeus e-travel and I have no chance of changing how they send data to us.
    I have searched and searched the forums but havent been able to find a solution(that I understand) to how I can access the xml-file either in a mapping-routine or by simply swapping the payload with the attachment all together.
    As of now I have a webservice that is functional and receives the call from the source(amadeus e-travel) without a problem. I can also see the attachment in SXMB_MONI where it looks like a perfect xml-structure. But I have no idea on how to access the attachment so that I can use the data inside it in an abap-proxy in our ECC-system.
    As far as I have read on the forums I cannot use the payloadswapbean in the SOAP senderadapter so that option is out. I have seen mention of a java-class for reading attachements in mapping-routines but sadly I'm not much of a Java-programmer and dont have access to one either at the moment. I would need a detailed explanation in order for a java-program to be a viable solution for me.
    Is there some trick I have missed here or blog that shows how to read xml-attachments in a soap-message?
    Is there any standard Java-code I can use to read the whole xml-structure from the attachment in a mapping-routine?
    Any help would be very much appreciated!
    Thanks in advance ,
    Halvor

    Option-1:
    This might be a crude way, but you can acheive by a 2 step process...
    Step1 (Scenario-1) - Receive XML-Msg + Attachment using SOAP Sender adapter. As we have payloadwaapbean module limitation in sender adapter. Let it be a passthru to receiver SOAP adapter. (Don't do any processing in integration engine, like msg mapping or thything). In Rx SOAP adapter,use payloadswapbean to swap XML msg with Payload and resent it to 2nd integration scenario...
    Step2(Scenario-2) - As you have the Attachment as main-payload, you can continue ur normal msg processing on it.
    Option2:
    SOAP messages can also be processed using AXIS-SOAP Adapter.. you can add XI module in it Check it if it might help you...
    http://help.sap.com/saphelp_nw04/helpdata/EN/45/a4a36de28552f7e10000000a1553f7/content.htm
    Regards,
    Siva Maranani

  • SOAP with Attachment Support in Web AS Java

    Hello,
    I want to write an extension to an existing Java application running on Web AS to take a PDF (which is a binary object in the context) and submit it using a Web Service call to a  Web Service running on a WebSphere App Server. My idea is to use SOAP with attachments to do this. I know how to create a simple Web Service call with the NWDS, but I am not so sure about a Web Service call with an attachment.
    1) Is SOAP with attachments supported in Web Java/NWDS?
    2) Does it require a specific Web AS 6.40 SP Stack?
    3) Has anyone used this before? Is there anything I need to consider (e.g. encoding of the attachment)?
    4) Is there a maximum file size for the attachment?
    You help is appreciated. And if I get it running I can show it at TechEd
    Cheers!
    Matthias

    I found what causes the problem.
    I use resource bundle to handle i18n and one of bundle is myapp_zh.properties for Chinese locale. In browser I add  Chinese [zh] in Language Preference then the web page should display Chinese character.
    What puzzles me is that encoding of the page with Chinese characters is Chinese Simplified (GB2312) rather than UTF-8. Tomcat correctly sets page Encoding to UTF-8 since I specify <%@ page language="java" contentType="text/html;charset=UTF-8" %> in each JSP file. Why Web AS ignores this and returns Chinese character in GB2312?
    Thanks a lot
    John

Maybe you are looking for