XI and Soap with attachments

We have a Http -> XI(3.0)-> Webservice scenario, where the webservice returns a SOAP response with one or more zip file as attachments.
Any information on configuring SOAP adapter to receive the multiple attachments and pass it to outbound http interface will be helpful.
Inorder to test this scenario, we are also looking for a webservice which can return one or more attachments. Please let us know if you happen to know of a similar webservice.

While configuring your SOAP Adapter in the Integration Directory you can select the option "Keep Attachments" under "Conversion Parameters"

Similar Messages

  • How to create Inbound SOAP With Attachments

    Hi All,
    Does someone know how to create an Inbound SOAP Message (from SAP XI to a Business System) with attachments?
    We get an Idoc from a SAP R/3 system and transform this Idoc to an other XML format messages, but we want this message as an attachment and not as the payload in the SOAP Envelope.
    We tried the PayloadSwapBean module, but we don't have an attachment to swap with, but maybe we used the wrong paramaters.
    Thanks,
    Frank

    Hi Stefan,
    Does this quick response mean I challenged you?
    Our scenario is that we send an IDoc (ORDERS05) from our R/3-backend-system to XI (3.0/SP15). In an integration process (A/S-bridge) we transform this IDoc to an UBL-Order XML-message, and we want to send this XML-message as an attachment to a (synchronous) SOAP-call to a vendor. Like I said, despite the SAPHelp-content, we don't get this working. Whatever we try, the UBL-Ordermessage is contained in the SOAP-body.
    What makes it even more strange, is that XI itself is based on the SOAP-with-attachments-standard...
    So, any help is much appreciated!
    Regards, Fred

  • Binary Attachments - MTOM vs. SOAP with Attachments

    Hello everybody,
    i am kind of stuck by implementing a soap to proxy scenario! I wanted to use MTOM to transfer the messages together with the attachments, but until now i couldn't find out if this is possible at all using the ws-adapter with backend proxy (version 701)!
    I have seen this already:
    http://help.sap.com/saphelp_nwpi711/helpdata/de/48/d5a1fe5f317a4e8e35801ed2c88246/frameset.htm
    unfortunately im not a abap coder, but i can see using attachments in proxys should work!
    But how? Am i forced to used soap with attachments on sending webservice? If yes, have you got an example for me?
    I would appreciate any help!
    Thanks in advance,
    Markus

    Hi Amar,
    thanks for your reply, i know the mtom theory, but i don't know how to do it with sap pi on proxy side!
    (By the way, your link throws a 404!)
    Using soap adapter with enabled "keep Attachments" option, the MTOM-Attachment is getting processed, but on proxy side, using soap adapter (keeping attachments) to call proxy, it crashes on the backend side (version 701).
    I tried to make a webservice out of the proxy in soamanager, but i didn't get this working, as i have never done this. Also i didn't find an option for mtom in soamanager. I am also wondering why mtom is only supported in ws-adapter 7.10 but not in 7.11, why is this? And is it possible to use soap-adapter on OB-side and WS-Adapter on IB-side, or can i only use ws-adapter for direct communication?
    Lot's of questions i am facing ;-)...
    Kind regards,
    Markus

  • Streaming soap with attachments

    dear all
    this might be a piece of cake for some of you out there but it is causing me a lot of stress given the fact that there is not enogh documentation out there regarding this topic
    I am writing a web service that uses soap with attachments to send a large streaming data,
    The concept works quite well but when I started to test it I got this problem.
    When my client program calls a method that should return a real time data the streaming starts after 10 seconds
    How can I avoid the fact that the message calls waits that long before the data starts streaming in?
    To be more specific
    I have a method that returns a streaming data in 10 seconds [getSteamingData(long seconds)]
    I would like to test if I already get some data steaming in after one second of it starts.
    To do so I started a thread that checks the OutputSteam size every 1 second and then compare the result with the previous size say a second ago, there should be an increase in size each second!!!
    But when I start the thread? the streaming does not start right away instead, it starts after 10 seconds causing the thread to return null size
    In real life with real large streaming data that 10 seconds could be 10 hours or God forbidden 10 years
    Is there a way around or is that not possible in SwA?
    Anybody have any idea
    thanks in advance

    Hi Aalap,
    In version 1 of WebLogic Workshop SOAP attachments are not supported.
    Attachments will be supported in the next version. If support for SOAP
    attachment is an important requirement for you application, you can use
    WebLogic Web Services which supports SOAP Attachments.
    Please refer to the following document for more information on this
    http://e-docs.bea.com/wls/docs70/webserv/index.html
    Thanks
    Raj Alagumalai
    WebLogic Workshop Support
    "Aalap" <[email protected]> wrote in message
    news:3da1ebc4$[email protected]..
    >
    >
    Hi,
    Does Workshop support SOAP with Attachments? I am writing a web servicewhich
    serves files (like MS-Word documents etc) to clients upon receiving theirrequest.
    So what are the various options for sending the file to the client?
    Please help.
    Thanks in advance.
    Regards,
    Aalap Parikh.

  • Can Oracle BPEL handle Doc/Lit SOAP with Attachments?

    I have successfully followed the instructions for using Oracle BPEL 10.1.3.4 to handle SOAP With Attachments with an RPC-style WSDL, detailed here:
    http://download-west.oracle.com/docs/cd/B31017_01/integrate.1013/b28981/manipdoc.htm#sthref955
    I have a simple Echo service that receives and attachment and responds with the same attachment.
    I actually would like to accomplish the same thing using a Doc/Literal Wrapped WSDL. My initial testing shows that BPEL can indeed receive the attachment ( I can see it in the dehydration store), but it is not added to the response.
    Is this possible using Doc/Lit with SwA in BPEL 10.1.3.4?

    As I've investigated the issue some more, I've found that the real issue is receiving an attachment on the SOAP response from the BPEL process. Using a Doc/Lit-Wrapped WSDL, I can receive a request with an attachment, and add it to outgoing requests successfully. But when I do a straight copy from the request message to the response message (Echo Service), the response contains the correct "href" attribute but there is no attachment, and moreover, no MIME multipart message is returned.
    NOTE: I was successful in using an RPC/Literal WSDL to accomplish the successful echo of the attachment.
    Also, when looking in the OPMN logs, I see the following line for the RPC-based BPEL process, but not for the Doc/Lit:
    <2009-11-23 13:43:35,684> <DEBUG> <attachment.collaxa.cube.engine> <CXBinaryDataHandler::createDataSource> for binary location=uuid:aaa091d17e1b5545:67c00c53:1252285bf07:-7fc2
    <2009-11-23 13:43:35,716> <DEBUG> <attachment.collaxa.cube.engine.data> <ConnectionFactory::getConnection> GOT CONNECTION 1 Autocommit = false
    <2009-11-23 13:43:35,716> <DEBUG> <attachment.collaxa.cube.engine> <CXBinaryDataHandler::createDataSource> for binary location=uuid:aaa091d17e1b5545:67c00c53:1252285bf07:-7fc1
    and the "binary location" value corresponds with the "href" attribute seen in the BPEL audit logs.

  • BPEL 11g SOAP with Attachments

    Does anyone have any examples utilizing SOAP with Attachments with BPEL 11g?
    I have previously worked with SwA in BPEL 10g, but I have not been able to successfully port my BPEL projects to 11g. I am able to send in an attachment without error, but the outgoing requests and/or responses do not contain the attachment as they should.
    Note: I am trying to use traditional SOAP with Attachments (hrefs) and not MTOM

    Hi ,
    Even we too have same requirement where soap with attachment (swa) has to pass through bpel process(11g).You hava mentioned that ur able to attach file to req..please can u share your sample for reference.
    Thanks for suggestions.

  • Webservice for soap with attachments

    HI
    I am try to develop webservice for soap with attachments for the sending images like jpg,tiff,gif.
    it works fine when I statically attach the file
    but when i pass dynamically the file name it will give me error for the call.invoke() method
    Following is the code and the error details
    I am using eclipse wtp2.0 and using weblogic appserver 8.1 and axis-1.4
    that is my configuration details.
    // This is my service code
    import java.io.File;
    import java.io.IOException;
    import javax.activation.DataHandler;
    import javax.activation.FileDataSource;
    import javax.mail.MessagingException;
    import javax.xml.soap.AttachmentPart;
    import javax.xml.soap.MessageFactory;
    import javax.xml.soap.SOAPBody;
    import javax.xml.soap.SOAPBodyElement;
    import javax.xml.soap.SOAPElement;
    import javax.xml.soap.SOAPPart;
    import javax.xml.soap.SOAPException;
    import javax.xml.soap.SOAPMessage;
    import org.apache.axis.Message;
    import org.apache.axis.MessageContext;
    import org.apache.axis.message.SOAPEnvelope;
    //import org.apache.axis.soap.MessageFactoryImpl;
    import com.sun.corba.se.spi.activation.Repository;
    public class AttachmentServer1
         SOAPMessage msg = null;
         Message response= null;
         FileDataSource fileSource;
         DataHandler dataHandler = null;
         MessageContext context = null;
              public void sendImage(String fileName) throws MessagingException, IOException{
              try {
                        //java.lang.System.setProperty("javax.xml.soap.MessageFactory","com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl");
                        java.lang.System.setProperty("javax.xml.soap.MessageFactory","org.apache.axis.soap.MessageFactoryImpl");
                        MessageFactory fac = MessageFactory.newInstance();
                        msg = fac.createMessage();
                        context = MessageContext.getCurrentContext();
                        response = context.getRequestMessage();
                        if(msg != null){
                             System.out.println("From inside if statement");
                             //File f = new File("D:/1.png");
                             File f = new File(fileName);
                             fileSource = new FileDataSource(f);     
                             dataHandler =new DataHandler(fileSource);
                             System.out.println("From inside if statement 1");
                             AttachmentPart part = msg.createAttachmentPart(dataHandler);
                             System.out.println("From inside if statement part");
                             //part.setContentType("image/jpeg");
                             //part.setMimeHeader("Content-Type", "image/jpg");
                             //part.setContent(dataHandler, "image/jpg");
                             SOAPPart soapPart = msg.getSOAPPart();
                             javax.xml.soap.SOAPEnvelope envelope = soapPart.getEnvelope();
                             SOAPBody body = envelope.getBody();
                             SOAPBodyElement bodyElement = body.addBodyElement(envelope.createName("attach"));
                             SOAPElement element = bodyElement.addChildElement(envelope.createName("parent"));
                             System.out.println("From inside if statement 2");
                             part.setContentId("axis");
                             msg.addAttachmentPart(part);
                             element.addAttribute(envelope.createName("href"), part.getContentId());
                             System.out.println("From inside if statement 3");
                             msg.saveChanges();
                             System.out.println("From inside if statement 4");
                             System.out.println(part.getContentId());
                        }else
                             try {
                                  throw new Exception("Responce message is null");
                             } catch (Exception e) {
                                  // TODO Auto-generated catch block
                                  e.printStackTrace();
                   } catch (SOAPException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
    // This is the client code
    import java.io.File;
    import java.io.FileOutputStream;
    import java.util.Iterator;
    import javax.activation.DataHandler;
    import javax.xml.namespace.QName;
    import javax.xml.soap.AttachmentPart;
    import javax.xml.soap.SOAPBody;
    import javax.xml.soap.SOAPException;
    import org.apache.axis.Message;
    import org.apache.axis.MessageContext;
    import org.apache.axis.client.Call;
    import org.apache.axis.client.Service;
    import org.apache.axis.message.SOAPEnvelope;
    public class AttachmentClient {
         public static void getImage(){
              try{
                   String endPoint = "http://localhost:7001/Test/services/AttchmentServer";
                   Service service = new Service();
                   Call call = (Call)service.createCall();
                   call.setOperationName(new QName("sendImage"));
                   call.setTargetEndpointAddress(endPoint);
                   call.setUseSOAPAction(true);
                   call.invoke(new Object[] {});
                   MessageContext context = call.getMessageContext();
                   Message msg = context.getCurrentMessage();
                   Iterator obj = msg.getAttachments();
                   while(obj.hasNext()){
                        try{
                             AttachmentPart part = (AttachmentPart) obj.next();
                             File graphFile = new File("test.jpg");
                             FileOutputStream outputStream = new FileOutputStream(graphFile);
                             DataHandler dataHandler = part.getDataHandler();
                             if(dataHandler != null){
                                  dataHandler.writeTo(outputStream);
                                  outputStream.flush();
                                  System.out.println("File Saved at:"+graphFile.getAbsolutePath());
                             }else{
                                  System.out.println("null");
                        }catch(Exception e){
                             e.printStackTrace();
              }catch(Exception e){
                   e.printStackTrace();
         public static void main(String args[]) throws SOAPException
              getImage();
    // The error is something like that
    - Exception:
    java.lang.RuntimeException: javax.mail.MessagingException: Error in input stream;
    nested exception is:
         java.io.IOException: End of stream encountered before final boundary marker.AxisFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:
    faultString: javax.mail.MessagingException: Error in input stream;
    nested exception is:
         java.io.IOException: End of stream encountered before final boundary marker.
    faultActor:
    faultNode:
    faultDetail:
         {http://xml.apache.org/axis/}stackTrace:javax.mail.MessagingException: Error in input stream;
    nested exception is:
         java.io.IOException: End of stream encountered before final boundary marker.
         at javax.mail.internet.InternetHeaders.load(InternetHeaders.java:122)
         at javax.mail.internet.InternetHeaders.<init>(InternetHeaders.java:93)
         at org.apache.axis.attachments.MultiPartRelatedInputStream.readTillFound(MultiPartRelatedInputStream.java:499)
         at org.apache.axis.attachments.MultiPartRelatedInputStream.readAll(MultiPartRelatedInputStream.java:433)
         at org.apache.axis.attachments.MultiPartRelatedInputStream.getAttachments(MultiPartRelatedInputStream.java:439)
         at org.apache.axis.attachments.AttachmentsImpl.mergeinAttachments(AttachmentsImpl.java:171)
         at org.apache.axis.attachments.AttachmentsImpl.getAttachmentByReference(AttachmentsImpl.java:341)
         at org.apache.axis.encoding.DeserializationContext.getObjectByRef(DeserializationContext.java:617)
         at org.apache.axis.encoding.ser.JAFDataHandlerDeserializer.populateDataHandler(JAFDataHandlerDeserializer.java:74)
         at org.apache.axis.encoding.ser.JAFDataHandlerDeserializer.startElement(JAFDataHandlerDeserializer.java:59)
         at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1048)
         at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
         at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
         at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:345)
         at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
         at org.apache.axis.client.Call.invoke(Call.java:2467)
         at org.apache.axis.client.Call.invoke(Call.java:2366)
         at org.apache.axis.client.Call.invoke(Call.java:1812)
         at AttachmentClient2.getImage(AttachmentClient2.java:27)
         at AttachmentClient2.main(AttachmentClient2.java:58)
         {http://xml.apache.org/axis/}hostname:solusoft18
    javax.mail.MessagingException: Error in input stream;
    nested exception is:
         java.io.IOException: End of stream encountered before final boundary marker.
         at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
         at org.apache.axis.attachments.MultiPartRelatedInputStream.readTillFound(MultiPartRelatedInputStream.java:609)
         at org.apache.axis.attachments.MultiPartRelatedInputStream.readAll(MultiPartRelatedInputStream.java:433)
         at org.apache.axis.attachments.MultiPartRelatedInputStream.getAttachments(MultiPartRelatedInputStream.java:439)
         at org.apache.axis.attachments.AttachmentsImpl.mergeinAttachments(AttachmentsImpl.java:171)
         at org.apache.axis.attachments.AttachmentsImpl.getAttachmentByReference(AttachmentsImpl.java:341)
         at org.apache.axis.encoding.DeserializationContext.getObjectByRef(DeserializationContext.java:617)
         at org.apache.axis.encoding.ser.JAFDataHandlerDeserializer.populateDataHandler(JAFDataHandlerDeserializer.java:74)
         at org.apache.axis.encoding.ser.JAFDataHandlerDeserializer.startElement(JAFDataHandlerDeserializer.java:59)
         at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1048)
         at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
         at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
         at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:345)
         at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
         at org.apache.axis.client.Call.invoke(Call.java:2467)
         at org.apache.axis.client.Call.invoke(Call.java:2366)
         at org.apache.axis.client.Call.invoke(Call.java:1812)
         at AttachmentClient2.getImage(AttachmentClient2.java:27)
         at AttachmentClient2.main(AttachmentClient2.java:58)
    Caused by: javax.mail.MessagingException: Error in input stream;

    Hi David,
    The "covert byte[] to a base64 encoded string" solution, is probably your best
    bet given the scenario you described.
    Regards,
    Mike Wooten
    "David Ruana" <[email protected]> wrote:
    >
    Weblogic 6.1 (SP2) does not support SOAP with attachments. In the meanwhile,
    what
    is the best approach in order to send a SOAP message which has binary
    data?
    My EJB is currently receiving a byte[] and returning also a byte[]. The
    only solution
    I can think of right now is to convert the byte[] into a String in base64
    format.
    Would you recommend that?
    Thanks in advance.

  • SOAP with attachments, attachment streaming

    Hello all,
    We are currently in the process of designing an integration service that uses web services (SOAP) as the means of communication.
    There are very large binary attachments included with these SOAP messages. MTOM ja SAAJ are to be used (propably CXF).
    However, as these attachments are very large (100MB), I would like to stream the attachments "through" the integration server.
    Is this possible? Can I somehow stream the SOAP attachment from the source system directly into the target without saving it as a whole into the integrating server application?
    Thank you for all your help! All solution suggestions are apprechiated :-)

    Hi Aalap,
    In version 1 of WebLogic Workshop SOAP attachments are not supported.
    Attachments will be supported in the next version. If support for SOAP
    attachment is an important requirement for you application, you can use
    WebLogic Web Services which supports SOAP Attachments.
    Please refer to the following document for more information on this
    http://e-docs.bea.com/wls/docs70/webserv/index.html
    Thanks
    Raj Alagumalai
    WebLogic Workshop Support
    "Aalap" <[email protected]> wrote in message
    news:3da1ebc4$[email protected]..
    >
    >
    Hi,
    Does Workshop support SOAP with Attachments? I am writing a web servicewhich
    serves files (like MS-Word documents etc) to clients upon receiving theirrequest.
    So what are the various options for sending the file to the client?
    Please help.
    Thanks in advance.
    Regards,
    Aalap Parikh.

  • Web Service with attachments (SOAP with attachments) without PI

    Hi,
    Is it possible to send across file(say PDF) using ABAP web services. I know it can be done with Java using SOAP with attachments. Is something similar available for ABAP ? since if we transfer raw binary data as type string / xstring it may have a performance impact.
    I could not see any option for attachments when using web service wizard from SE37 / soamanager
    Note I am not using PI, this Web service would be consumed by a 3rd party tool. There is very little material available on transferring files using web service with SOAP attachments.
    Regards,
    Aditya

    Hi thanks for your input, but did you have to encode your binary data stream in say Base64 / utf-8 ? Also if you are transferring files in bulk(say 10 -100 files)  how does your web  service indicate end of one file or what is the best way so as to avoid performance problems.
    Regards,
    Aditya

  • HTTPS or SOAP with attachments as text files

    Hi ,
    I it possible to receive or send text files using SOAP with attachments or HTTPS with attachments?
    Best Regards,
    Harleen Kaur Chadha

    Hello Harleen,
                  Check the following links, where you can send the text files as attachments.
    Sending Text file without mapping using SOAP
    /people/william.li/blog/2006/09/08/how-to-send-any-data-even-binary-through-xi-without-using-the-integration-repository
    Regards..
    Krishna..

  • Soap with attachments

    I am a newbie to Soap do anyone have examples on soap with attachment.My requirement I need to send a zip file as an attachment from server to client using soap protocol and download that on client.I think we can do with SAAJ but do anyone have example..I need it immediately.Thanks in advance.
    Ragavendra.

    The jwsdp 1.1 tutorial has an example of using saaj to add an attachment to a soap message. See JWSDP_HOME\docs\tutorial\doc\JAXM5.html and search for "Adding Attachments". For attaching a zip file, a DataHandler is probably easiest:
    DataHandler dh = new DataHandler(new FileDataSource("skwish.zip"));
    AttachmentPart attachment = message.createAttachmentPart(dh);
    attachment.setContentId("zip_data"); // optional
    message.addAttachmentPart(attachment); Mike

  • 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

  • Query on SOAP with attachments with Weblogic

    Hi all,
    I'm new to webservice and workshop, and I have to develop a webservice using bea workshop to be able to process multiple files and store it on a document server. I suppose that the webservice clients will be able to formulate their request in the form of SOAP messages with attachments(documents to be stored), but I'm not sure whether this is the best method and weblogic(8.1) supports it.
    Currently I have created a jws file which has successfully connected and been authenticated by the Document server, so for my next step, I'm trying to create a new file in the document server but I'm stuck at trying to write code to get attachment from the SOAP message in the jws file. Can anyone enlighten me?
    Thanks!

    Hi
    WebLogic Workshop web services can exchange one or more SOAP attachments.
    There is a sample and information on how to do that under the link
    http://e-docs.bea.com/workshop/docs81/doc/en/workshop/guide/getstarted/conUsingSOAPAttachments.html
    Thanks
    Vimala

  • WLS7 WebServices SOAP with attachments problem

    I have implemented a WebService in Weblogic. If I use the standard Sun
              JAXM library to invoke the service without any attachments, it works
              fine. However, if I use the standard JAXM functionality to add a gif
              image to the message, Weblogic throws an exception (attached below)
              before it even invokes the handler class for my Web Service.
              Basically, the JAXM library does not insert the "start=..." element in
              the top level "Content-Type" HTTP header field. Should Weblogic cope
              with this, or is it not designed to work with the Sun JAXM library. I
              am using the latest version of the Sun WebServices Developers Kit and,
              hence, the latest version of the JAXM library. Do BEA recommend a
              different client library be used to invoke Weblogic WebServices? If
              so which one(s) are supported?
              I have another question. Assuming I can find a client which will
              deliver to Weblogic an HTTP SOAP mesage that it considers to be valid,
              how do attachments get passed to the "component" class? I understand
              how I could iterate through the mime segments / attachments from
              within the "handler", but I don't understand how / if attachments are
              passed onto the actual component class. Reading from the FAQ:
              Q. Does WebLogic Server 7.0 support SOAP Messages with Attachments?
              A. Yes. As long as the data type of the attachment is on the list of
              supported JAX-RPC data types, then WebLogic Server will automatically
              handle parameters to Web services that are SOAP attachments. If you
              want to do further processing of the attachment, you can use handlers
              to intercept the request and response SOAP message (which includes the
              attachment.)
              I get the impression that attachments are "magically" available to
              code within the component, but I don't understand the actual mechanics
              of this.
              Any thoughts would be gratefully received.
              Cheers,
              Steve
              javax.xml.soap.SOAPException: No start attachment specified in the
              Multipart/Rel
              ated document
              at weblogic.webservice.core.soap.SOAPMessageImpl.handleMimeMessage(SOAPM
              essageImpl.java:174)
              at weblogic.webservice.core.soap.SOAPMessageImpl.<init>(SOAPMessageImpl.
              java:118)
              at weblogic.webservice.core.soap.MessageFactoryImpl.createMessage(Messag
              eFactoryImpl.java:27)
              at weblogic.webservice.binding.soap.HttpServerBinding.receive(HttpServer
              Binding.java:50)
              at weblogic.webservice.core.DefaultWebService.invoke(DefaultWebService.j
              ava:216)
              at weblogic.webservice.server.servlet.ServletBase.serverSideInvoke(Servl
              etBase.java:362)
              at weblogic.webservice.server.servlet.WebServiceServlet.serverSideInvoke
              (WebServiceServlet.java:269)
              at weblogic.webservice.server.servlet.ServletBase.doPost(ServletBase.jav
              a:346)
              at weblogic.webservice.server.servlet.WebServiceServlet.doPost(WebServic
              eServlet.java:237)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
              at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
              (ServletStubImpl.java:1058)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
              pl.java:401)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
              pl.java:306)
              at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
              n.run(WebAppServletContext.java:5412)
              at weblogic.security.service.SecurityServiceManager.runAs(SecurityServic
              eManager.java:744)
              at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
              rvletContext.java:3086)
              at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
              pl.java:2544)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
              <08-Jan-03 15:22:54 GMT> <Error> <HTTP> <101017>
              <[ServletContext(id=2655643,nam
              e=mms_service_05.war,context-path=/mms_service_05)] Root cause of
              ServletExcepti
              on
              javax.xml.soap.SOAPException: No start attachment specified in the
              Multipart/Rel
              ated document
              at weblogic.webservice.core.soap.SOAPMessageImpl.handleMimeMessage(SOAPM
              essageImpl.java:174)
              at weblogic.webservice.core.soap.SOAPMessageImpl.<init>(SOAPMessageImpl.
              java:118)
              at weblogic.webservice.core.soap.MessageFactoryImpl.createMessage(Messag
              eFactoryImpl.java:27)
              at weblogic.webservice.binding.soap.HttpServerBinding.receive(HttpServer
              Binding.java:50)
              at weblogic.webservice.core.DefaultWebService.invoke(DefaultWebService.j
              ava:216)
              at weblogic.webservice.server.servlet.ServletBase.serverSideInvoke(Servl
              etBase.java:362)
              at weblogic.webservice.server.servlet.WebServiceServlet.serverSideInvoke
              (WebServiceServlet.java:269)
              at weblogic.webservice.server.servlet.ServletBase.doPost(ServletBase.jav
              a:346)
              at weblogic.webservice.server.servlet.WebServiceServlet.doPost(WebServic
              eServlet.java:237)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
              at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
              (ServletStubImpl.java:1058)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
              pl.java:401)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
              pl.java:306)
              at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
              n.run(WebAppServletContext.java:5412)
              at weblogic.security.service.SecurityServiceManager.runAs(SecurityServic
              eManager.java:744)
              at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
              rvletContext.java:3086)
              at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
              pl.java:2544)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
              >
              

    import javax.activation.DataHandler;
    public class EchoAttachmentService implements com.bea.jws.WebService
    static final long serialVersionUID = 1L;
    * @common:operation
    * @jws:protocol form-get="false" form-post="false"
    public String echoAttachment(DataHandler dh)
    return("***Service received DataHandler of type: " + dh.getContentType());
    Error Description:
    ERROR: EchoAttachment.jws:19: Java type DataHandler is unsupported over a web
    service.
    SUGGESTION: Use a supported type such as a class with public fields, a JavaBean,
    a primitive type, String, BigInteger/BigDecimal, Calendar, GDate/GDuration, QName,
    URI, byte[], or an XMLBeans type.

  • What is the best book on XML and SOAP with Java?

    I need to learn xml and soap. Could someone recommend a book or tutorials on the subject. I have just went through teach yourself java in 21 days.
    Thank you
    Noah

    Well using XML is very easy and I can assure you that a simple tutorial can get you on the right track quickly. A quick google search gave me this one, which looks like a good start: [http://totheriver.com/learn/xml/xmltutorial.html|http://totheriver.com/learn/xml/xmltutorial.html]
    As for SOAP, that is a more complex subject. You are looking for JAX-WS (Java API for XML webservices). I suggest checking out amazon.com searching for "java web services". The user reviews should give you a very good idea which book is good and which one stinks.

Maybe you are looking for

  • Rating photos, during slideshow, iPhoto 9.6/Yosemite

    Hello I used to be able to run a simple slideshow of images in iPhoto, and click on rating stars as it ran, great for easy photo sorting. I've updated to Yosemite & iphoto 9.6, and I can see how to do this anymore ? Any ideas?  Thanks

  • [SOLVED]Failed to find root device after linux (3.6) upgrade on raid 1

    on a test machine pacman -Syu offers linux-3.6.2-1. After a successfull update the system won't boot anymore with the following error: [ 0.000000] tsc: Fast TSC calibration failed :: running early hook [udev] :: running hook [udev] :: triggering ueve

  • Cannot see CCMS Monitor Templates - System is not configured

    I just finished installing SAP Netweaver Trial, and I have been able to login using the SAP* and DDIC accounts. I can see the standard tree via the SAP client GUI. I am trying to take a look at the CCMS Monitor Sets, and I can see the standard collec

  • Acrobat prints one page at correct size/rest are resized

    Hello, I have an issue with one of our users when printing 11x17. The first page prints at the correct size, but all the rest are resized to tiny thumbnails. Roughly 0.5x1 inches in the top right corner. I've tried reinstalling our Canon print driver

  • Reg:Transportation Information

    Dear All I have no idea about the transportation, plz explain me in detail regarding the transportation so it will help to me alot to my carrer. Regards manikanta Please search the forum. Edited by: Pravender on Jun 2, 2010 4:24 PM