Critical Issue:-- Convert SOAP Attachment into SOAP Body

   My requirment is
FTP----> SOAP synchronous.
In this one  at SOAP receiver side SOAP request is an attachment file and response also I m getting as an attachment.
My problem is that I need to convert this SOAP response (attachment)  in SOAP body so that I can map it with FTP datatype.
I used PayLoadSwapBean module but i m unable to convert this attachment into SOAP Body.
I just followed this blog 
The specified item was not found.
May be i m not using this module in a proper mannner.
Can anybody explan it step by step.
Is there anyother solution for my problem..
<It is against the rules of Engagement to post a question with the catch of awarding points. Please refrain from the same.>
Jaideep Jain
Edited by: Bhavesh Kantilal on Dec 3, 2008 10:26 AM

hi stefan,
  I m getting this error after using PayloadSwapBean. Object not found in lookup of payloadSwapBean
I m mentioning here the value of parameter name and value for this module:--
parameter name                                    parameter value
swap.keyName                                        payload-name
swap.keyValue                                        MainAttachment
Can u suggest where i went wrong.....
Edited by: Jaideep Baid on Dec 5, 2008 9:27 AM

Similar Messages

  • Convert SOAP Attachment into SOAP Body

    I am getting the response from external system through SOAP attachment, how to convert it into soap body.
    Is there any other alternative apart from PayloadSwapBean, if not, let me know the steps of the same.

    Hi Krish,
    It is not possible to use adapter module (Custom or standard) in SOAP sender adapter and this thing is clearly mentioned in
    But you can use axis adapter to use module (Axis adapter is extention to soap adapter). It provides modules which are flexible enough to fulfil your requirment.
    If you are using Receiver SOAP adapter then youn can either have PayloadSwipeBean or your own adapter module. And it is possible to convert the attachment to the payload using custom module.(I have Done this)
    There is method available getAttachment() of type. Just Check API.
    Sunil Singh

  • Error converting DOM nodes into SOAP nodes

    i am doing an http call using http binding activity in oracle soa suite 11g.The http call requires some header information.When I pass the header information through headers in invoke activity and invoke the http call,I get an error " Error converting DOM nodes into SOAP nodes".What might be the reason and how to solve it.

    It appears your code is trying to repeat messagePart itself. Split Joins strictly adheres to a WSDL definition for incoming and outgoing messages.
    Instead of repeating <RootElement> which is defined as single occurance in your message definition within WSDL, you should find a way to tweak the WSDL to have "repetitive node which will become single message after split" within 1 Root element.
    This will call for having need of implementing transformation within split join based on need of target input message. Below is the example:
    WSDL contains:
    <wsdl:message name="inputMessageName">
         <wsdl:part name="partInput" element="rootElement"/>
    What your current xml structure is(please note how message itself is repeating below while it has been defined as single in wsdl, unfortunately there is nothing maxOccurs for message in WSDL definition , although you can define multiple parts but that is not case here):
    What Split-Join expects(If you have existing wsdl then you need to tweak it to conform to below kind of structure then use transformation within split join to convert it into correct xml structure for outgoing):
    I hope this helps.

  • Mail Receiver and Attachment Issue - how to get an attachment into the body

    I have an abap proxy that sends a simple message to XI with a pdf attachment. XI maps the xml message to the Mail Adapters Mail Package format.
    To have the email sent with the PDF attachment I must click the "keep attachments" option. However this also has the side-effect of making the message payload an attachment as well (seems silly?). Therefore I get an email with two attachments: one is the PDF and the other is the plain text that should be in the email body.
    The question is: How do I get that plain text attachment back into the Message Body ? I have tried all combinations of the MessageTranformBean and the PayloadSwapBean with no luck.
    I can easily change the names of the attachments with the MessageTransformBean but if I set the text attachment to Transform.ContentDisposition inline, it still just comes out as an attachment. And, if I use the payloadswapbean the adapter log says it corectly swapped the right payload however the email still comes out with the text as an attachment!!
    Any ideas on how I can do this? Is it a bug in the module beans?
    (I'm using MS Outlook as the email client.)
    Maybe I need to write my own module bean to do this... If I set keep attachments to OFF, can I still set the PDF attachment with my own modules (the reason I ask this is that with keep-attachment OFF, the message body correctly has the text in it...
    Edited by: Jason Scott on Mar 6, 2008 3:22 AM

    Check these
    /people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step [original link is broken] [original link is broken] [original link is broken]

  • Very urgent Issue - Convert the hours into Minutes

    Hello Guys,
    I have an infoobject zkabc, which is having hour information.
    eg: 24.588, which means 24 hrs and 30 min (..588 hrs).
    I want to display the infoobject value from 24.588 to 24.30 (24 hrs 30 minutes) is it possible in BEx.
    Issue critical.

    Hello Kapadia,
    I have a small issues in the solution you gave me.
    I am getting the correct values when i implement the below formula you gave me.
    But i am getting incorrect values when i want to have average values.
    Lets say,
    I have 3 records in 2007 05 ( may month)
    I am getting the correct data for the 3 records, but when i have result for the 2007 05 month its giving different values.
    K1(plant)     2007(yr)     May     5/29/2007     9.06     15.29     24.35
                   5/30/2007     7.50     21.43     29.33
                   5/31/2007     7.36     15.25     23.01
                                           Result     3.02     7.14     9.78
    It should be  sum of 3 records / no of records)
    Could you please explain how to solve the issue. Issue very critical.

  • SOAP BODY data to be Put into SOAP Header

    Hi All,
    Could you kindly help me out in this issue?
    Basically our Requirement is to send the UserID and Password stored in
    the R/3 system to the 3rd Party Server as a part of the SOAP Header .
    Presently I am using a Message Interface which takes the parameters
    UserID and Password and hence its placing them in the SOAP BODY which in
    turn in resulting in Rejection of the data sent being us. So I guess we
    have to do some take out these parameters from Message Interface and
    try out something else.
    So Could you help us out in this issue since we are stuck  and hence not
    able to proceed any further.
    Here are some Details :
    Here is the extract from the XML File:
    A) Format in XI
      <?xml version="1.0" encoding="UTF-8" ?>
    - <ns1:DPSrequestToken xmlns:ns1="">
    - <Username>
    - <DPSrequestToken>
    B) The way the file needs to be sent to the 3rd party server
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="" xmlns:SOAP-ENC="" xmlns:xsi="" xmlns:xsd="">
         xmlns:SOAP-ENC="" xmlns:xsi="" xmlns:xsd="">
            <wsse:Security xmlns:wsse="">
              <m:DPSrequestToken xmlns:m="">
                   <m:vendorID>your 4 digit vendorID</m:vendorID>
    Basically as mentioned above
      <Password>p2ssword</Password> ,Tokens should be sent in the SOAP
    Header which is now being sent in the Body and hence causing problems.
    Do get back to me in case you need any clarifications on this issue.
    Best Regards,
    Message was edited by: Chandan A C

    see this --> page 2
    HTTP Adapter error.

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

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

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

  • How to convert the Variable with soap header to non soap variable.

    I am working on a customized flow simialr to ProcessSalesorderFulfillmentJMSCOnsumer and Requestor ABCS. I dont have the PIP codes for the Requestor adn JMS Consumer. i built my own Requester ABCS and JMS Consumer. When i am trying to send message from JMS Consumer to Requestor ABCS in a variable with a SOAP:Env and SOAP:body inside.
    Becoz of this i was not able to put a condition in my bpel flows. If i put a condtion on this variable like switch inputvariable:part:OrderType='NEW' and it was failing with selection failure. I tried copying the variable to a new variable and then to check the condition still it does not work for me. How do i convert the SOAP Message Variable to Non SOAP Message Variable.
    Can i know the message put by SIebel in JMS Queue was it SOAP converted adn then how they are going to handle in Process Sales order Requestor ABCS.

    In JMS Consumer of order to cash pip, Instead of using a schema reference they use a Envolpe.zxsd file which will take care of conversion adn then other artibutes are mapped in a transformation file.
    Please take an export of jms consumer in jdeveloper and reverse engineer the code of JMS COnsumer Service.
    Envelope_To_ListOfSWIOrderIO is the xsl whcih converts the message in AIA Queue to a message in a SOAP. Please look into the transformation.
    Venugopal sss Raja

  • BPEL process to create a PDF and send it as attachment in SOAP response

    We have a requirement to have a webservice created using BPEL, which can receive input from a client and create a PDF using the input and send the PDF as attachment in the SOAP response.
    We have found the below link in Oracle docs and our basic understanding on the functionality given is that the MIMEService is being used to read a SOAP attachment from some other service and send it as an attachment in the SOAP response to the requester. As explained above, this doesn't completely satisfy our requirement.
    Please suggest if there is any other approach that suites our requirement.

    I have a Weblogic webservice which returns me a PDF attachment as resposne ( here I have MIME related stuff).I need to get attachment as bpel response.
    I have created a BPEL process to invoke the weblogic webservice. I have explictly added the MIME part in bpel.wsdl same as weblogic webservice wsdl.
    I tried to assign the response variable( of type base64binary) of bpel.wsdl and my webservice .wsdl . I am getting some error with no attachment.
    Below is my xsd used in BPEL.wsdl*
    <?xml version="1.0" encoding="UTF-8"?>
    <schema attributeFormDefault="unqualified"
         <complexType name="process">
                        <element name="input" type="string"/>
         <complexType name="processResponse">
                        <element name="result" type="string"/>
    <complexType name="GetAttachmentPDF">
    <element minOccurs="0" name="Pdf" nillable="false" type="base64Binary"/>
    Below is my BPEL.wsdl*
    <?xml version="1.0" encoding="UTF-8"?>
    <wsdl:definitions name="BPELProcess1"
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         TYPE DEFINITION - List of services participating in this BPEL process
         The default output of the BPEL designer uses strings as input and
         output to the BPEL Process. But you can define or import any XML
         Schema type and use them as part of the message types.
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <schema xmlns="">
    <import namespace=""
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         MESSAGE TYPE DEFINITION - Definition of the message types used as
         part of the port type defintions
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <wsdl:message name="BPELProcess1RequestMessage">
    <wsdl:part name="payload" type="client:process"/>
    <wsdl:message name="BPELProcess1ResponseMessage">
    <wsdl:part name="payload" type="client:processResponse"/>
    <wsdl:part name="attachment" type="client:GetAttachmentPDF"/>
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         PORT TYPE DEFINITION - A port type groups a set of operations into
         a logical service unit.
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <!-- portType implemented by the BPELProcess1 BPEL process -->
    <wsdl:portType name="BPELProcess1">
    <wsdl:operation name="process">
    <wsdl:input message="client:BPELProcess1RequestMessage"/>
    <wsdl:output message="client:BPELProcess1ResponseMessage"/>
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <plnk:partnerLinkType name="BPELProcess1">
    <plnk:role name="BPELProcess1Provider">
    <plnk:portType name="client:BPELProcess1"/>
    <wsdl:binding name="BPELProcess1SOAP11Binding" type="client:BPELProcess1">
    <soap:binding style="rpc" transport=""/>
    <wsdl:operation name="process">
    <soap:operation style="rpc"
    <soap:body use="literal"
    <soap:body use="literal"
    <mime:content part="attachment" type="application/pdf"/>
    Below is my WL WS WSDL*
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace=""
    xmlns:mime="" xmlns:s=""
    xmlns:s0="" xmlns:s1=""
    xmlns:s2="" xmlns:s3=""
    xmlns:s4="" xmlns:s5=""
    xmlns:soap="" xmlns:tns=""
    xmlns:wsdl="" xmlns:xs=""
    <xsd:complexType name="GetAttachmentPDF">
    <xsd:element minOccurs="0" name="Pdf" nillable="false" type="xs:base64Binary"/>
    <xsd:complexType name="GetAttachmentResult">
    <xsd:element minOccurs="1" name="Message" nillable="true" type="xs:string"/>
    <WL5G3N0:message name="NewOperationRequest">
    <WL5G3N0:part name="GetAttachment" type="WL5G3N1:string"/>
    <WL5G3N0:message name="NewOperationResponse">
    <WL5G3N0:part name="NewOperationResponse" type="WL5G3N2:GetAttachmentResult"/>
    <WL5G3N0:part name="attachment" type="WL5G3N2:GetAttachmentPDF"/>
    <WL5G3N0:portType name="NewWSDLFile">
    <WL5G3N0:operation name="NewOperation">
    <WL5G3N0:input message="WL5G3N3:NewOperationRequest"/>
    <WL5G3N0:output message="WL5G3N3:NewOperationResponse"/>
    <WL5G3N0:binding name="NewWSDLFileSOAP" type="WL5G3N3:NewWSDLFile">
    <WL5G3N4:binding style="rpc" transport=""/>
    <WL5G3N0:operation name="NewOperation">
    <WL5G3N4:operation soapAction=""/>
    <WL5G3N4:body use="literal" namespace=""/>
    <WL5G3N4:body use="literal" namespace=""/>
    <WL5G3N5:content part="attachment" type="application/pdf"/>
    <WL5G3N0:service name="NewWSDLFile">
    <WL5G3N0:port name="NewWSDLFileSOAP" binding="WL5G3N3:NewWSDLFileSOAP">
    <WL5G3N4:address location="http://localhost:7001/something/NewWSDLFileImpl"/>
    I refered the below link: WSDL File Contents
    They are using ra:writeBinaryToFile() and ora:ReadBinaryFromFile(). I couldnt get a proper sample to understand the use of these functions.
    Please advise.

  • SOAP attachment - module development?

    I have an IDOC -> SOAP scenario where I have to call a webservice that uses SOAP attachment.
    <soapenv:Envelope xmlns:soapenv="" xmlns:ueb="IBrokerInterface">
    The "file.xml" has to be a SOAP attachment.
    If I use a SOAP receiver channel how do I get the IDOC payload moved into a SOAP attachment and still keep the SOAP envelope?
    Can this only be done with module development?
    Thanks Rasmus

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

  • Problem with SOAP Attachment in MM7

    Hi, I'm developing with Bea Weblogic 7 sp2 a MM7 server. My problem is when I add an attachment to SOAP message, Weblogic can't receive the message and say something as "The ID referenced by .... is unknow" but the href attribute in SOAP Message has the same value as the Content-ID of the attachment.
    The attachment is multipart/mixed. Please, I need help.
    I add here an old post from other user about this problem.
    I need some help for a problem I have with bea 7.0 sp1 web services.
    I'm trying to develop a SOAP Message Handler to intercept a SOAP Messages.It seems
    work properly for simple soap requests.
    But I need to send attachements so my request is like:
    POST /mm7/mm7Service HTTP/1.0
    Content-Type: multipart/related; type="text/xml"; start="<2ED4C017A7C250C35409DE82D1A8E6B1>";
    Accept: application/soap+xml, application/dime, multipart/related, text/*
    User-Agent: Axis/1.1
    Cache-Control: no-cache
    Pragma: no-cache
    SOAPAction: ""
    Content-Length: 5177
    Content-Type: text/xml; charset=UTF-8
    Content-Transfer-Encoding: binary
    Content-Id: <2ED4C017A7C250C35409DE82D1A8E6B1>
    <?xml version="1.0" encoding="UTF-8"?>
    <soapenv:Envelope xmlns:soapenv="" xmlns:xsd=""
    <ns1:TransactionID soapenv:mustUnderstand="0" xsi:type="xsd:string" xmlns:ns1="">E8D97EC0A80A712B5CF3C7E5A56AF121</ns1:TransactionID>
    <DeliverReq xmlns="">
    <RFC2822Address displayOnly="false">[email protected]</RFC2822Address>
    <Number displayOnly="false">+123454678</Number>
    <RFC2822Address displayOnly="false">[email protected]</RFC2822Address>
    <RFC2822Address displayOnly="false">[email protected]</RFC2822Address>
    <Content href="cid:74935BFBD687B557CE9C25A591FEE0DA" allowAdaptations="true"/>
    Content-Type: multipart/mixed;
    Content-Transfer-Encoding: binary
    Content-Id: <74935BFBD687B557CE9C25A591FEE0DA>
    I implemented a simple Handler with a system.out in
    public boolean handleRequest(MessageContext mc)
    But weblogic never gets there. It gives me this error instead:
    javax.xml.soap.SOAPException: failed to receive message:
    at weblogic.webservice.core.DefaultWebService.invoke(
    This seems related to this line
    <Content href="cid:74935BFBD687B557CE9C25A591FEE0DA" allowAdaptations="true"/>
    If I remove it, it can reach the handleRequest() method.
    Unfortunately I need the Content parameter....
    Does weblogic support href attributes in soap ?
    many thanks to whatever help
    (I already lost 3 days on that problem.....)

    Problem 1)
    In a previous question about this in SDN, someone (sorry, can't remember who) answered:
    "Have you or the user logged into the SAP GUI before? If not, have them login in. Our problems occured
    with new users that never logged into the SAP gui and so the user profile was never loaded with the ini
    Please try that.
    Problem 2)
    Are you sure it's running with the same variant in the background?
    What if you try every 5 minutes instead - maybe a minute is too short and it gets mixed up.
    You could also try copying RSWUWFML2 to ZRSWUWFML2, inserting an infinite loop and then attaching to it in order to debug it in the background.
    Rick Bakker
    Hanabi Technology

  • How to send attachment via SOAP

    Dear All,
    I have to develop a web client in order to send a Text.txt file to web server. I'm using SOAP based message. In fact I'm using eclipse IDE to develop the web client. but I'm not still knowing  how it's doing.
    <xs:element name="ReconReport">                                      
    <!-- Reconciliation report -->
    <xs:element name="login" 
    <!-- Login name for the client -->
    <xs:element name="pass"  
    <!-- Password for the client -->
    <xs:element name="filename"   type="xs:string"/>         
    <!-- Filename for the attached reconciliation report -->
    <xs:element name="desc"  
    type="xs:string" minOccurs="0"/><!-- Additional description if any -->
    <xs:element name="attachment" type="xs:base64Binary"/>   
    <!-- Attachment -->
    My code
    public int reconReport(java.lang.String login, java.lang.String pass, java.lang.String filename, java.lang.String desc, byte[] attachment) throws java.rmi.RemoteException {
    if (super.cachedEndpoint == null) {
    throw new org.apache.axis.NoEndPointException();
    org.apache.axis.client.Call _call = createCall();
    _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
    _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
    _call.setOperationName(new javax.xml.namespace.QName("", "ReconReport"));
    try {   
    java.lang.Object _resp = _call.invoke(new java.lang.Object[] {login, pass, filename, desc, null});
        String requestmsg = "Request context[PrepaidAccountQuery] : \n"
    + _call.getMessageContext().getRequestMessage()
    if (_resp instanceof java.rmi.RemoteException) {
    throw (java.rmi.RemoteException)_resp;
    else {
    try {
    return ((java.lang.Integer) _resp).intValue();
    } catch (java.lang.Exception _exception) {
    return ((java.lang.Integer) org.apache.axis.utils.JavaUtils.convert(_resp, int.class)).intValue();
      } catch (org.apache.axis.AxisFault axisFaultException) {
      throw axisFaultException;
    Form Result
    Request context[PrepaidAccountQuery] :
    <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="" xmlns:xsd="" xmlns:xsi=""><soapenv:Body><ReconReport xmlns=""><login>123</login><pass>123</pass><filename>BSN.TXT</filename><desc>Celcom</desc><attachment xsi:nil="true"/></ReconReport></soapenv:Body></soapenv:Envelope>
    Server accepting message
    POST /axis2/services/PaymentGateway HTTP/1.1
    Content-Type: multipart/related; boundary="MIMEBoundary_9aca5e2dc7e6ba2b683923292e7c1df44d8dc670242a205e"; type="application/xop+xml"; start="<[email protected]>"; start-info="application/soap+xml"; action="urn:ReconReport"
    User-Agent: Axis2
    Host: cel229:18080
    Transfer-Encoding: chunked
    Content-Type: application/xop+xml; charset=UTF-8; type="application/soap+xml"
    Content-Transfer-Encoding: binary
    Content-ID: <[email protected]>
    <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv=""><soapenv:Body><ns1:ReconReport xmlns:ns1=""><ns1:login>xxxxxxx</ns1:login><ns1:pass>xxxxxxx</ns1:pass><ns1:filename>20120213.txt</ns1:filename><ns1:desc>xxxxxxx Recon Report</ns1:desc><ns1:attachment xmlns:ns2="" ns2:contentType="text/plain"><xop:Include xmlns:xop="" href="cid:[email protected]" /></ns1:attachment></ns1:ReconReport></soapenv:Body></soapenv:Envelope>
    Content-Type: text/plain
    Content-Transfer-Encoding: binary
    Content-ID: <[email protected]>
    TOT. REC : 10
    Please help me.

    I tried my best to find in google but there is no helpful url.  However, I'm just following bellow code but still Im getting same message contains. Please appreciate ur advice.
    Before calling ,
    I just add this
    Hashtable chunkedTable = new Hashtable();
    _call.setProperty(MessageContext.HTTP_TRANSPORT_VERSION, HTTPConstants.HEADER_PROTOCOL_V11);
    byte source[] ="999999999999944444444444444444444444444444444444444".getBytes();
    DataSource ds = new ByteArrayDataSource(source, "text/plain");
    DataHandler dh = new DataHandler(ds);
    But still the message contains is same.
    Request context[PrepaidAccountQuery] :
    <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="" xmlns:xsd="" xmlns:xsi=""><soapenv:Body><ReconReport xmlns=""><login>123</login><pass>123</pass><filename>BSN.TXT</filename><desc>Celcom</desc><attachment>OTk5OTk5OTk5OTk5OTQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0</attachment></ReconReport></soapenv:Body></soapenv:Envelope>

  • OSB - send file in email attachment in SOAP attachment

    I would like to send a file in email in SOAP attachment.
    I thought it would be a simple task, I will create a proxy service, which calls a business service. There is a routing action in proxy service to business service and after the rouiting there is a replace action, I replace the attachments variable with this:
    <con:attachment xmlns:con="">
    <con:Content-Disposition>attachment; filename="Simple.pdf"</con:Content-Disposition>
    I received the email, but i cannot open the document, because it is corrupted...
    Please, could someone help me?
    I can't find out the solution.

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

  • HTTP 500 Internal Server Error with Large Attachment in SOAP Scenario

    we have implemented SOAP - XI - SOAP Scenario in our landscape (Sap Neatweaver Process Integration 7.1) .
    One of the functionality of this scenario is the Upload of Documents to External Web Service through standard SOAP Attachment.
    If we try to upload a small file (smaller than 20MB), task works fine and the document is correctly uploaded.
    If we try to upload a larger file, we encountered in this generic error: SOAP: response message contains an error XIAdapter/HTTP/ADAPTER.HTTP_EXCEPTION - HTTP 500 Internal Server Error
    We tried to increase timeout parameters (in communication channel and in ICM Value) but the response is the same.
    We verify also if icm/HTTP/max_request_size_KB parameter was set to a value smaller than our file size limit (20MB) but is set to default value (100MB).
    The problem isn't on External Web Service Layer because if we try to upload the same documents directly to that web service upload works fine, and in External Web Service's Log there aren''t any indications of this error.
    So I ask you: are there any System Parameters to verify to solve this issue?
    For additional, in ICM Monitor LOG we can read this WARNING when we call our service:
    WARNING => IcmReadFromConn(id=53/454390): temporarily out of MPI buffers -> roll out [icxxthrio_mt 2646]
    This warning may be related to the problem? If yes, how can we solve it?
    Thanks a lot,
    Marcello Ricci

    Hi ,
      Please answer my following questiosn.
    1)  which PI version are you using?
    2) How many J2EE nodes you have.
    please be reminded that SOAP is not for the heavy messages. Then you need to increase your timeout parameters from BASIS.
    Edited by: viru srivastava on Dec 14, 2010 10:18 PM

  • SOAP Attachment & performances for WLI

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

    This post :
    Describes how to use the opaque-schema for sending files over the ESB.
    Hope you can use this.
    or do you want to use the soap-headers for this?

Maybe you are looking for