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

Similar Messages

  • 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

  • TO Get  Ensuring Exactly Once Processing data from sender soap adapt

    To XI Specialists
    Now Im trying to get Ensuring Exactly Once Processing data from sender soap adapteter.
    My plan is that send data from Receiver adapter, to Sender adapter by SOAP.
    (1st interface is ABAP to Soap "BE", 2nd interface is Soap to File "EO")
    Sender SOAP adapter will returun Ensuring Exactly Once Processing data.
    (see SAP HELP, http://help.sap.com/saphelp_nw70/helpdata/en/69/a6fb3fea9df028e10000000a1550b0/frameset.htm )
    AND I want to get Ensuring Exactly Once Processing data, I want to determine what to do in ABAP proxy.
    SO I made and tested 2interface. but error occuered.
    I checked the error, and Now I know what is the cause.
    The cause is that Ensuring Exactly Once Processing data didnt enter the payload, at Receiver Adapter.
    1st interface coulnt get the payload data, so mapping error occuered....
    Please give me help,
    <b>"How to get Ensuring Exactly Once Processing data From Sender SOAP ADAPTER"</b>
    or
    <b>"How to enter Ensuring Exactly Once Processing data into Payload of Receiver SOAP ADAPTER"</b>
    and more excelent way....
    our XI is version7.0 and SP10
    Please teach me your wisdom!
    Naoki Kurihara

    I seeked and I noticed that
    maybe I catched the message but the message dont have payload.
    so I got no_payload error.
    I checked SAP note.
    I noticed, no_payload error will be managed to nomal message at SP13....
    my XI is SP12....
    I ll seek for another way!!
    Thank you! noaki

  • Acknowledgement from receiver file Adapter with out BPM

    Hi Gurus,
    I am trying to get Acknowledgement from Receiver file Adapter with out Using BPM.
    Here is the scenario. I am sending files from different Sender Adapters. There is only one target that is File Adapter. After each successfull and failure transaction I need an Acknowledgement that needs to trigger another receiver adapter and send the the file name and timestamp to that file.
    Hope this is a complicated scenario. Please help me.
    Thanks,
    Kevin

    from sap note 821267
    6. Acknowledgements
        * Q: Does the File Adapter support acknowledgements?
        * A: You need to distinguish system acknowledgements (indicating that a message has been received by the target system) and application acknowledgements (indicating that the message has been successfully processed by the application on the receiver side).
               The receiver of an XI message will only send an acknowledgement back to the sender if the sender has requested one. However, the File Adapter has no functionality that relies on the receipt of an acknowledgement, so it never requests one.
               On the other hand, if a File Adapter Receiver receives a request to send an acknowledgement, it will do so for a system acknowledgement request. Application acknowledgements are not supported at all as the File Receiver has no way to determine if the written file has been correctly processed by the back-end application, which is what a positive application acknowledgement would imply.
    this means that your requirement is ideally not possible without a BPM

  • 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

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

  • 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

  • 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

  • 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

  • Error while posting data to sender axis soap adapter

    Hello,
    I am trying to post the data to following url
    http://sapxis:50000/XIAxisAdapter/MessageServlet?senderService=temp&interface=os%5Ftest&interfaceNamespace=http%3A%2F%2Ftest%2Ecom%2Fxi%2FPOC
    But I am getting following error:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <soapenv:Body>
          <soapenv:Fault>
             <faultcode>soapenv:Server.generalException</faultcode>
             <faultstring>failed to invoke the module proessor; nested exception is:
         com.sap.aii.af.service.cpa.CPAException: Couldn't retrieve inbound binding for the given P/S/A values: FP=;TP=;FS=temp;TS=null;AN=os%5Ftest;ANS=http%3A%2F%2Ftest%2Ecom%2Fxi%2FPOC;</faultstring>
             <detail>
                <ns1:hostname xmlns:ns1="http://xml.apache.org/axis/">sapxis</ns1:hostname>
             </detail>
          </soapenv:Fault>
       </soapenv:Body>
    </soapenv:Envelope>
    Please help.
    Thanks in advance,
    Beena.

    Thanks Stefan.
    Yes, sender agreement is there and it is also there in CPA Cache.
    CPAObject: (Binding) keys: ObjectId=02cb8f5717cc35e582f072b26138a0f8 values: Direction=I
    ActionNamespace=http://test.com/xi/POC ToParty= FromParty= HeaderMappingConfig=null MappedActionNamespace=null MappingClassName=null ActionName=os_test AdapterNamespace=http://sap.com/xi/XI/System MappedActionName=null ToService= AdapterSWCV=b38bcd00e47111d7afacde420a1145a5 FromService=temp AdapterType=SOAP MappingId=null Attributes=<?xml version="1.0" encoding ...
    http://sapxis:50000/XIAxisAdapter/MessageServlet page also shows the status OK for required components and Warning for optional components.
    Am I missing something?
    Thanks,
    Beena.

  • 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

  • Using the Axis Framework in the SOAP Adapter

    Hello experts,
    I am currenty checking how I can easily manipulate sender and receiver details and how I could get attachments into XI.
    I saw in the sap help that it is possible to use the AXIS framework from the SOAP adapter:
    http://help.sap.com/saphelp_nw04/helpdata/en/45/a39e244b030063e10000000a11466f/frameset.htm
    As usual, the documentation is of the same quality SAP usually provides.
    So my first question would be: This is a moduke to be used from the SOAP adapter right? I am asking because they also wirte about the AXIS adapter and its metadata.
    In oder to get it working, I created in the NWDStudio a library project, added my libraries (to the root directory) and deployed it via SDM. Deployment is succesful but its not working.
    SAPHelp says I should check for a MessageServlet - I ask myself how that could appear suddenly just by packaging some axis libraries...?
    I am using for that the ESA box (NW04s SP6) - I was not able to see whether there are some dependencies to the SP - are they?
    Thanks for your support!
    Helge

    Helge,
    Axis is outdated and has some issues ..use Apache Soap instead its much better and easy to use.
    http://ws.apache.org/soap/
    Regards
    Ravi

  • Receiver SOAP Adapter (HTTP AXIS)

    Hi Experts,
    I need to use receiver soap adapter to communicate with a WebService, actually it is a AXIS service i can see when i give the soap url in web browser.
    my question is for axis service, does it mean i have to use HTTP AXIS in the receiver channel to request the response for web service server? Can i use HTTP only without AXIS?
    when i use SoapUI to test the webservice, it works fine. But when i use receiver soap adapter with HTTP (without AXIS), it is responding with the belwo error.
    <sap:Error ...>
      <sap:Category>Application</sap:Category>
      <sap:Code area="UNKNOWN">APPLICATION_ERROR</sap:Code>
      <sap:AdditionalText>Application Fault</sap:AdditionalText>
      <sap:ApplicationFaultMessage namespace="http://sap.com/xi/XI/System/Axis/sample">host name</sap:ApplicationFaultMessage>
      <sap:Stack/>
    </sap:Error>
    Experts, please help on this, the major question is HTTP AXIS is required when target web service is an AXIS service?
    Thanks in advance.
    Regards,

    >>my question is for axis service, does it mean i have to use HTTP AXIS in the receiver channel to request the response for web service server? Can i use HTTP only without AXIS?
    You are going to consume webservice. You can use standard SOAP adapter itself to consume the webservice that is built with axis framework.
    Do you have some specific user authentication procedures like SAP Assertion Tickets, username token etc and some specific encapsulation formats (MIME, DIME, MTOM),WS Reliable Messaging  and so then you need SOAP Axis adapter. If you need to consume webservice with standard transport protocol (HTTP or HTTPS) and client authentication etc , our standard SOAP adapter is more than enough.
    Refer this link what axis soap adapter supports

  • SMIME in sender soap adapter

    Hi,
    I'd like to know the proper format of the POST request to a sender soap adapter with SMIME activated. I've found almost no documentation about it.
    I'm trying to send a document ciphered to PI via soap adapter (HTTP POST). I've done the following steps
    1. I activate SMIME in the sender soap adapter, and I specify "Decrypt" as the security procedure in the sender agreement. I also incorporate the private key in the keystore DEFAULT and reference to it in the sender agreement.
    2. I use OpenSSL to cipher an xml document like this (I use the public certificate associated to the previous private key) :
    --> openssl smime -encrypt -in fich.txt -out fich_encrypted.txt certTesting.pem
    What I get is:
    MIME-Version: 1.0
    Content-Disposition: attachment; filename="smime.p7m"
    Content-Type: application/x-pkcs7-mime; smime-type=enveloped-data; name="smime.p7m"
    Content-Transfer-Encoding: base64
    MIIC....[base64 content of the file encrypted]
    3. I use CURL to send the HTTP POST request to PI. Previously I get the binary file from the base64 content.
    > POST /XISOAPAdapter/MessageServlet?senderParty=&senderService=BC_1[...]
    > Authorization: Basic c2U[...]
    > Host: pi.[...].com:50000
    > Accept: /
    > Content-Type: application/pkcs7-mime; smime-type=enveloped-data; name=fich_encrypted.der
    > User-Agent: Jakarta Commons-HttpClient/3.1
    > Accept-Encoding: text/xml
    > Content-Disposition: attachment; filename=fich_encrypted.der
    > Content-Length: 620
    > Expect: 100-continue
    but I get this error from the SOAP Adapter:
    --> java.io.IOException: invalid content type for SOAP: APPLICATION/PKCS7-MIME.
    I also get the same error if I remove the header Content-Disposition.
    4. If I send the xml file without ciphering (header Content-Type: text/xml;charset=UTF-8) I get the error:
    com.sap.engine.interfaces.messaging.api.exception.MessagingException: SOAP: call failed: java.lang.SecurityException: Exception in Method: VerifySMIME.run(). LocalizedMessage: SecurityException in method: verifySMIME( MessageContext, CPALookupObject ). Message: IllegalArgumentException in method: verifyEnvelopedData( ISsfProfile ). Wrong Content-Type: text/xml;charset=UTF-8. *Expected Content-Type: application/pkcs7-mime or application/x-pkcs7-mime*. Please verify your configuration and partner agreement
    PROBLEM --> I really don't know what the SOAP sender channel is expecting when SMIME is activated. I've tried to send the binary file encripted as an attachment and also directly, but the soap adapter complains.
    Thanks

    HI,
    for XI EP
    Please see the below links so that you can have clear Idea..
    /people/saravanakumar.kuppusamy2/blog/2005/02/07/interfacing-to-xi-from-webdynpro
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/java/integrating%20web%20dynpro%20and%20sap%20xi%20using%20jaxb%20part%20ii.article
    Consuming XI Web Services using Web Dynpro – Part II-/people/riyaz.sayyad/blog/2006/05/08/consuming-xi-web-services-using-web-dynpro-150-part-ii
    Consuming XI Web Services using Web Dynpro – Part I -/people/riyaz.sayyad/blog/2006/05/07/consuming-xi-web-services-using-web-dynpro-150-part-i
    /people/sap.user72/blog/2005/09/15/creating-a-web-service-and-consuming-it-in-web-dynpro
    /people/sap.user72/blog/2005/09/15/connecting-to-xi-server-from-web-dynpro
    Regards
    Chilla..

Maybe you are looking for