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.

Similar Messages

  • 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.

  • 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

  • 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

  • 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.

  • 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

  • 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.

  • 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.

  • 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..

  • 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.

  • 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

  • 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

  • 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

  • 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"

  • Running web services on OC4J with attachments problem

    Hi,
    I have problem with running Web Services with Attachment on AS 10.1.3 (SOAP: RCP/LItteral 1.1).
    I generate WS Bottom-Up from java class in Jdeveloper 10.1.3 (3673) :
    package project2;
    import javax.xml.soap.AttachmentPart;
    public class TestWS {
    public TestWS() {
    public String getText() {
    return "testWS text" ;
    public AttachmentPart getAttach() {
    AttachmentPart ap = null ;
    /* try {
    javax.xml.soap.MessageFactory mf = MessageFactory.newInstance();
    javax.xml.soap.SOAPMessage message = mf.createMessage();
    ap = message.createAttachmentPart(attachmentObj,"application/pdf");
    } catch (Exception e) {e.printStackTrace(); return null ;}
    return ap ;
    When testing WS through EM - Web services - Test Web Service, failed with exception:
    500 Internal Server Error
    java.lang.NullPointerException
    at oracle.j2ee.ws.server.WebServiceServlet.displayErrorPage(WebServiceServlet.java:742)
    at oracle.j2ee.ws.server.JAXRPCServlet.doGet(JAXRPCServlet.java:422)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:719)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.AJPRequestHandler.run(AJPRequestHandler.java:299)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.AJPRequestHandler.run(AJPRequestHandler.java:187)
    at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    at java.lang.Thread.run(Thread.java:595)
    WS without attachment works fine. Any advice?
    Thx.
    Wollis

    It's probably "web services home page" bug, ws proxy client works fine.

Maybe you are looking for

  • Extra Hard Drive

    I am running a Mac Mini and have used Boot Camp to load both Mac OSX and Windowa XP. They work fine , each with about 30 GB of Hard Drive. I now want to expand the Hard Drive capacity , equally for both Operating Systems. I have a free-standing 120 G

  • What is the best ebook reader for Macs?

    Hi, What is the best ebook library / reader for Macs? I have a Kindle for the actual reading, but wanted some sort of nice display library to sort and browse my books. Any help is appreciated. Thanks! david

  • Freeze in Single User mode

    Hi, my iMac G5 is freezing right away when I boot in single user mode. I mean right away at the prompt. I cannot even start typing anything. The fan start at 100% and I have to hard shutdown the machine. This happens ALL the time I boot in single use

  • Safari Unable to Connect with Gmail Server?

    I tried to log into Gmail this morning. The top of the page shows, "Redirecting" and then I get an error message of: Safari can't connect to the server. Safari can't open the page "http://mail.google.com/mail/?zx=1f097o2n9gp73&zx=1kh3f7h1am1kh&zx=1cs

  • Run Adobe AIR app as Windows Service

    I have an app which monitors an RSS feed. Upon an emergency, the RSS feed is updated. The app detects the change and launches (from the taskbar/dock) full screen, plays an alarm sound and displays the message. Is it possible to run this app as a serv