Critical Issue:-- Convert SOAP Attachment into SOAP Body

hi,
   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.>
Thanks
Jaideep Jain
Edited by: Bhavesh Kantilal on Dec 3, 2008 10:26 AM

hi stefan,
  I m getting this error after using PayloadSwapBean.
com.sap.aii.af.ra.ms.api.DeliveryException: 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.....
Thanks
Jaideep
Edited by: Jaideep Baid on Dec 5, 2008 9:27 AM

Similar Messages

  • Convert SOAP Attachment into SOAP Body

    Hi,
    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.
    Regards,
    B.Anandh

    Hi Krish,
    It is not possible to use adapter module (Custom or standard) in SOAP sender adapter and this thing is clearly mentioned in Help.sap.
    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.
    Thanks
    Sunil Singh

  • Error converting DOM nodes into SOAP nodes

    Hi,
    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.
    Naresh

    Hello,
    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"/>
    </wsdl:message>
    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):
    <soap:Body>
    <rootElement>
    </rootElement>
    <rootElement>
    </rootElement>
    <rootElement>
    </rootElement>
    </soap:Body>
    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):
    <soap:Body>
    <rootElement>
         <repetitiveElementSpecificToIndividualSplitRequest/>
         <repetitiveElementSpecificToIndividualSplitRequest/>
         <repetitiveElementSpecificToIndividualSplitRequest/>
    </rootElement>
    </soap:Body>
    I hope this helps.
    Regards,
    Ankit

  • 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...
    Regards,
    Jason.
    Edited by: Jason Scott on Mar 6, 2008 3:22 AM

    Hi,
    Check these
    /people/michal.krawczyk2/blog/2005/11/23/xi-html-e-mails-from-the-receiver-mail-adapter
    /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
    /people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1685 [original link is broken] [original link is broken] [original link is broken]
    /people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure
    http://help.sap.com/saphelp_nw04/helpdata/en/3c/b4a6490a08cd41a8c91759c3d2f401/content.htm
    Regards
    Seshagiri

  • 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.
    Thanks,
    Pratap

    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.
    eg:
    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.
    Thanks,
    Pratap.

  • 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="http://tempuri.org/message/">
    - <Username>
      <Username>ANYAGENT</Username>
      <Password>p2ssword</Password>
      </Username>
    - <DPSrequestToken>
      <version>1</version>
      <vendorID>0142</vendorID>
      </DPSrequestToken>
      </ns1:DPSrequestToken>
    B) The way the file needs to be sent to the 3rd party server
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
         xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <SOAP-ENV:Header>
            <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
                <wsse:UsernameToken>
                    <wsse:Username>ANYAGENT</wsse:Username>
                    <wsse:Password>p2ssword</wsse:Password>
                </wsse:UsernameToken>
            </wsse:Security>
    </SOAP-ENV:Header>
         <SOAP-ENV:Body>
              <m:DPSrequestToken xmlns:m="https://tpvs.hmrc.gov.uk/dpsauthentication">
                   <m:version>1</m:version>
                   <m:vendorID>your 4 digit vendorID</m:vendorID>
              </m:DPSrequestToken>
         </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    Basically as mentioned above
      <Username>ANYAGENT</Username>
      <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,
    Chandan
    Message was edited by: Chandan A C

    see this --> page 2
    HTTP Adapter error.
    Rgds

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

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

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

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

    HI,
    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.
    Thanks,
    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.
    http://docs.oracle.com/cd/E11036_01/integrate.1013/b28981/manipdoc.htm#BABCJIAH
    Please suggest if there is any other approach that suites our requirement.
    Thanks.

    Hi,
    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"
         elementFormDefault="qualified"
         targetNamespace="http://xmlns.oracle.com/MIMEApp/test/BPELProcess1"
         xmlns="http://www.w3.org/2001/XMLSchema">
         <complexType name="process">
                   <sequence>
                        <element name="input" type="string"/>
                   </sequence>
         </complexType>
         <complexType name="processResponse">
                   <sequence>
                        <element name="result" type="string"/>
                   </sequence>
         </complexType>
    <complexType name="GetAttachmentPDF">
    <sequence>
    <element minOccurs="0" name="Pdf" nillable="false" type="base64Binary"/>
    </sequence>
    </complexType>
    </schema>
    Below is my BPEL.wsdl*
    <?xml version="1.0" encoding="UTF-8"?>
    <wsdl:definitions name="BPELProcess1"
    targetNamespace="http://xmlns.oracle.com/MIMEApp/test/BPELProcess1"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:client="http://xmlns.oracle.com/MIMEApp/test/BPELProcess1"
    xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/">
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         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.
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <wsdl:types>
    <schema xmlns="http://www.w3.org/2001/XMLSchema">
    <import namespace="http://xmlns.oracle.com/MIMEApp/test/BPELProcess1"
    schemaLocation="xsd/BPELProcess1.xsd"/>
    </schema>
    </wsdl:types>
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         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>
    <wsdl:message name="BPELProcess1ResponseMessage">
    <wsdl:part name="payload" type="client:processResponse"/>
    <wsdl:part name="attachment" type="client:GetAttachmentPDF"/>
    </wsdl:message>
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         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"/>
    </wsdl:operation>
    </wsdl:portType>
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         PARTNER LINK TYPE DEFINITION
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <plnk:partnerLinkType name="BPELProcess1">
    <plnk:role name="BPELProcess1Provider">
    <plnk:portType name="client:BPELProcess1"/>
    </plnk:role>
    </plnk:partnerLinkType>
    <wsdl:binding name="BPELProcess1SOAP11Binding" type="client:BPELProcess1">
    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="process">
    <soap:operation style="rpc"
    soapAction="http://xmlns.oracle.com/MIMEApp/test/BPELProcess1/process"/>
    <wsdl:input>
    <soap:body use="literal"
    namespace="http://xmlns.oracle.com/MIMEApp/test/BPELProcess1"/>
    </wsdl:input>
    <wsdl:output>
    <mime:multipartRelated>
    <mime:part>
    <soap:body use="literal"
    namespace="http://xmlns.oracle.com/MIMEApp/test/BPELProcess1"/>
    </mime:part>
    <mime:part>
    <mime:content part="attachment" type="application/pdf"/>
    </mime:part>
    </mime:multipartRelated>
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    </wsdl:definitions>
    Below is my WL WS WSDL*
    <?xml version="1.0" encoding="UTF-8"?>
    <WL5G3N0:definitions
    name="NewWSDLFile"
    targetNamespace="http://www.example.org/NewWSDLFile/"
    xmlns:WL5G3N5="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:WL5G3N4="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:WL5G3N3="http://www.example.org/NewWSDLFile/"
    xmlns:WL5G3N2="java:com.rogers.service"
    xmlns:WL5G3N0="http://schemas.xmlsoap.org/wsdl/"
    xmlns:WL5G3N1="http://www.w3.org/2001/XMLSchema"
    >
    <WL5G3N0:types>
    <xsd:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="java:com.rogers.service"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:s="java:com.rogers.service"
    xmlns:s0="http://schemas.xmlsoap.org/wsdl/" xmlns:s1="http://www.w3.org/2001/XMLSchema"
    xmlns:s2="java:com.rogers.service" xmlns:s3="http://www.example.org/NewWSDLFile/"
    xmlns:s4="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s5="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.example.org/NewWSDLFile/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:complexType name="GetAttachmentPDF">
    <xsd:sequence>
    <xsd:element minOccurs="0" name="Pdf" nillable="false" type="xs:base64Binary"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="GetAttachmentResult">
    <xsd:sequence>
    <xsd:element minOccurs="1" name="Message" nillable="true" type="xs:string"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>
    </WL5G3N0:types>
    <WL5G3N0:message name="NewOperationRequest">
    <WL5G3N0:part name="GetAttachment" type="WL5G3N1:string"/>
    </WL5G3N0:message>
    <WL5G3N0:message name="NewOperationResponse">
    <WL5G3N0:part name="NewOperationResponse" type="WL5G3N2:GetAttachmentResult"/>
    <WL5G3N0:part name="attachment" type="WL5G3N2:GetAttachmentPDF"/>
    </WL5G3N0:message>
    <WL5G3N0:portType name="NewWSDLFile">
    <WL5G3N0:operation name="NewOperation">
    <WL5G3N0:input message="WL5G3N3:NewOperationRequest"/>
    <WL5G3N0:output message="WL5G3N3:NewOperationResponse"/>
    </WL5G3N0:operation>
    </WL5G3N0:portType>
    <WL5G3N0:binding name="NewWSDLFileSOAP" type="WL5G3N3:NewWSDLFile">
    <WL5G3N4:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
    <WL5G3N0:operation name="NewOperation">
    <WL5G3N4:operation soapAction="http://www.example.org/NewWSDLFile/NewOperation"/>
    <WL5G3N0:input>
    <WL5G3N4:body use="literal" namespace="http://www.example.org/NewWSDLFile/"/>
    </WL5G3N0:input>
    <WL5G3N0:output>
    <WL5G3N5:multipartRelated>
    <WL5G3N5:part>
    <WL5G3N4:body use="literal" namespace="http://www.example.org/NewWSDLFile/"/>
    </WL5G3N5:part>
    <WL5G3N5:part>
    <WL5G3N5:content part="attachment" type="application/pdf"/>
    </WL5G3N5:part>
    </WL5G3N5:multipartRelated>
    </WL5G3N0:output>
    </WL5G3N0:operation>
    </WL5G3N0:binding>
    <WL5G3N0:service name="NewWSDLFile">
    <WL5G3N0:port name="NewWSDLFileSOAP" binding="WL5G3N3:NewWSDLFileSOAP">
    <WL5G3N4:address location="http://localhost:7001/something/NewWSDLFileImpl"/>
    </WL5G3N0:port>
    </WL5G3N0:service>
    </WL5G3N0:definitions>
    I refered the below link:
    http://docs.oracle.com/cd/B14099_19/integrate.1012/b14448/manipdoc.htm.
    4.16.1.1 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.
    Regards
    Ipsita

  • SOAP attachment - module development?

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

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

  • 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>Hi
    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>";
    boundary="----=_Part_18_90248.1076664111251"
    Accept: application/soap+xml, application/dime, multipart/related, text/*
    User-Agent: Axis/1.1
    Host: xxx.xxx.xxx.xxx
    Cache-Control: no-cache
    Pragma: no-cache
    SOAPAction: "http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-2?operation=Deliver"
    Content-Length: 5177
    ------=_Part_18_90248.1076664111251
    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="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Header>
    <ns1:TransactionID soapenv:mustUnderstand="0" xsi:type="xsd:string" xmlns:ns1="http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-2">E8D97EC0A80A712B5CF3C7E5A56AF121</ns1:TransactionID>
    </soapenv:Header>
    <soapenv:Body>
    <DeliverReq xmlns="http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-2">
    <MM7Version>5.3.0</MM7Version>
    <LinkedID>fa571b8e93C0A809513c33d383069dfb</LinkedID>
    <Sender>
    <RFC2822Address displayOnly="false">[email protected]</RFC2822Address>
    </Sender>
    <Recipients>
    <To>
    <Number displayOnly="false">+123454678</Number>
    </To>
    <Cc>
    <RFC2822Address displayOnly="false">[email protected]</RFC2822Address>
    </Cc>
    <Bcc>
    <RFC2822Address displayOnly="false">[email protected]</RFC2822Address>
    </Bcc>
    </Recipients>
    <Priority>High</Priority>
    <Content href="cid:74935BFBD687B557CE9C25A591FEE0DA" allowAdaptations="true"/>
    </DeliverReq>
    </soapenv:Body>
    </soapenv:Envelope>
    ------=_Part_18_90248.1076664111251
    Content-Type: multipart/mixed;
    boundary="----=_Part_17_2373292.1076664111231"
    Content-Transfer-Encoding: binary
    Content-Id: <74935BFBD687B557CE9C25A591FEE0DA>
    ------=_Part_17_2373292.1076664111231
    I implemented a simple Handler with a system.out in
    public boolean handleRequest(MessageContext mc)
    method
    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(DefaultWebService.java:227)
    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.....)
    alan</i>
    Thanks.

    Hello,
    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
    file."
    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.
    regards
    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.
    WSDL
    [code]
    <xs:element name="ReconReport">                                      
    <!-- Reconciliation report -->
    <xs:complexType>
    <xs:sequence>
    <xs:element name="login" 
    type="xs:string"/>         
    <!-- Login name for the client -->
    <xs:element name="pass"  
    type="xs:string"/>         
    <!-- 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 -->
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    [/code]
    My code
    [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.setOperation(_operations[2]);
    _call.setUseSOAPAction(true);
    _call.setSOAPActionURI("urn:ReconReport");
    _call.setEncodingStyle(null);
    _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
    _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
    _call.setOperationName(new javax.xml.namespace.QName("http://paymentGateway.celcom.com", "ReconReport"));
    setRequestHeaders(_call);
    setAttachments(_call);
    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()
    .getSOAPPartAsString();
        System.out.println(requestmsg);
    if (_resp instanceof java.rmi.RemoteException) {
    throw (java.rmi.RemoteException)_resp;
    else {
    extractAttachments(_call);
    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;
    [/code]
    Form Result
    [code]
    Request context[PrepaidAccountQuery] :
    <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><ReconReport xmlns="http://paymentGateway.celcom.com"><login>123</login><pass>123</pass><filename>BSN.TXT</filename><desc>Celcom</desc><attachment xsi:nil="true"/></ReconReport></soapenv:Body></soapenv:Envelope>
    [/code]
    Server accepting message
    [code]
    ReconReport
    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
    689
    --MIMEBoundary_9aca5e2dc7e6ba2b683923292e7c1df44d8dc670242a205e
    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="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><ns1:ReconReport xmlns:ns1="http://paymentGateway.celcom.com"><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="http://www.w3.org/2005/05/xmlmime" ns2:contentType="text/plain"><xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:[email protected]" /></ns1:attachment></ns1:ReconReport></soapenv:Body></soapenv:Envelope>
    --MIMEBoundary_9aca5e2dc7e6ba2b683923292e7c1df44d8dc670242a205e
    Content-Type: text/plain
    Content-Transfer-Encoding: binary
    Content-ID: <[email protected]>
    1|40637781|44084597|110|20091019141048|121|
    2|77371568|44084597|120|20091019141050|126|162727|MBB|
    3|66432343|44084597|130|20091019141059|56|4111111111111111|0313|123456|
    101|21339684|0192234567|140|0|0|20091019141038|
    102|21339685|0192234567|140|0|0|20091019145013|
    103|21339686|0192234567|140|0|0|20091019146043|
    104|21339687|21339686|2009101914703|
    201|40637781|0135605893|1000|20091019151058|102310-ABCDEF|
    202|40637781|0135605893|2000|20091019151133|102310-ABCDEF|xxxxxxxxxxxx5442|123654|
    900|23482933|40637781|20091019141059|658|
    801|21337384|44084597|140|20091019141040|0193456678|Y|
    TOT. REC : 10
    --MIMEBoundary_9aca5e2dc7e6ba2b683923292e7c1df44d8dc670242a205e--
    [/code]
    Please help me.
    Regards

    Hi,
    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 ,
    _call.invoke(-----------)
    I just add this
    Hashtable chunkedTable = new Hashtable();
    chunkedTable.put(HTTPConstants.HEADER_TRANSFER_ENCODING, HTTPConstants.HEADER_TRANSFER_ENCODING_CHUNKED);
    _call.setProperty(MessageContext.HTTP_TRANSPORT_VERSION, HTTPConstants.HEADER_PROTOCOL_V11);
    _call.setProperty(HTTPConstants.REQUEST_HEADERS,chunkedTable);
    byte source[] ="999999999999944444444444444444444444444444444444444".getBytes();
    DataSource ds = new ByteArrayDataSource(source, "text/plain");
    DataHandler dh = new DataHandler(ds);
          _call.setProperty(_call.ATTACHMENT_ENCAPSULATION_FORMAT, _call.ATTACHMENT_ENCAPSULATION_FORMAT_MIME);
    _call.addAttachmentPart(dh);
    setRequestHeaders(_call);
    setAttachments(_call);
    _call.invoke(-----------)
    But still the message contains is same.
    Request context[PrepaidAccountQuery] :
    <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><ReconReport xmlns="http://paymentGateway.celcom.com"><login>123</login><pass>123</pass><filename>BSN.TXT</filename><desc>Celcom</desc><attachment>OTk5OTk5OTk5OTk5OTQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0</attachment></ReconReport></soapenv:Body></soapenv:Envelope>
    Regards
    -Kapila

  • OSB - send file in email attachment in SOAP attachment

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

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

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

    Hi,
    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:
    com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.engine.interfaces.messaging.api.exception.MessagingException: XIAdapterFramework:GENERAL:com.sap.engine.interfaces.messaging.api.exception.MessagingException: SOAP: response message contains an error XIAdapter/HTTP/ADAPTER.HTTP_EXCEPTION - HTTP 500 Internal Server Error
         at com.sap.aii.adapter.soap.ejb.XISOAPAdapterBean.process(XISOAPAdapterBean.java:1161)
    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.
    Rgds
    Veeru
    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 :
    http://soastuff.wordpress.com/2007/06/06/handling-opaque-datatypes-in-bpelesb/
    Describes how to use the opaque-schema for sending files over the ESB.
    Hope you can use this.
    or do you want to use the soap-headers for this?

Maybe you are looking for