IDOC to BPM-SOAP adapter is sending Empty envelop

Hello,
I have a scenario where im using BPM Async/sync bridge to realize the IDOC to SOAP adapter scenario.
The web services will take the request and send the response in string (CDATA). Everything is working fine upto the synchronous interface mapping. After the data gets converted, It calls the SOAP adapter.It is here that im facing the issue. The soap adapter is sending an empty envelop without any data. But in monitoring i can see the data that it is supposed to send.
Please, can anybody help me????
Thanks,
Lakshmi

If I understand correctlty, you are doing a asynt to sync to asyn scenario. In this case you dont need an async-sync bridge.
Your BPM should have only a receive step, sync send and then an asyn send step. You might have one transformation wherever applicable. If you have opened any bridges in BPM, please remove them and try.
VJ

Similar Messages

  • Hi, In  a IDOC --- XI(BPM)--- SOAP Sync Scenario failrure.

    Hi, In  an IDOC ->XI(BPM)->SOAP Sync Scenario I observed recently messages are failing in SXMB_MONI with an error as:
    com.sap.aii.af.ra.ms.api.DeliveryException: SOAP: response message contains an error XIAdapter/PARSING/ADAPTER.SOAP_EXCEPTION - soap fault: System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction: http://172.16.209.162/esdryrun/ContractData_Push. at System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest() at System.Web.Services.Protocols.SoapServerProtocol.Initialize() at System.Web.Services.Protocols.ServerProtocol.SetContext(Type type, HttpContext context, HttpRequest request, HttpResponse response) at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)
    friends, could  u plz help on this.
    Thanks,
    satya.

    Hello,
    This indicates a configuration issue with this SOAP receiver adapter. Please check the on line help for the configuration of the SOAP adapter (the link is below). Please set the indicator in the "SOAP Action" field.
    Configuring the Receiver SOAP Adapter
    http://help.sap.com/saphelp_nw70/helpdata/EN/29/5bd93f130f9215e10000000a155106/frameset.htm
    (Below is the extract from the link)
    SOAP Action
    Specify the SOAP action. The action specifies the value for the
    SOAPAction in Web service messages; set the indicator.
    Regards,
    Sarah

  • SEND SYNC IN BPM SOAP ADAPTER FOR WS

    Hi all,
    I´m having problems with an BPM that send a sync message to a ws using a Soap adapter. I have the following error
    Work item 000000087293: not possible execute CL_SWF_XI_MSG_BROKER, method SEND_SYNCHRON.
    I´m on SP15.
    Any Idea?
    Many thanks
    Noelia

    Hi,
    Go thru this thread:
    Interface Mappings in BPM Collect Pattern
    Then try this
    1)do a CACHE REFRESH. Is it working?
    2) Check transaction SWDD
    3) If no other go then try this:= Copy your old BPM to a new name and delete the old one. The again eport it in the Configuration with the old name.
    Regards
    Suraj
    Message was edited by: S.R.Suraj

  • Creating Technical System while using SOAP adapter as sender

    hello friends
    When I create a business system and technical system in SLD for a sender using SOAP adapter, can i create it as Third-Party. Or do I need to create it as anything else in the list.
    Also, when do we create Web AS Java technical systems. I need to know when this option becomes  MUST.
    Thanks in advance
    Ram

    Yes u can use third party business system and technical system for SOAP system. Business service can also b used for the same purpose.
    U should use webAS Java system in case of Java Proxies
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/7d4db211-0d01-0010-1e8e-9b07fc2113ab
    Regards,
    Prateek

  • Why we do not need sender agreement for Mail and SOAP adapter

    Hi SDN,
    I know, we do not need sender agreement for IDOC ,HTTP,XI adapters. As these three adapters will run in Integration engine of the abap stack.
    <b>In our scenario if sender is other than  IDOC or HTTP or XI .</b>
    By Refering Sivamni's blog.
    <b>/people/siva.maranani/blog/2005/05/25/understanding-message-flow-in-xi
    message will be pickedup by communication channel with the help of sender agreement and prepare XI message header by performing cpa cache lookup. then message will go to module processor etc.
    <b>In our scenario if sender is IDOC or HTTP or XI .</b>
    As these 3 adapters are run in Integration engine.
    Doubt 1:
    how the integration engine will create the xi message header like sender interface sender system name etc...
    Doubt 2:
    I believe SOAP and mail adapter will run in adapter engine.but i came to know that we do not need sender agreement and sender comm channel for these two adapters too...then how the XI message header will create...
    Please do correct me if i am wrong
    and throw some light on the same..
    Appreciate your help....
    Regards,
    Reehan.

    Reehan,
    Thanks for pointing me to that link. Guess I was wrong .,But,let me try to put to you why you need a sender agreement for a Sender SOAP Adapter,
    1. In the sender SOAP adapter , the Sender Interface and the Interface Namespace as provided in the fields Default Interface Name and InterfaceNamespace. The Name of the Sender Service is provided in the WSDL when you ceate the WSDL in the Integration Directory. So, as all details are available in either the Sender SOAP adapter or in the WSDL url you do not need a Sender Agreement. It is not obligatory but you can always create the Sender Agreement.
    2.  For the mail adapter , if you select the option XIPAYLOAD, you will have the option to mention the Interface Name and Interface Namespace under XI Parameters  and so in this case as once again the details provided in the sender agreement are available in the Sender Adapter itself the sender agreement is not needed for the mail adapter when you have select option XIPAYLOAD.
    If you have selected XIALL then you need a sender agreement.
    Regards
    Bhavesh

  • Failed in Message Mapping for Sender SOAP Adapter

    I am using a synchronous Sender SOAP adapter for sending SOAP messages using HTTP security protocol. I am trying to send SOAP messages to XI and then to RFC-R/3. And Responses back from RFC to XI and then to SOAP. I am getting an error for failed in message mapping in SXMB_MONI for converting SOAP messages to RFC. When I debug it in Message Mapping in Integration Repository, it works fine.
    Any help is appreciated.
    Thanks in advance!
    Mrudula

    Hi,
    try to do a full cache refresh
    regards,
    Jakub

  • Sender SOAP Adapter, inconsistent behavior

    Hi,
    We are using XI 3.0 SP17. We have noticed some inconsitent behavior with the sender SOAP adapter:
    When sending a valid SOAP message to the adapter, it will reply with:
    <SOAP:Envelope xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'><SOAP:Header/><SOAP:Body/></SOAP:Envelope>
    To me this seems errornous, becuase it is missing "<?xml version='1.0'?>" in the beginning, and thus is not valid XML. This leads to errors on the Client that is sending messages to the Sender SOAP adapter.
    When sending an errornous SOAP message from the client to the XI Sender SOAP adapter, the error message does include the "<?xml version='1.0'?>" + the corresponding error message, so the behavior seems inconsitent and errournous.
    Can someone tell me how the get the Sender SOAP Adapter to include "<?xml version='1.0'?>" in the reply for valid SOAP messages?
    Thanks for any help on this subject!
    -Hans
    PS: Here is an example of an error message from the Sender SOAP adapter, that does include the xml header:
    <?xml version="1.0"?>
    <!-- see the documentation -->
    <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
         <SOAP:Body>
              <SOAP:Fault>
                   <faultcode>SOAP:Server</faultcode>
                   <faultstring>Server Error</faultstring>
                   <detail>
                        <s:SystemError xmlns:s="http://sap.com/xi/WebService/xi2.0">
                             <context>XIAdapter</context>
                             <code>MalformedMessageException</code>
                             <text><![CDATA[Unexpected content in SOAP:Body; nested exception caused by: com.sap.aii.messaging.util.XMLScanException: Unexpected content in SOAP:Body\tat com.sap.aii.messaging.mo.Message.reparseRootDocument(Message.java:1014)\tat com.sap.aii.messaging.net.MIMEInputSource.readSOAPPart(MIMEInputSource.java:619)\tat com.sap.aii.messaging.net.MIMEInputSource.decodePart(MIMEInputSource.java:611)\tat com.sap.aii.messaging.net.MIMEInputSource.readBody(MIMEInputSource.java:379)\tat com.sap.aii.messaging.net.MIMEServletInputSource.parse(MIMEServletInputSource.java:58)\tat com.sap.aii.af.mp.soap.web.MessageServlet.doPost(MessageServlet.java:378)\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:760)\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:853)\tat com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)\tat com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)\tat com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)\tat com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)\tat com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)\tat com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)\tat com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)\tat com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)\tat com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)\tat com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)\tat com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)\tat java.security.AccessController.doPrivileged(AccessController.java:180)\tat com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)\tat com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)          ]]></text>
                        </s:SystemError>
                   </detail>
              </SOAP:Fault>
         </SOAP:Body>
    </SOAP:Envelope>

    Hi,
    "Do not use SOAP Envelope" is not really an option for us.
    From help.sap.com:
    If the indicator is set, the adapter expects a message without a SOAP envelope.
    If you have set the indicator, you must also enter nosoap=true in the URL.
    The adapter then puts the whole message in the XI payloads
    So this also requires heavy changes to the client side. It would almost make more sense to use the plain HTTP adapter in that case..
    -Hans

  • How to send images using SOAP adapter

    hi All,
    I want to send images using the SOAP adapter . ( Sender and Receiver )
    Can anybody help out with this requirement
    Regards,
    Loveena

    Hi,
    Following links may help U
    /people/siva.maranani/blog/2005/09/03/invoke-webservices-using-sapxi
    http://help.sap.com/saphelp_nw04/helpdata/en/3c/b4a6490a08cd41a8c91759c3d2f401/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/29/5bd93f130f9215e10000000a155106/frameset.htm
    to know the basics about soap adapter u cn check out this link
    /people/padmankumar.sahoo/blog/2005/02/15/an-overview-of-soap
    to get in detail about the attachments chk out this link
    hi i am unable to attach an attachment in File to mail scenario
    Regards
    Pullarao

  • SOAP Adapter recvr.CC unable to call, call failed

    Hi,
    i'm doing the IDoc to SOAP Scenario for Vendor Master. Sender CC is IDoc Adapter & Receiver CC is SOAP Adapter. Sending the vendor data(SAP ECC) to third party(through WebService) system. In the recv.CC,
    in the Connection Parameters>Target URL->i've given the URL given by third party (which is working fine when i open in explorer), & below in Conversion Parameters>SOAP Action also i've given. After sending the vendor from ECC by BD14, it is not received in Webservice.
    In the Runtime Workbench,
    Component Monitoring-->Communication Channel Monitoring
    --> for my recv.SOAP CC, it is showing the error as:
    MsgID:----
    Explanation
    98719886-dbc5-194c-9da7-0cfe8d77082c call failed
    98719886-dbc5-194c-9da7-0cfe8d77082c request entering
    URL is working fine in the browser.
    SOAP Action is rightly given.
    Webservice not requires any logon data, so not configured User Authentication.
    No Proxy settings we are using.
    How to verify about firewall and ports to send SOAP message out of XI Box or network
    Any other settings or configurations i've to do in XI system?
    what might be the reason for this error. Experts pls help in resolving the same.
    rgds,
    balu

    hi,
    thanks for the quick reply..
    It is showing:
    Status:red symbol
    Adapter Type: SOAP
    Direction: Receiver
    In cluster Node tab,
    Processing Errors: in the last 20 hours
    Short Log: active
    MsgID:----
    Explanation
    98719886-dbc5-194c-9da7-0cfe8d77082c----- call failed
    98719886-dbc5-194c-9da7-0cfe8d77082c----- request entering
    Above already i've given the in recvr.CC what & all entered. pls do the needful.
    tnx n rgds,
    balu

  • Collection of IDOCs using BPM

    Hi Experts,
    I am trying collection of IDOCs by using BPM.
    I ran into problems and In moni,  the error is
    <SAP:Code area="BPE_ADAPTER">SYSTEM_FAILURE_INTERNAL</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>An internal error has occurred</SAP:Stack>
    Details of above error in trace is : 
    <Trace level="1" type="T">--start sender interface action determination</Trace>
      <Trace level="1" type="T">select interface BLAORD.BLAORD03*</Trace>
      <Trace level="1" type="T">select interface namespace urn:sap-com:document:sap:idoc:messages</Trace>
      <Trace level="1" type="T">no interface found</Trace>
      <Trace level="1" type="T">--start receiver interface action determination</Trace>
      <Trace level="1" type="T">Loop 0000000001</Trace>
      <Trace level="1" type="T">select interface UpdatedContracts_abs_idocs*</Trace>
      <Trace level="1" type="T">select interface namespace http://com/UpdatedContracts/</Trace>
      <Trace level="1" type="T">no interface found</Trace>
      <Trace level="1" type="T">--no sender or receiver interface definition found</Trace>
      <Trace level="1" type="T">Hence set action to DEL</Trace>
      <Trace level="1" type="B" name="CL_IDX_IDOC_RESOURCE-GETBLOBDATA" />
      <Trace level="1" type="B" name="CL_XMS_MAIN-PERSIST_READ_MESSAGE" />
      <Trace level="1" type="T">Note: the following trace entry is written delayed (after read from persist)</Trace>
    Here i am trying to collect IDOCs for 5 minutes and i need to send them in XML format. Here i have mapping logic and that logic is working perfectly.
    What i am dong is
    1. I am sending IDOCs from R3 system to BPM in XI. ( Here to push IDOCs from R3 system to BPM, do we need to do extra ALE settings. Actually With out BPM simple IDOC to File is working fine, With BPM only i am having error. )
    2. How to reslove above problem. AS per my understanding everthing is fine.
    Thanks,
    Subbu

    Hi Rama Subbarao,
        Error: Check with your loop condition and process steps.
           Collecting of IDOCS using BPM is good, If u want to send the 100 IDOCS per one hour with single BPM it will takes times , Some performs issues and hardware issues are raising.
    Suppose if u send 1000 Idocs per one hour it will takes much time.
    Other Process:
      The collecting of IDOCS it will be downloaded into FILE System.Once IDOCS is downloaded into FILE, it will be not changed the IDOCS.
    Using FILE Adapter we send the flatfiles data from FILE System to XI. if  u using this process performance wise its very good.
    Regards,
    Sateesh N

  • Recvr.CC SOAP Adapter call failed

    Hi,
    i'm doing the IDoc to SOAP Scenario for Vendor Master. Sender CC is IDoc Adapter & Receiver CC is SOAP Adapter. Sending the vendor data(SAP ECC) to third party(through WebService) system. In the recv.CC,
    in the Connection Parameters>Target URL->i've given the URL given by third party (which is working fine when i open in explorer), & below in Conversion Parameters>SOAP Action also i've given. After sending the vendor from ECC by BD14, it is not received in Webservice.
    In the Runtime Workbench,
    Component Monitoring-->Communication Channel Monitoring
    --> for my recv.SOAP CC, it is showing the error as:
    MsgID:----
    Explanation
    98719886-dbc5-194c-9da7-0cfe8d77082c     call failed
    98719886-dbc5-194c-9da7-0cfe8d77082c     request entering
    what might be the reason for this error. Experts pls help in resolving the same.
    Thanks & Regards,
    Balaji

    hi,
    thanks for the quick reply..
    URL is working fine in the browser.
    SOAP Action is rightly given.
    No Proxy settings we are using.
    your third point:
    Also verify about firewall and ports to send SOAP message out of XI Box or network
    i did't get. pls elaborate. Any other settings or configurations i've to do in XI system?
    Thanks & Regards,
    Balaji

  • SOAP Adapter Content-Type

    Hi,
    we move a Interface from BC to XI and now the problem come up that the content type isn't correct anymore.
    With BC we Post a request with Content Type <b>application/x-sap.idoc</b> to a specific url.
    With XI i use the SOAP Adapter for sending the Idoc structure but now in the header the Content-Type is <b>application/xml</b> is there any possibility to change this in the SOAP Adapter.
    Or do i have to use another adapter? Somebody has experience with that?
    Regards,
    Robin

    I don't know a standard way to modify the Content-Type.
    You can write a custom adapter module that make this:
    From http://help.sap.com/saphelp_nw04/helpdata/en/cd/5af7c0c994e24fb0d0088443513de2/content.htm
    <i>"In the receiver adapter, if you want to add your own modules to process the request message, you add them before the module specified below; if you want to add your own modules to process the response message, you add them after the following module:
    sap.com/com.sap.aii.af.soapadapter/XISOAPAdapterBean"</i>
    Or you may try to use the HTTP adapter, there you have the control on content-type
    Regards,
    Sandro

  • SOAP adapter in XI3.0 using J2EE adapter engine

    Folks,
    I have a scenario SOAP client -> XI 3.0
    I am using XI 3.0 and the J2EE adapter framework to configure a sender SOAP adapter. I do not have a Party, just the service and the channel.
    I tried using the following url format:
    http://<server>:50000/XISOAPAdapter/MessageServlet?channel
    =:<service name>:<channel name>
    When I use this in my SOAP client , I get an 401 forbidden error in the browser. However when I type this url directly in the browser and I get:
    Message Servlet is in Status OK
    Status information:
    Servlet com.sap.aii.af.mp.soap.web.MessageServlet (Version $Id: //tc/aii/30_REL/src/_adapters/_soap/java/com/sap/aii/af/mp/soap/web/MessageServlet.java#5 $) bound to /MessageServlet
    Classname ModuleProcessor: null
    Lookupname for localModuleProcessorLookupName: localejbs/ModuleProcessorBean
    Lookupname for remoteModuleProcessorLookupName: null
    ModuleProcessorClass not instantiated
    ModuleProcessorLocal is Instance of com.sap.aii.af.mp.processor.ModuleProcessorLocalLocalObjectImpl0
    ModuleProcessorRemote not instantiated
    A couple of questions:
    1. Inspite of configuring the sender SOAP adapter, the sender service and the interface, I still cannot see the green light for the SOAP adapter in rumtime workbench->adapter monitoring.
    Although the communication channel (in intergration builder- design)shows the status of the adapter as "active"
    Does this mean that my SOAP adapter is correctly configured and active?
    2. The above mentioned url takes the ABAP engine login/password while the J2EE engine (AFW)takes a different login/password. Which authentication should the SOAP client use?
    Thanks for your help!
    Shailesh

    Post your message to following URL:
    http://host:port/XISOAPAdapter/MessageServlet?channel=party:service:channel
    port is the J2EE port 50000 in your example.
    Check the newest manual for further details.
    Regards
    Stefan

  • Reading huge flat file through SOAP adapter

    Hi Everybody,
        In one of our interface we need to read big flat file using soap adapter at sender side into xi and we are using java map to convert into xml. but before that i need to split this flat file into multiple files  in the first message mapping. and in the second map we have to write a java map to do the flat file conversion to XMLBut i got struck up in reading this big flat file into XI as i need to declare some datatype to read this entire file. Can anybody tell me how i can do this. is it a possible to do first of all with SOAP adapter . 
    Thanks
    raj

    hi vijay,
      Thanks for your prompt reply. Due to some reasons i am not allowed to use file adapter . i can use only JMS adapter or SOAP adapter. we tried few scenarios with JMS content conversion but what ever scenario i am asking here is complex at multilevel i can't even use JMS in this case. so we are thinking to read whole file using SOAP adapter and then we are planning to split the file into multiple files, as file can be huge size ,using java mapping and in next level we want to use another mapping to do content conversion. SO I have to do experiements whether this is a feasible solution or not. because when u declare at sender side
    <ffdata_MT>
    <Recordset>
        <ROW>    String type
    when u declare like this and when u sent the flat file using SOAP adapter at sender side we are getting whole file which we sent at part of "ROW" as string. but inside java mapping i need to see whenther i can split this in XI ,so that i can use these split files in next mapping for content conversion. Hope i am clear now. I want to know whether it is a feasible solution or not.
    I really appreciate if sombody give some idea on this
    Thanks
    raj

  • Axis SOAP Adapter - Setting MIME headers for attachements (Handlers?)

    Hello,
    I need to know if/how it is possible to set the individual MIME headers of the parts making up a multipart/related SOAP message using only standard Axis Handlers e.g. "com.sap.aii.axis.xi.XI30DynamicConfigurationHandler" (as described in the Axis FAQ in Note 1039369).
    I know I can insert transport headers  using "com.sap.aii.axis.xi.XI30DynamicConfigurationHandler", but I can't see a way of setting a MIME header for, say, the first part (i.e. the SOAP part) or the second part (e.g. an attachement). Is this possible without writing your own Axis handler? The Axis FAQ, in "Advanced usage question 31" implies that you can set MIME Headers but only shows an example of setting the transport header.
    I am using the SOAP Adapter to send a message comprising and XML message (in the SOAP body) and a PDF document (as an attachement). The external company this is being sent to requires that we have specific values for the "Content-Id" MIME header in each part of the multipart/related document. This is why I need to understand if we can do this without writing our own Axis Handler.
    Incidentally, I have tried to write a custom Axis Handler but couldn't get PI to find it after deployment. I did this by inserting my JAR file in the "com.sap.aii.adapter.lib.sda" (as per Notes 1039369 / 1138877) and then using JSPM. After deployment, though, when I tried to start the SOAP Adapter I got the following error in the RWB: "failed to initialize: org.apache.axis.ConfigurationException: java.lang.ClassNotFoundException: com.hp.gerryaxis.GerryAxis..." (my class was called "GerryAxis" and I placed this in package "com.hp.gerryaxis"). I'm not an experienced Java programmer (my background is in ABAP), so if anyone can suggest whey I'm getting this error, I'd be very grateful (for example, could my choice of package be causing the problem?).
    Thanks for your help.

    I went ahead and wrote a simple bespoke Axis Handler. By invoking this from the standard "HandlerBean" in the module processor of my communication channel, I was able to overwrite and set new MIME headers in the Attachment Parts of my SOAP Message. I was also able to change the contents of the SOAP Envelope; for example, I found I could easily delete the SOAP Header. However, I've encountered a problem when I try and update the MIME headers of the SOAP Part i.e. the Part of the multipart/related message containing the SOAP Envelope.
    Does anyone know why I can't seem to change the MIME headers of the SOAP Part?
    The Axis API calls I used were as follows:
    (1) To update the MIME headers of attachements in my SOAP message:
    (a) Message = MessageContext.getCurrentMessage()
    (b) Iterator = Message.getAttachments()
    (c) AttachmentPart = Iterator.getNext()
    (d) AttachmentPart.setMimeHeader(name, value)
    This works.
    (2) To update the MIME headers of the SOAP (root) Part:
    (a) Message = MessageContext.getCurrentMessage()
    (b) SOAPPart = Message.getSOAPPart()
    (c) SOAPPart.setMimeHeader(name, value)
    This DOESN'Twork - the MIME headers of the SOAP Part never change.
    (3) To update the SOAP Envelope (delete the SOAP Header):
    (a) Message = MessageContext.getCurrentMessage()
    (b) SOAPPart = Message.getSOAPPart()
    (c) SOAPEnvelope = SOAPPart.getEnvelope()
    (d) SOAPHeader = SOAPEnvelope.getHeader()
    (e) SOAPHeader.removeContents()
    This works.
    I just don't understand why the call to SOAPPart.setMimeHeader() doens't work when I try and insert new MIME headers to the SOAP Part (e.g. "Content-Name") or when I try and change existing MIME headers there (e.g. "Content-ID"). I don't get any errors.
    The code of my handler is:
    @(#)GerryAxis.java       
    Set MIME headers in the SOAP and specified attachment part of a message
    package com.hp.handlers;
    import org.apache.axis.handlers.BasicHandler;
    import org.apache.axis.AxisFault;
    import org.apache.axis.attachments.AttachmentPart;
    import org.apache.axis.Message;
    import org.apache.axis.MessageContext;
    import java.util.Iterator;
    import javax.xml.soap.SOAPMessage;
    import javax.xml.soap.SOAPEnvelope;
    import javax.xml.soap.SOAPHeader;
    import javax.xml.rpc.handler.soap.SOAPMessageContext;
    The <code>GerryAxis</code> handler class sets MIME headers.
    <p>
    This handler accepts the following parameters:
    <ul>
    <li><b>name</b>: Name of header
    <li><b>value</b>: Value for header
    <li><b>attachment</b>: Attachment number
    </ul>
    public class GerryAxis extends BasicHandler {
      /* (non-Javadoc)
    @see org.apache.axis.Handler#invoke(org.apache.axis.MessageContext)
      public void invoke(MessageContext msgContext) throws AxisFault {
        int i=0;
        boolean found = false;
        AttachmentPart ap = null;
        javax.xml.soap.SOAPPart sp = null;
        StringBuffer debug = new StringBuffer();
        try {
          // The MIME header change is controlled from the parameters "name", "value", "attachment" which  are
          // set in the module processor as parameters.
          String name  = (String)getOption("name");
          String value = (String)getOption("value");
          String attachment  = (String)getOption("attachment");
          Message msg = msgContext.getCurrentMessage();
          // Get the SOAP Part (the part holding the SOAP Envelope
          sp = msg.getSOAPPart();
          if (sp == null)
              debug.append("getSOAPPart returned <null> / ");
          // Set a MIME header in the SOAP Part - THIS DOES NOT WORK - WHY?     
          sp.setMimeHeader(name,value);
          // Remove the SOAP Header for the Envelope - this works fine
          SOAPEnvelope se = sp.getEnvelope();
          SOAPHeader sh = se.getHeader();
          sh.removeContents();
          // For debugging - writes some debuggin information to a "DEBUG" MIME header in the first Attachement Part
          debug.append("name = " + name +" / ");
          debug.append("value = " + value +" / ");
          debug.append("attachment = " + attachment + " / ");
          debug.append("getMimeHeader for SOAPPart returned " + sp.getMimeHeader(name)[0] + " / ");
          debug.append("getContentId for SOAPPart returned " + sp.getContentId() + " / ");
          // Update the specified attachement's MIME header - this works fine
          Iterator it = msg.getAttachments();
          while (it.hasNext()) {
            i++;
            ap = (AttachmentPart) it.next();
            if (i == new Integer(attachment).intValue()) {
              found = true;
              break;
          if (found) {
            ap.removeMimeHeader(name);
            ap.setMimeHeader("DEBUG",debug.toString());
            ap.setMimeHeader(name,value);
          msg.saveChanges();
        catch (Exception e) {
          throw AxisFault.makeFault(e);
    Thanks
    Edited by: Gerry Deighan on Oct 3, 2010 10:27 PM

Maybe you are looking for