Standalone (J2SE) adapter - axis SOAP adapter - issue duplicate messages

All,
Perhaps you can help me. I've setup a scenario where an standalone (J2SE) adapter sends a file to SAP XI channel, configured on the central adapter engine, of type SOAP configured to use Axis servlet.
The connection is setup and the standalone adapter channel logs thre response from the SOAP channel which reads HTTP error 500, indicating a duplicate message.
SAP has identified this problem and proposes in the FAQ for Axis (note 1039369) to set on the SOAP channel module CallSapAdapter property ignoreDuplicate to true in the module processor.
I've implemented this as suggested however found the problem persists. I'm still receiving an HTTP 500 error.
Your help is much appreciated solving this problem.
Thanks
Harald

As there was a bugfix recently, make sure that you have installed the latest patch.
If this does not work, open an OSS ticket for this issue.
Stefan

Similar Messages

  • Axis SOAP adapter

    We tried to use the Axis HTTP protocol in the definition of the communication channel as shown here:
    Adapter type: SOAP
    Transport protocol: HTTP
    Message protocol: Axis
    Adapter engine: Central Adapter Engine.
    When we tried to execute the scenario, we got the below error in SXMB_MONI:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Message entrant
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>XIAdapterFramework</SAP:Category>
      <SAP:Code area="MESSAGE">GENERAL</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText>com.sap.engine.interfaces.messaging.api.exception.MessagingException: org.apache.axis.ConfigurationException: adapter is null org.apache.axis.ConfigurationException: adapter is null at com.sap.aii.adapter.axis.modules.HandlerCore.process(HandlerCore.java:54) at com.sap.aii.adapter.axis.modules.HandlerBean.process(HandlerBean.java:75) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:43) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:71) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:38) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:22) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:189) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:16) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:21) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:16) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:133) at com.sap.engine.services.ejb3.runtime.impl.DefaultEJBProxyInvocationHandler.invoke(DefaultEJBProxyInvocationHandler.java:164) at $Proxy2583.process(Unknown Source) at com.sap.aii.af.app.mp.ejb.ModuleProcessorBean.process(ModuleProcessorBean.java:249) at sun.reflect.GeneratedMethodAccessor352.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:43) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:71) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:38) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:22) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:189) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:16) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:21) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:16) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:133) at com.sap.engine.services.ejb3.runtime.impl.DefaultEJBProxyInvocationHandler.invoke(DefaultEJBProxyInvocationHandler.java:164) at $Proxy45.process(Unknown Source) at com.sap.aii.af.app.listener.AFWListenerBean.onMessage(AFWListenerBean.java:317) at sun.reflect.GeneratedMethodAccessor886.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:43) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:71) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:38) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:22) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:189) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:16) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:21) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:16) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:133) at com.sap.engine.services.ejb3.runtime.impl.DefaultEJBProxyInvocationHandler.invoke(DefaultEJBProxyInvocationHandler.java:164) at $Proxy58.onMessage(Unknown Source) at com.sap.engine.messaging.impl.spi.ServicesImpl.deliver(ServicesImpl.java:314) at com.sap.aii.adapter.xi.ms.XIEventHandler.onDeliver(XIEventHandler.java:1000) at com.sap.engine.messaging.impl.core.queue.consumer.RequestConsumer.onMessage(RequestConsumer.java:73) at com.sap.engine.messaging.impl.core.queue.Queue.run(Queue.java:848) at com.sap.engine.messaging.runtime.MSWorkWrapper.run(MSWorkWrapper.java:56) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:152) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:247)</SAP:AdditionalText>
      <SAP:Stack />
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Has somebody got the same issue? Please help.

    The problem is corrected.
    For those who are interested, the problem was caused by a missing component in the installation of the Axis adapter in PI: the commons-httpclient.
    By verifying the list of modules present in the Module tab of the communication channel defined for the interface, we found an entry specifying 'com.sap.aii.adapter.axis.ra.transport.http.HTTPSender'.
    The documentation 'Configuring the Receiver Axis SOAP Adapter ' provided by SAP Help stated that:
    "If you are using the handler com.sap.aii.adapter.axis.ra.transport.http.CommonsHTTPSender, the commons-httpclient of Apache Commons HTTP Client must be contained in axisproviderlib."

  • Error in AXIS SOAP Adapter

    Hi Experts,
    Cuurently i am working on  Synchronous scenario.
    My scenario is ABAP Client Proxy> PI>AXIS SOAP ADAPTER(Webservice).
    My client requirement is to use UsernameToken security with PasswordDigest.
    I have deployed all the relevant .jar files and add the modules related to usernameToken security as per *SAP Note 1039369 FAQ XI Axis Adapter* in Receiver SOAP adapter.
    Now when  i am pushing the data from R/3 to PI, data is successfully coming to PI however when the data is going outside PI through Receiver AXIS  SOAP Adapter in RWB is showing
    *The message was successfully delivered to the application using connection SOAP_http://sap.com/xi/XI/System*
    *The message status set to DLVD*.
    Moreover when i am checking the message through SXMB_MONI i cant see the chequred flag for Request message and for response message its giving the following
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Request Message Mapping
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>XIAdapter</SAP:Category>
      <SAP:Code area="SOAP">FAULT</SAP:Code>
      <SAP:P1>http://schemas.xmlsoap.org/soap/envelope/</SAP:P1>
      <SAP:P2>Server.generalException</SAP:P2>
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText>WSDoAllReceiver: security processing failed (actions number mismatch)</SAP:AdditionalText>
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack />
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    and when i am cheking the trace of Respose message (request for message mapping ) its giving the
    <Trace level="1" type="T">Message has no payload</Trace>
      <Trace level="1" type="T">RuntimeException during appliction Java mapping com/sap/xi/tf/_MM_UrlResponse_To_CourseAccessUrlResponse_</Trace>
      <Trace level="1" type="T">com.sap.aii.utilxi.misc.api.BaseRuntimeException: Parsing an empty source. Root element expected! at com.sap.aii.mappingtool.tf3.Transformer.checkParserException(Transformer.java:187) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:151).....
    Currently SSL is not installed in my PI server.For temperory i am using HTTP instead of HTTPS.
    Please provide your valuable inputs on this.
    Regards
    Anku chopra
    Edited by: AnkuChopra on Aug 28, 2009 1:59 PM

    Hi Experts,
    In my Receiver SOAP adapter module Tab.
    As my scenario is synchronous  and i required UsernameToken with PasswordDigest security i have added following parameter value in module.(as per SAP Note 1039369 FAQ XI Axis Adapter ).
    Processing Sequence.
    Module Key
    afreq
    xireq
    wssec
    trp
    xires
    afres
    Module configuration
    ModuleKey  ParameterName   parametervalue
    xireq           handler.type         java:com.sap.aii.axis.xi.XI30OutboundHandler
    wssec         action                   UsernameToken
    wssec        handler.type         java:com.sap.aii.adapter.axis.ra.handlers.security.WSDoAllSender
    wssec       passwordType     PasswordDigest
    wssec      pwd.password     ********************
    wssec      user                       XYZ
    trp            handler.type            java:com.sap.aii.adapter.axis.ra.transport.http.HTTPSender
    trp             module.pivot          true
    xires       handler.type           java:com.sap.aii.axis.xi.XI30OutboundHandler.
    Do we need to do any other configuartion apart from above in parameter value.
    While getting response from third party i getting error as WSDoAllReceiver: security processing failed (actions number mismatch)
    Do i need to add  parameter value for WSDoAllReceiver as well as  my scenario is synchronous.
    Please help me out on this as i am not able to proceeed further because of the above errro.
    Please advice.
    regards
    Anku Chopra

  • XI acknowledgment from axis soap adapter

    We have implemented an integration from SAP ERP to an external system via XI. SAP sends a message to XI  via proxy which is then mapped to a web service call  to the external system via the axis soap adapter. If there is a problem the axis adapater sends back an acknowlodgement message with the soap error. This message is correctly interpreted by XI as en error acknowledgement. The acknowledgement message however fails in the routing as it is not able to find a receiver agreement for routing the message back. There is of course actually no valid recepient for this acknowledgement as the original message was created using an asynchronous proxy call. The problem is however that the original message is flagged as successful even though the acknowledgement contains an error. What we want to achieve is that the error in the acknowledgment causes the original message in XI to be flagged as failed, to allow error detection. Does anyone have any idea how to achive this ?
    Rgds
    Evind Langsaeter

    Hi
    We do not require any acknowledgements. But for the cases where the soap call is delivered, but returns a http response of 500 together with a complete soap envelope containing a soap fault, the Soap Axis Receiver Adapter is issuing an u201CApplicationErroru201D Acknowledgement Message (referring to the original request message) (even though it is not requested). This Acknowledgement Message is failing on the Integration Server with a configException u201CFailed to determine a receiver agreement for the given messageu201D. We have tried to create a receiver agreement and reciever channel with the given keys from the error message, but still getting the same result.
    Issue A: How to get this (non-requested) Acknowledge message to process without error.
    Issue B: How to get a proper u201Cerror-messageu201D telling that the original request message was not really delivered though (as the soap call gets a http response of 500).
    Rgds
    Eivind

  • Configuring the Sender Axis SOAP Adapter

    Hello,
    I am trying to configure Sender Axis SOAP Adapter using PI 7.0
    The regular inbound address for SOAP messages is: http://host:port/XISOAPAdapter/MessageServlet?channel=party:service:channel
    But the inbound address for AXIS SOAP messages is:
    http://host:port/XIAxisAdapter/MessageServlet?parameters
    parameters ::= token ( u2018&u2019 token )*
    token ::= name u2018=u2019 value
    name ::= fieldname
    value ::= fieldvalue
    fileldname ::= u2018senderPartyu2019 | u2018senderServiceu2019 | u2018receiverPartyu2019 | u2018receiverServiceu2019 |
    u2018interfaceu2019 | u2018interfaceNamespaceu2019 | u2018messageIdu2019 | u2018queueNameu2019
    fieldvalue ::= urlencoded value
    See this link: http://help.sap.com/saphelp_nw70/helpdata/en/45/a4f8bbdfdc0d36e10000000a114a6b/frameset.htm
    Can someone give me an example of such URL?
    Regards,
    Gigi.

    Hi,
    Re: SOAP (Axis) Adapter
    Thanks
    Vikranth

  • Sender Axis SOAP Adapter EOIO

    My PI Sender Axis SOAP Adapter is giving me the following error when I try and use an EOIO quality of service:
    The XI SequenceId must be uppercase and 1-16 characters long.; nested exception is:
    com.sap.engine.interfaces.messaging.api.exception.InvalidParamException: The XI SequenceId must be uppercase and 1-16 characters long.
    If I use EO then the adapter works fine. Does anyone know if EOIO is supported in the Sender Axis SOAP Adapter? I did notice when I select EOIO there is no text box for the Queue Name.

    Hi Krishneel,
    ExactlyOnceInOrder means that the constructed XI message has its QualityOfService value ExactlyOnceInOrder and it is processed synchronously to the persistence layer of the adapter engine and asynchronously to the target service in the order of persistence.
    To guarantee the exactly once delivery of a message, the client must supply a unique message ID for the message.
    More on this can be found in the SAP Note 1039369 (FAQ XI Axis Adapter)
    Also refer this link on basic info on Sender Axis SOAP Adapter.
    http://help.sap.com/saphelp_nw04/helpdata/en/69/a6fb3fea9df028e10000000a1550b0/frameset.htm
    rgds
    Ven

  • Comapre HTTP adapter and SOAP adapter.

    What is the advantage of SOAP adapter over HTTP adapter in IDOC_To_webservice Scenario? Also give some comparison between them.

    Hi
    Ref this
    /people/padmankumar.sahoo/blog/2005/02/15/an-overview-of-soap --> Overview of SOAP
    this link for more differences..
    SOAP and HTTP adapter
    Check this thread....
    Difference between SOAP and Http Sender
    HTTP Adatpter Vs Soap Adapter
    HTPP Adatpter Vs Soap Adapter ????
    Plain HTTP Adapter vs SOAP Adapter with regards to SSL
    Plain HTTP Adapter vs SOAP Adapter with regards to SSL

  • Difference between HTTP adapter and SOAP adapter

    Hi All,
      Can any one tell me abt what is the main difference between HTTP adapter and SOAP  adapter.when we'll use these eactly?
    Thanks
    pullarao.

    Hi Rao,
    Please go through the below links to understand it:
    https://www.sdn.sap.com/sdn/weblogs.sdn?blog=/pub/wlg/1442 [original link is broken] [original link is broken] [original link is broken] [original link is broken]
    More links for SOAP Adapter:
    /people/siva.maranani/blog/2005/09/03/invoke-webservices-using-sapxi
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/fdca3f01f33e1ce10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/69/a6fb3fea9df028e10000000a1550b0/frameset.htm
    More links on HTTP adapters.
    /people/siva.maranani/blog/2005/09/15/push-data-to-mvc-architectured-application-using-xi
    /people/prasadbabu.nemalikanti3/blog/2006/02/27/collecting-and-bundling-vendor-records-from-different-multiple-interfaces-file-systempeoplesoft-and-sending-to-sap-r3-system-part-2
    Regards,
    Subhasha

  • Plain J2SE Adapter Engine - SOAP Adapter

    Which reasons are there for using the soap adapter at the plain j2se adapter engine instead of the soap adapter at the central adapter engine (XI 3.0)? Which benefits are there? Which cases are known?

    The J2SE adapter is a relict from XI 2.0
    You may still use it, especially for migration from XI 2.0 to XI 3.0, but it is recommended to use the J2EE adapter engine.
    Regards
    Stefan

  • 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

  • Receiver Axis SOAP Adapter

    I have a SOAP receiver and am using the HTTP (Axis) Transport protocol. The reason for this being that the web service expects a web service security token with username and password.
    I have loaded aii_af_axisprovider.sda with the mandatory .jar files as well as the wss4j optional .jar file.
    I am using Basic authentication and have specified the the username and password. The 'Keep XI Headers' box has also been ticked.
    However, I getting the following error:
    "WSDoAllReceiver: Request does not contain required Security header"
    Does anyone know what this could be? I am already specifying the username and password in the SOAP adapter. Do I need to specify this elsewhere?
    Also, does anyone know I can view the SOAP messages being sent to the web service?
    Thanks,
    Krishneel

    Hi,
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f071ff6d-5bfb-2910-a985-86ac9f6ad2a6
    Ruby and the SOAP RunTime (SRT) Handler
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f071ff6d-5bfb-2910-a985-86ac9f6ad2a6
    http://help.sap.com/saphelp_nw04/helpdata/en/10/287cc10e4511d5991d00508b5d5211/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/72/c730dac06511d4ad310000e83539c3/frameset.htm
    Thanks,
    Madhu

  • AS2 receiver adapter seems to be transmitting duplicate message to Partner

    Hello guys,
    we have serious issue in prod. we have a partner with whom we share EDI data using As2 adapter.
    let me take eg here
    our AS2 id- AAA
    partner AS2 id - DDD
    first we had problem with them
    "could not send asynchron mdn to partner url" but before we rectified this issue ,DDD has upgraded the As2 sofware which solved current issue but created different issue which is described below :
    as per partner ,messages are sent twice from AAA to DDD . but AAA is claiming that they dont send duplicate messages
    as per DDD sometime they receive whole set of message twice. which AAA cant see at all at their side. but AAA do receive MDN back but with error "MIC not verified # duplicate-document"
    so now AAA also have doubt that why the messages are rejected from the DDD when AAA is not sending the duplicate.
    but anyone has encountered this problem before ???

    Hi Rai,
    I have a similar problem.
    AAA is send AS2 to DDD and from time to time (not always) I get back an AS2 notification saying
    MIC not verified # duplicate-document
    Did you find the solution on this?
    Regards,
    Luis.

  • Mail Adapter to Soap Adapter keeping the attachments - How?

    Hi guys,
    I am working on a scenario where I should pull emails from an Exchange server and I should forward them (with their attachments) to a separate systems via a Web Service.
    So far I have been able to pull the emails using the Mail Adapter and I get to see them in the monitoring tool of PI with their attachment(s).  But what I am not sure of is how I should forward these emails to the external system using a web service.
    This system should expose this web service that should use something similar to SOAP with attachments (I guess) and then PI should forward these attachments using the receiver SOAP adapter with the "keep attachments" option selected.
    Is this something that could work as simply as this (by configuring these two adapters to keep their attachments) OR will I need to do some more fancy stuff?
    Thanks for any advice you can give me on this.
    Aldo

    Hi Stefan,
    thanks for your replay.
    Yes, I understand that the mail should be in an XML message.  And with that part we are doing OK.  We have managed to send the XML between the systems.
    However, what I don't understand is how to pass the attachments.
    How should the receiving system receive them?  if they are not in the XML message itself how are these going to be passed over?
    Will the SOAP envelop have some kind of link or reference to the attachments?
    The receiving system is a SAP CE system and it's based on Java.  Can they expose a service that will somehow handle these attachments?
    Could you explain this part to us?  this is where we get confused.
    Thanks for your help in advance,
    Aldo

  • Plain HTTP Adapter vs SOAP Adapter with regards to SSL

    Hi,
    I need to setup communication channles within XI to send and receive secure xml. I am confused after reading the XI documentation and the some of the discussion forums on SDN.
    Can anyone clarify the following:
    1) Does the plain HTTP Adapter support SSL? According to the XI documentation is does NOT? Have I miss read it?
    2) This being the case, the only way to send and receive secure XML is to use the XI/SOAP Adapter?
    Thanx for your help.
    Cheers
    Yackeen

    Hi Yackeen,
    no, that's not true. The plain HTTP Adapter supports SSL. No problem.
    Regards,
    Udo

  • Axis SOAP Adapter + Certificate

    Hi,
    We developed an interface where the receiver adapter access a web service (https), which uses user and certificate authentication.
    Firstly we configured the "Transport Protocol" as "HTTP", but we got the error "Peer certificate rejected by ChainVerifier". We know that this error means that is missing this certificate in the server.
    However, if we test the same webservice on soapui, we need just to configure the username and password and the request works fine.
    As Axis Adapter uses the same libraries as soapui, we configured and deployed the aii_af_axisprovider.sda with all jars required. If we access http://server:port/XIAxisAdapter/MessageServlet, we can see that the required components are deployed and just the optional components Apache Addressing Apache Sandesha are missing.
    We have followed the "SAP Note 1039369 FAQ XI Axis", but we haven´t had success to find a way to solve our issue.
    Our question is: Can PI with Http (AXIS) work as soapui? We think that if soapui can request succefully the webservice without the certificate, PI should have the same success. Is it possible?
    Thanks in advance.
    Regards,
    Bruno

    Hi Yza,
    It was really helpful your tips. We made a contact with the company responsible by the WS and they sent to us a valid certificate assigned by a CA.
    We configured it in the WebAS KeyStorage (TrustCAs) and the interface worked perfectly.
    In summary, we invoked the WS on 3 ways:
    1 - Soapui - it wasn´t necessary to import the certificate. Probably at runtime, it configures the certificate into an own truststore. After executing the WS we could see the certificate accessing the option "SSL Info".
    2 - Java Code - it worked just after I imported the certificate, even being a expired certificate. I imported it running:
    keytool -import -v -trustcacerts -alias xxxx_alias -keystore D:j2sdk1.4.2_11jrelibsecuritycacerts.jks
    * -keypass changeit -file xxxx.cer
    And I coded this:
    System.setProperty("javax.net.ssl.trustStore", "D:\j2sdk1.4.2_11\jre\lib\security\cacerts.jks");
    System.setProperty("javax.net.ssl.trustStorePassword", "changeit");
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
    URL url = null;
    HttpURLConnection connection = null;
    try {
         //Create connection
         url = new URL(properties.getProperty("endpoint"));
         connection = (HttpURLConnection) url.openConnection();
         connection.setRequestMethod("POST");
         connection.setRequestProperty("Content-Type", "text/xml;charset=UTF-8");
         connection.setRequestProperty("Authorization", "Basic " + credential);
         connection.setUseCaches(false);
         connection.setDoInput(true);
         connection.setDoOutput(true);
         String urlParameters = "<soapenv:Envelope xmlns:soapenv=...";
         //Send request
         OutputStream wr = connection.getOutputStream();
         wr.write(urlParameters.getBytes());
         wr.flush();
         wr.close();
         //Get Response
         InputStream is = null;
         try {
          is = connection.getInputStream();                         
         } catch (Exception e) {
          is = connection.getErrorStream();
         BufferedReader rd = new BufferedReader(new InputStreamReader(is));
         String line;
         StringBuffer response = new StringBuffer();
         while ((line = rd.readLine()) != null) {
           response.append(line);
           response.append('
         rd.close();
         } catch (Exception e) {                    
              e.printStackTrace();
         } finally {
              if (connection != null) {
                   connection.disconnect();
    3 - PI - it worked just after I imported a valid certificate.
    Until we got the valid certificate, I installed an Apache Tomcat and AXIS framework and published the above Java Class on it, creating a WS. So we were invoking the target WS calling this WS on Apache Tomcat to workaround our issue until we have a valid certificate. So our interface was working like this:
    ABAP Proxy -> WS on Apache Tomcat -> WS Target
    Maybe I got lost in some words during the explanations. I hope now it is clearer for you.
    Thank you very much for your attention.
    Regards,
    Bruno

Maybe you are looking for