Reading attachment in SOAP message with ABAP mapping

I am searching an ABAP code to read attachment in sender SOAP message..
I am using PI 7.3, I can read by java mapping but I get another error after reading the attachment.. So I try to abap mapping..
That's it..
Thanx ..

Hello Mark,
1. My Soap Sender Adapter, I checked the Keep Attachment option
2. I am getting the WSDL file from the SOAP Sender Agreement.. it is like http(s)://host:port/XISOAPAdapter/MessageServlet?channel=p:s:c? as you said.
I used the user-defined function, it works when <inc:Include href="cid:test.jpg" xmlns:inc="http://www.w3.org/2004/08/xop/include" /> is deleted in the message.
If the coming message includes <inc:Include href="cid:test.jpg" xmlns:inc="http://www.w3.org/2004/08/xop/include" />,
the <null> error occurs.
Thanx for your reply..

Similar Messages

  • Message split ABAP mapping

    Hello everybody,
    for a special mappging I use ABAP mapping -everything fine.
    But I need to split the message with ABAP mapping.
    Does anybody know if this is possible ?
    In the ABAP-class I use the interface IF_MAPPING. This has as a result parameter the parameter RESULT Type XSTRING (no table).
    It only works to add to XMLs in 1 XML string, but my result have to be 2 XML files.
    Alternatively would it be an idea to use multi message mapping (graphical first) AND then ABAP-mapping for special mappings?
    Thanks a lot,
    Florian

    Florian,
    for multimappings in coded mappings (xslt, java and abap mappings) you'll also create a single stream, but in this case, the stream may have the following format:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
    <ns0:Message1>
        <b><enter your first message here></b>
    </ns0:Message1>
    <ns0:Message2>
        <b><enter your second message here></b>
    </ns0:Message2>
    </ns0:Messages>
    where <ns0:MessageX> tags refer to each different target message type.
    In the case you have a 1:n split, you'll have only 1 message type, but may have several messages within it.
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
    <ns0:Message1>
        <b><My_message id=1></b>
        <b></My_message></b>
        <b><My_message id=2></b>
        <b></My_message></b>
    </ns0:Message1>
    </ns0:Messages>
    Also, remember that, when you define an interface mapping as multimapping (meaning, you set either source, target or both interfaces to multiple messages, your input stream will also contain the <ns0:Messages> and <ns0:MessageX> tags, so you need to treat them in your mapping program.
    Regards,
    Henrique.

  • How to send SOAP message with attachment?

    Hi Experts,
    How do I simulate to send a SOAP message with an attachment? Can I use XMLSpy?
    Please help.
    Thanks,
    Shobhit

    Ravi,
    With the generic SOAP client, it asks for the http based wsdl file location. But my wsdl has been generated by XI and I have the file stored on my desktop.
    Something to do with the path http://zpidd01:8030/XISOAPAdapter/MessageServlet?channel=NetworkPartners:NP_Order_BS:NP_SOAP_Sender_CC ??
    Stefan,
    my scenario is to send a SOAP request with attachment and post the attachment in ECC through the ABAP server proxy.
    WebService Client -
    SOAP----> XI -
    ABAP PROXY CALL ---> ECC
    Need further assistance from both of you how to achieve this scenario.
    Thanks,
    Shobhit
    Edited by: Shobhit Swarup Mathur on Jul 24, 2008 4:34 AM

  • Outbound SOAP Message with Attachment

    The requirement is to invoke a web service by sending attachments in the outbound SOAP message. The attachment body needs to be assigned in the message flow, using an element E1 extracted from the message incoming into the flow.
    I am trying to use attachments variable to set content-type (text/xml) and body using E1. However, these are not getting assigned to attachments variable, as seen by logging the variable.
    I was told that $attachments cannot be changed inside the flow (it is marked black in the console unlike the header and body that are marked green). If that is the case, how do we invoke services using attachments from a message flow?
    Any pointers would be appreciated.

    Hi,
    A SOAP message may need to be transmitted together with attachments of various sorts, ranging from facsimile images of legal documents to engineering drawings. Such data are often in some binary format. For example, most images on the Internet are transmitted using either GIF or JPEG data formats. In this document we describe a standard way to associate a SOAP message with one or more attachments in their native format in a multipart MIME structure for transport.
    yes it is possible to send attachment with the SOAP.
    SOAP Message Packages
    A "SOAP message package" contains a primary SOAP 1.1 message. It may also contain additional entities that are not lexically within the SOAP message but are related in some manner. These entities may contain data in formats other than XML. The primary SOAP 1.1 message in a message package may reference the additional entities. Such additional entities are often informally referred to as "attachments." This section describes how to construct SOAP message packages and how SOAP processors will process them.
    A SOAP message package is constructed using the Multipart/Related media type, which is defined in RFC 2387. The rules for the construction of SOAP message packages are as follows:
    The primary SOAP 1.1 message must be carried in the root body part of the Multipart/Related structure. Consequently the type parameter of the Multipart/Related media header will always equal the Content-Type header for the primary SOAP 1.1 message, i.e., text/xml.
    The MIME Multipart/Related encapsulation of a SOAP message is semantically equivalent to a SOAP protocol binding in that the SOAP message itself is not aware that it is being encapsulated. That is, there is nothing in the primary SOAP message proper that indicates that the SOAP message is encapsulated .
    For more details you can refer these links
    http://www.w3.org/TR/SOAP-attachments
    http://www.w3.org/TR/soap12-af/
    regards
    Aashish Sinha
    PS : reward points if helpful

  • Soap message with Attachment

    Hi All,
    I have a requirement wherin I have to send an attachment(image) along with the soap payload.i.e. the soap message contains the payload and an attachment.For eg. the soap message is as shown below:
    <?xml version="1.0" encoding="UTF-8" ?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
      <SOAP-ENV:Body>
        <ns1:MT_Soap xmlns:ns1="http://www.adc.com/sample">
             <Record>
                <FieldXML>abc</FieldXML>
                <FieldAthmt />
             </Record>
          </ns1:MT_Soap>
      </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    How can I include the attachment(which is on a local machine) in the above soap message?
    Is it posssible to send the attachment in the field "FieldAtthmt"?
    If it is possible to send an attachment with the soap message then how can that attachment be handled in XI?
    Thanks in advance,
    Vikram

    Hi,
    A SOAP message may need to be transmitted together with attachments of various sorts, ranging from facsimile images of legal documents to engineering drawings. Such data are often in some binary format. For example, most images on the Internet are transmitted using either GIF or JPEG data formats. In this document we describe a standard way to associate a SOAP message with one or more attachments in their native format in a multipart MIME structure for transport.
    yes it is possible to send attachment with the SOAP.
    SOAP Message Packages
    A "SOAP message package" contains a primary SOAP 1.1 message. It may also contain additional entities that are not lexically within the SOAP message but are related in some manner. These entities may contain data in formats other than XML. The primary SOAP 1.1 message in a message package may reference the additional entities. Such additional entities are often informally referred to as "attachments." This section describes how to construct SOAP message packages and how SOAP processors will process them.
    A SOAP message package is constructed using the Multipart/Related media type, which is defined in RFC 2387. The rules for the construction of SOAP message packages are as follows:
    The primary SOAP 1.1 message must be carried in the root body part of the Multipart/Related structure. Consequently the type parameter of the Multipart/Related media header will always equal the Content-Type header for the primary SOAP 1.1 message, i.e., text/xml.
    The MIME Multipart/Related encapsulation of a SOAP message is semantically equivalent to a SOAP protocol binding in that the SOAP message itself is not aware that it is being encapsulated. That is, there is nothing in the primary SOAP message proper that indicates that the SOAP message is encapsulated .
    For more details you can refer these links
    http://www.w3.org/TR/SOAP-attachments
    http://www.w3.org/TR/soap12-af/
    regards
    Aashish Sinha
    PS : reward points if helpful

  • Does Workshop deal with SOAP Messages with Attachments

    I try to send back an image from my web service. Is there a way to make a SOAP Messages
    with Attachments using BEA Workshop?
    Thanks,
    Jerome.

    Hi Jerome,
    I'm pretty sure that Workshop doesn't support SwA (SOAP with Attachments) yet. The
    product manager says that it is being considered for a future version, though :-)
    In the meantime, I don't see any reason why you can't just use a Java class that
    uses the JavaMail API to construct a Multipart MIME message. The MimeMultipart class
    (the one that acts as a container for a multipart/related document) has a writeTo()
    method that you can use to populate a ByteArrayOutputStream. Afterwards, you should
    be able to use the toByteArray() method on this ByteArrayOutputStream, to create
    the byte[] that maps to a xsd:base64Binary data type. The nice thing about this,
    is that the target web service has complete access to the SOAP message (in the first
    Body part), and all the attachments :-)
    Just a thought...
    Mike Wooten
    "Jerome Sonnet" <[email protected]> wrote:
    >
    I try to send back an image from my web service. Is there a way to make
    a SOAP Messages
    with Attachments using BEA Workshop?
    Thanks,
    Jerome.

  • How to send a SOAP message with attachments

    How to send a SOAP message with attachments thru webservice using axis-1_3 can any one sujjest.............................

    Please refer
    http://www.javaworld.com/javaworld/jw-09-2003/jw-0912-webservices.html
    http://xml.sys-con.com/read/40315.htm

  • How to send SOAP Message with Oracle B2B

    Hi everyone,
    I need your help to send out from Oracle B2B a SOAP message with attachment of any type of file (image, pdf, etc.). Possibly using a SOA composite application or another way, it doesn't matter. I already create an ebMS partnership with a custom document protocol and I already create a working SOA composite application to send only text message to my trading partner. I have tried this solution: http://anuj-dwivedi.blogspot.it/2011/04/ebms-attachment-handling-in-oracle-b2b.html but it doesn't work for my case... It is to be noticed that I don't give any schema to my component in the SOA application explained firstly, and I select opaque as schema.
    Thanks to all, regards
    Nello

    Hi Anuj and thanks for your help,
    I need to send an ebXML message, with SOAP, and I try to send it with a .war application written in jsp connecting to http://10.85.28.24:8001/b2b/transportServlet to send the SOAP message. The errors reported is:
    javax.xml.soap.SOAPException: Unable to receive message. Received a response from url: http://10.85.28.24:8001/b2b/transportServlet with HTTP status 200 and SOAP content-type: null.
    the code I write is the following (to evaluate the two "null" in the super constructor)
    <%!
    public class EBMSSender extends SOAPRunner
    private String cpaId;
    private String service;
    private String action;
    private String mess;
    private ArrayList<String> allegati=null;
    public EBMSSender(String cpaId, String service, String action, String mess, ArrayList<String> file)
    super("http://10.85.28.24:8001/b2b/transportServlet","null", "null");
    this.cpaId = cpaId;
    this.service = service;
    this.action = action;
    this.mess=mess;
    this.allegati=file;
    @Override
    protected void prepareRequest(SOAPMessage soapMessage, SOAPBody soapBody) throws SOAPException
    soapBody.addChildElement(SOAPUtility.createElement("CPAId", getNsPrefix(), getNsURI(),"agr3"));
    soapBody.addChildElement(SOAPUtility.createElement("service", getNsPrefix(), getNsURI(),"OracleService"));
    soapBody.addChildElement(SOAPUtility.createElement("action", getNsPrefix(), getNsURI(),"Oracletohermesb"));
    soapBody.addChildElement(SOAPUtility.createElement("serviceType", getNsPrefix(), getNsURI(),"OracleServiceType"));
    soapBody.addChildElement(SOAPUtility.createElement("convId", getNsPrefix(), getNsURI(), "convId"));
    soapBody.addChildElement(SOAPUtility.createElement("fromPartyId", getNsPrefix(), getNsURI(), "Oracle"));
    soapBody.addChildElement(SOAPUtility.createElement("fromPartyType", getNsPrefix(), getNsURI(), "Name"));
    soapBody.addChildElement(SOAPUtility.createElement("toPartyId", getNsPrefix(), getNsURI(), "Hermes-b"));
    soapBody.addChildElement(SOAPUtility.createElement("toPartyType", getNsPrefix(), getNsURI(), "Name"));
    attach(soapMessage);
    protected void attach(SOAPMessage soapMessage)
    String h=mess;
    DataHandler dh;
    AttachmentPart ap = soapMessage.createAttachmentPart(h,"text/plain");
    soapMessage.addAttachmentPart(ap);
    if(allegati!=null)
    for(int i=0; i<allegati.size();i++)
    dh=new DataHandler(new FileDataSource(new File(allegati.get(i))));
    ap=soapMessage.createAttachmentPart(dh);
    ap.setContentType(new MimetypesFileTypeMap().getContentType(allegati.get(i)));
    ap.setContentLocation(allegati.get(i));
    soapMessage.addAttachmentPart(ap);
    @Override
    protected void processFault(SOAPFault soapFault) throws SOAPException{}
    @Override
    protected Object processResponse(SOAPMessage responseMessage,SOAPBody responseBody) throws SOAPException
    SOAPElement messageId = SOAPUtility.getChild(responseBody, "message_id", getNsURI());
    return null;
    %>
    The code works fine on the other trading partner side to send ebXML message to Oracle B2B. Apart from this solution (however,it would be my favorite), I find your blog and I try to implement your solution. It works: it sends files with only text payload to the other trading partner without any problem, but if I try to send for example an image in byte array written in a file .txt, the ebxml file received has the byte array with wrong characters. it may be that I have not provided the xsd schema? in case if I wanted to send an ebXML message with text and attachments, what xsd schema do I need to provide?
    or is there another way to implement a SOA composite application to send SOAP messages with attachments?
    Thank for your help!, regards
    Nello

  • Help on message split ABAP MAPPING

    Hi friends
    I need to split a message by abap mapping , I am having problem while creating the tag Messages and Message1.
    the mapping is going into error Comparison error during the execution of a simple
    it is turned up to be the issue of <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge"><ns0:Message1> not being created correct
    I am using this code
    CALL METHOD l_document->create_simple_element_ns
          EXPORTING
            name   = 'Messages'
            parent = l_document
    *u2022PREFIX = ''
    *u2022URI = ''
    *u2022VALUE = ''
          RECEIVING
            rval   = Messagesnode.
    CALL METHOD l_document->create_simple_element_ns
          EXPORTING
            name   = 'Message1'
            parent = MESSAGESNODE
    *u2022PREFIX = ''
    *u2022URI = ''
    *u2022VALUE = ''
          RECEIVING
            rval   = Message1node.
    any help wil do
    Thanks

    No answer
    Thanks

  • Multi-Message-split with ABAP mapping and adapter specific attributes

    Hi all,
    With <b>ABAP-Mapping I split 1 message to n messages</b>.
    So many files are generated in <b>file-Adapter</b>.
    Everything fine.
    But now I want the file names different using adapter specific attributes.
    It is not possible to use variable substitution and write the file name in payload because of receiver restrictions.
    I tried this with following similar coding in ABAP-Mapping:
    data: lt_records TYPE MPP_DYNAMIC_TAB.
          Loop.
          l_file_name = "payload-Inbound"-information
          ls_record-namespace = 'http://sap.com/xi/XI/System/File'.
          ls_record-name = 'FileName'.
          ls_record-value = l_file_name.  "l_file_name comes from inbound-payload
          append ls_record to lt_records.
         Endloop.
      CALL METHOD dynamic_configuration->set_all_records
        EXPORTING
          records = lt_records.
    If I start the interface I see in the monitoring the dynamic configuration with many entries for file-name in the the SOAP-Header mapping of the request message (following extract):
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Mapping der Request-Message
      -->
    - <SAP:DynamicConfiguration xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileName">BPAADDRESS.XML</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileName">BPABROKERROLE.XML</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileName">BPACOMPANYSEGMENT.XML</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileName">BPACUSTOMERROLE.XML</SAP:Record>
    The result is that <b>all files have the same file name</b> (last entry in dynamic configuration).
    Is it possible to write the adapter specific configuration in ABAP-mapping <u>for every single result message</u>??
    Thank you for your help,
    Florian

    Hi Florian,
    I've a different idea...I dont think its a "right solution" but just another work around..it involves a BPM...
    In your ABAP mapping..set the dynamic config with as many variables as number of different messages...i.e. use the variables like 'FileName1', 'FileName2'...'FileName6' instead of 'FileName'. But use the same namespace 'http://sap.com/xi/XI/System/File'
    Call the above mapping in a BPM and capture the individual messages and set the attribute 'FileName' from the values of 'FileName1' to 'FileName6' accordingly using Message Mapping and then send the message using the 'Send' step.
    before you try this, try using the variable names 'FileName1' ...'FileName6' in the receiver adapters...enable the ASMS. <b>I know we need to select which variables from the dynamic config to be used by the adapter by specifically selecting 'FileName', 'Directory' etc...but just give it a try and see if it works..</b>
    Or..instead of using a BPM..you can combine Henrique's idea...use Adapter module to set the value for 'FileName' from variables 'FileName1'...'FileName6' accordingly.
    hope I'm clear..lemme know if you have any questions..
    cheers
    praveen

  • Change Adapter Specific Message Attributes with ABAP Mapping

    Hi everyone,
    I have an IDOC -> PI -> File scenario and I need the file name to be a combination of several fields of the file so variable substitution is quite complicated. I have been reading about Adapter Specific Message Attributes and since the File name is one of those attributes I think maybe I can use it. The only thing is that I'm using ABAP mapping. Can I set the file name in that way? Has anyone done it?
    Thank you for your help.
    Regards,
    Pablo

    I found it myself:
      DATA: l_dyn_record      TYPE mpp_dynamic.
          l_dyn_record-namespace = 'http://sap.com/xi/XI/System/File'.
          l_dyn_record-name = 'FileName'.
          l_dyn_record-value = w_nombrearch.
          dynamic_configuration->add_record( l_dyn_record ).
    Thanks anyway.

  • Problem with ABAP mapping

    Hi...
    I have  the following issue: I create an ABAP mapping class and activate it, but when I test the mapping via TC SXI_MAPPING_TEST it doing nothing, that is, in the result page, in the option TRACE its throw the following message: No mapping configured.
    Previously:
    1.- Create DT, MT and MI for each interfaces.
    2.- Create IM in wich put the name of the ABAP class of the mapping (and activate too).
    3.- Check in the IM the namespaces of both MT.
    Do I miss something?
    Hector

    Hi,
    Where did you created your ABAP mapping . is it in R3 instance of XI or in external R3?.
    If you are in R3 of XI then you can test it with SXI_MAPPING_TEST
    see the below links for more details
    /people/sameer.shadab/blog/2005/09/29/testing-abap-mapping
    ABAP mapping
    Testing ABAP mapping
    http://help.sap.com/saphelp_nw04/helpdata/en/de/705c3c3806af06e10000000a11402f/frameset.htm
    /people/r.eijpe/blog/2005/11/21/xml-dom-processing-in-abap-part-ii--convert-an-xml-file-into-an-abap-table-using-sap-dom-approach
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/15ecdf90-0201-0010-d792-941a3c3c30a4
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/media/uuid/06114a70-0701-0010-5db6-93dbadaed321?prtmode=navigate
    /people/r.eijpe/blog/2006/02/19/xml-dom-processing-in-abap-part-iiia150-xml-dom-within-sap-xi-abap-mapping
    /people/r.eijpe/blog/2006/02/20/xml-dom-processing-in-abap-part-iiib150-xml-dom-within-sap-xi-abap-mapping
    Regards
    Chilla..

  • How to send SOAP Message with attachments?

    Hi All,
    I am working on a SOAP to RFC Scenario With specific requirement of handling the attachment(Mainly Excel Attachments) at the Sender SOAP Adapter.
    Kindly Suggest.
    I found lot of theoritical stuff but no practical scenario.
    Regards,
    Sachi

    Hi Sachi,
    To handle attachment in SOAP sender adapter  first of all you will have to use the AXIS message protocol.
    Then by using MessageTransformBean you can handle the attachment.
    1) Check this link for the module processing sequence used to get the attachment from SOAP
    SOAP Axis sender with CSV file attachment
    2) Check this blog which will help you on the usage of MessageTransformBean
    Solve Key Field Problem using StructPlain2XML in MessageTransformationBean!!
    http://help.sap.com/saphelp_nw04/helpdata/en/24/4cad3baabd4737bab64d0201bc0c6c/frameset.htm
    using MessageTransformBean you can handle only the text file attachments like comma separated file, pipe separated, fixed lengths etc. But if you are looking to handle a excel file you will have to use a java mapping to get the data from excel attached file. for this have a look at this following blog by Shabarish:
    Excel Files - How to handle them in SAP XI/PI (The Alternatives)
    Do remember to use SOAP Axis adapter and to tick the keep attachment option.
    Hope this helps.
    Regards,
    Aravind

  • Adding PDF file as attachment to SOAP message

    Hi,
    I want to add a pdf file from the hard disk to a soap message as attachment. I have the following code:
    // CREATE MESSAGE
    SOAPMessage msg= fac.createMessage();
    SOAPEnvelope nEnv= msg.getSOAPPart().getEnvelope();      
    //READ FILE FROM THE HD
    String pdfFileName = "somepdffile.pdf";      
    FileReader fr = new FileReader(pdfFileName);
    BufferedReader buffr = new BufferedReader(fr);
    String sPdf="";
    String line = testB.readLine();
    while(line!=null)
    sPdf += line;
    line = testB.readLine();
    //WRITE THE FILE TO BYTE ARRAY AND THEN TO STREAM
    byte[] pdfData = sPdf.getBytes();
    ByteArrayInputStream stream = new ByteArrayInputStream(pdfData);
    //CREATE ATTACHMENT ADD THE STREAM AS CONTENT
    AttachmentPart attPDF = msg.createAttachmentPart();          
    attPDF.setContent(stream, "application/pdf");
    msg.addAttachmentPart(attPDF);          
    return msg;
    I GET THE NEXT EXCEPTION:
    javax.activation.UnsupportedDataTypeException: no object DCH for MIME type application/pdf
    at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:851)
    at javax.activation.DataHandler.writeTo(DataHandler.java:305)
    at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1089)
    at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:635)
    at javax.mail.internet.MimeMultipart.writeTo(MimeMultipart.java:233)
    at com.sun.xml.messaging.soap.MessageImpl.saveChanges(MessageImpl.java:356)
    at javax.xml.messaging.JAXMServlet.doPost(JAXMServlet.java:192)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
    at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
    at java.lang.Thread.run(Thread.java:536)
    javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.messaging.JAXMException: Bad response: (500, Internal Server Error)
    at com.sun.xml.messaging.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:93)
    at mp.soap.SendingServlet.getPolisPrint(SendingServlet.java:320)
    at mp.soap.SendingServlet.doPost(SendingServlet.java:234)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
    at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
    at java.lang.Thread.run(Thread.java:536)
    CAN ANYONE TELL ME WHAT THE SOLUTION IS ?
    PLEASE HELP ME !!!
    Birol

    testB == buffr ! Sorry.
    IT IS STILL NOT WORKING !!!!!
    // CREATE MESSAGE
    SOAPMessage msg= fac.createMessage();
    SOAPEnvelope nEnv= msg.getSOAPPart().getEnvelope();
    //READ FILE FROM THE HD
    String pdfFileName = "somepdffile.pdf";
    FileReader fr = new FileReader(pdfFileName);
    BufferedReader buffr = new BufferedReader(fr);
    String sPdf="";
    String line = buffr.readLine();
    while(line!=null)
    sPdf += line;
    line = buffr.readLine();
    //WRITE THE FILE TO BYTE ARRAY AND THEN TO STREAM
    byte[] pdfData = sPdf.getBytes();
    ByteArrayInputStream stream = new ByteArrayInputStream(pdfData);
    //CREATE ATTACHMENT ADD THE STREAM AS CONTENT
    AttachmentPart attPDF = msg.createAttachmentPart();
    attPDF.setContent(stream, "application/pdf");
    msg.addAttachmentPart(attPDF);
    return msg;

  • How to send a signed SOAP message with additional HTTP Header fields

    Our Partner's integration requirements are that we send them asynchronous SOAP messages, that are digitally signed, and whose HTTP headers contains 5 or 6 additional header fields, of which 3 or 4 will need to be dynamically set during the message mapping.  I believe we can use the HTTP adapter for adding new fields to the HTTP header, but don't believe it supports signing.  I believe that the SOAP adapter supports signing, but I'm not clear on how to use it to add fields to the HTTP header.  What is the most straight-forward way to achieve both the signing of the message and the addition of the HTTP header values?
    Thanks,
    Kurt

    >>>What is the most straight-forward way to achieve both the signing of the message and the addition of the HTTP header values?
    Use Java mapping for both.
    1) Signing the message
    You can digitally sign the soap message using many standard api like WSS4j? or  refer Java XML signature API which comes in Jdk1.6.
    Refer these links
    WSS4J  -  http://ws.apache.org/wss4j/axis.html
    Java XML signature : http://java.sun.com/developer/technicalArticles/xml/dig_signature_api/
    2) >>whose HTTP headers contains 5 or 6 additional header fields, of which 3 or 4 will need to be dynamically set during the message mapping
    Use Dynamic configuration API to set the additional header fields during message mapping.

Maybe you are looking for

  • PO with both service and material

    Dear all Can anyone give a structure of PO which invoves both Service and Material component and both are inseperable. Service tax is applicable on service portion and VAT is applicable on material. Thanks in advance

  • BI query through EP

    Dear Folks, I have created all reports through BEx query designer..Is it possible to display these queries through EP. If possible please let me know how to configure briefly in BI aswell as in EP. If not..which queries are possible through EP.i mean

  • Enabling L3 cache

    In June '06 there was a discussion post about installing a QS dual 800 CPU on a DA machine and the L3 cache not being recognized. 'Tonarchiv' posted the following: "My L3 cache runs! I adapted some source code from OpenDarwins OWCCacheSetup and wrote

  • What is grid . how grid work. is it possible grid in 9i . how

    what is grid . how grid work. is it possible grid in 9i . how

  • Notebook DV6 3122sl HDD Dynamic Disk not clonable on SSD

    I hope to change the HDD Samsung 320 Gb with an SSD Samsung EVO 850 256Gb.My consumption of HDD is + o - 170 Gb and othe is free.My problem is : SSD can't accept configuration like Dynamic Disk, then i must copy(clone) only the system.How this is pos