Module developemnt: casting to Message

I dot ClassCastException for SOAP sender adapter module in line
Message message = (Message) moduleData.getPrincipalData();
Could you help what's wrong with Module?

Hello Stefan,
do you have more information about developing modules for the soap sender adapter?
I made some tests and also noticed that there is a difference...when writing modules for normal sender adapters (e.g. File Adapter), the principal data seems to be of type 'com.sap.aii.adapter.xi.ms.XIMessage', whereas the principal data in the soap sender adapter is of type 'com.sap.aii.messaging.mo.MessageContext'.
Is any information available about class 'com.sap.aii.messaging.mo.MessageContext'? Alas, I couldn't find any...
Thanks & regards,
Matthias

Similar Messages

  • RFC Function module-With Only Request message

    Hi
    i need a RFC with only Request message and Response message is not required.
    please help me, how to create a RFC function module with out Response message, and it should contain only Request message.
    i have created RFC in this way:
    RFC doesn't contain neither import nor export parameters. and i have defined one table in TABLE tab which refers to a ztable created already.
    when i imported RFC into XI i came to know that RFC has both Request and Response messages, but i don't need Response message.
    Thanks in advance..help would be appreciated
    Regards,
    Rajesh

    Thankx Michal,
    I have written ZRFC this way:
    insert ZMM_AUTO_GR from INPUT_TABLE .
      if sy-subrc = 0.
        commit work.
      else.
       rollback work.
    im not using neither import nor export parameters..but using only tables parameters. but when imported in XI im getting same table  structure in both request an response.
    please suggest what changes required in above code to invoke my ZRFC in async way.
    you will not get any response in XI- what chages required in my code to dnt get .reponse in XI.
    appreciate your help.
    Regards,
    Rajesh.

  • Function modules used in process message categories

    Hi Gurus,
    in process message characteristics, we need to assign the function modules. please advise is there any place (sap system or any website) where we can find all the function modules which are used in pi sheets? i want to know function modules and their uses or how to use them in pi sheets? if i want to develop new function modules, what should be the criteria, please guide me. thank you for the support.

    Hello
    In addition, on transaction O13C you will find the process message categories and which message destination is assigned to each category.
    Here is the documentation of the message categories:
    Predefined Process Message Categories - PP - PI-PCS Interface: Linking of Process Control Systems - SAP Library
    BR
    Caetano

  • Adapter Module to convert text message to XML

    Hello Experts,
    I am writing a custom adapter module to convert the text  content to XML message at the sender adapter end.
    I have followed the steps mentioned in the "HowToCreateModulesforJ2EEAdapterEngine" guide available on SDN.
    I have created the java logic in the process mesthod of the bean to conver the text message to XML paylod (don't know if it is correct). I do not have much idea about the Adpater API methods.
    Can anybody help me with the logic to convert the text msg to xml paylod using adapter frame work APIs or is there any way I can debug and test my logic in NWDS.
    Any help will be greatly appreciated.
    - Rajan

    Hi ,
    To convert Text message to XML why yiu want to go for Adapter Module?? Using file content conversion it self you can do it right?????
    There is no standard logic to convert text file to XML, the logic purely depends on your text message format.
    Regards,
    Raj

  • Function Module to send SOAP message

    Is that possible to use function module to send out SOAP message from CRM to external system?
    Thanks a lot in advance

    Hello Rokie,
    Please go through these links.
    http://help.sap.com/saphelp_nw04s/helpdata/en/fc/5ad93f130f9215e10000000a155106/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/14/ef2940cbf2195de10000000a1550b0/content.htm
    regards,
    Muralidhar Prasad.C

  • Function module to read error message provided message class and mssg no.

    Hi experts,
    I am trying to populate my database table with the error message.
    The error message as comming form standard code in an ITAB.
    I am getting the error class and message number.
    Can any body please tell me any function module to read the error.
    Or is there any way to populate the database table with the error message.
    Regards,
    Sandipan.

    Hi,
        You can use the Function module mentioned below.
    call transaction 'VA42' using bdcdata  mode  w_mode
                                        update  w_synch
                                      messages into it_mesgtab.
        loop at it_mesgtab into wa_mesgtab where msgtyp ca 'EA'.
        endloop.
        if sy-subrc <> 0.
          read table it_mesgtab into wa_mesgtab index 1.
        endif.
        call function 'MESSAGE_TEXT_BUILD'
          exporting
            msgid               = wa_mesgtab-msgid          "Messg class
            msgnr               = wa_mesgtab-msgnr          "Messg No.
            msgv1               = wa_mesgtab-msgv1
            msgv2               = wa_mesgtab-msgv2
            msgv3               = wa_mesgtab-msgv3
            msgv4               = wa_mesgtab-msgv4
          importing
            message_text_output = it_err-sapmessage.
       Append it_err.
    Regards,
         Srinivas

  • Function module to display % complete message

    Many moons ago I remember seeing a fn module that can display the % complete message as a 'S' type message. Can't seem to find it now. I need to know the name of the fn module.
    Thanks.
    Rohan

    Hi Nir,
    U can refer to ABAP FAQ..
    https://www.sdn.sap.com/irj/sdn/developerareas/abap?rid=/library/uuid/840ad679-0601-0010-cd8e-9989fd650822
    It has an example of the same ...
    Showing a progress bar in ABAP
    This process is very easy but a lot of programmers don't know how to do it. You just have to call the ABAP FM SAPGUI_PROGRESS_INDICATOR, at the appropriate points.
    Below is a simple example, give it a try !!
    REPORT zdany_progress_bar.
    DATA: percentage_text TYPE c LENGTH 5.
    DO 100 TIMES.
        WAIT UP TO '0.5' SECONDS.
        percentage_text(3) = sy-index.
        percentage_text+3 = '%'.
        CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
        EXPORTING
            percentage = sy-index
            text = percentage_text.
    ENDDO.
    Regards,
    Tanveer.
    <b>Please mark helpful answers</b>

  • Function module to get error message, using MSGNR, MSG ID, MSGV1...etc...

    Hi There,
         I have BDC, in return it gives me message number, message ID, msgv1,...... etc. I want to get the original message using these values.
    Please can you tell me which function module should I use.

    Hii
    Call the FM
    <b>FORMAT_MESSAGE</b>
    <b>Reward if Helpful</b>

  • New function module for WWW_USER AUTHOR_ MESSAGE

    Hi ,
    Is there any other function module which we can use for msg other than WWW_USER AUTHOR_ MESSAGE as it is obsolete.
    Thanks,
    Arjun.

    solved myself

  • Cast error message when discovering ref cursor parameter from stored proced

    We are today using Microsoft's Oracle provider with some code from the old Data Application Block (from MSDN) to discover parameters from the stored procedures. This code uses the OracleCommandBuilder.DeriveParameters to get the parameters from the stored procedure and command.Parameters.CopyTo copies the discovered parameters into the command object.
    If I test with a simple function returning a ref cursor I get one parameter with type refCursor and ParameterDirection.OutPut. This is working fine as long we where using Microsoft's Oracle provider. But using Oracle ODP .NET I get the following error message on datadapter.Fill (I fill a dataset with the result from the reference cursor)
    Unable to cast object of Type 'Oracle.DataAccess.Client.OracleDataReader' to type 'Oracle.DataAccess.Types.OracleRefCursor.
    If I create a ref parameter manualy like this:
    OracleParameter myrefCursor = new OracleParameter();
    myrefCursor .OracleDbType = OracleDbType.RefCursor;
    myrefCursor .ParameterName = "myParameterName";
    myrefCursor .Direction = ParameterDirection.ReturnValue;
    and add it to the command object this is working OK. So it seems to be a problem with discovering ref cursor parameters from the database, other parameter types is OK.. I have compared the properties of my manual ref cursor parameter with the one discovered from the stored procedure, but I cannot see any difference. (I see the Value property has some values for the discovered one, but I have set this to DBNull.Value without any result)
    Any ideas why I get this error code? Is there any other code blocks I can use to discover the parameters? We send in params object[] with the different values into the helper class and the value is added to the parameter. (Se I don't need to set the data type etc for each parameter, I just need to have the correct order of the parameters)

    For accuracy's sake, just wanted to let everyone know that this is actually a bug. The correct bug number is 8423178.
    Christian
    Mark_Williams wrote:
    Just to follow-up on this issue...
    The bug has been closed as "not a bug" as it seems undocumented behavior was relied upon for this to work in earlier releases.
    Note from the documentation on DeriveParameters:
    "The output values of derived parameters return as .NET Types by default. To obtain output parameters as provider types, the OracleDbType property of the parameter must be set explicitly by the application to override this default behavior. One quick way to do this is to set the OracleDbType to itself for all output parameters that should be returned as provider types." (emphasis added)
    The issue, as you might already know, is that there is no corresponding .NET Framework Type for an Oracle Ref Cursor and the type is, therefore, set to Object. So, explicitly setting the type to OracleDbType.RefCursor should work.
    Regards,
    Mark

  • Workflow initiated by RFC module , not getting any  message in inbox

    hi all
    I am trying to trigger a workflow by a RFC function module
    My questions are ::
    1. will there be a message which will be automatically sent to my inbox ?
    2 if not then what i have to do to send a message to the inbox of any one whose initiating that workflow through function module
    it a bit urgent
    thanks in advance
    naval bhatt

    Hi,
    if you want a work item to appear in a users inbox (message) then you will have to create a step in the workflow you trigger that does this.
    I guess the develoment steps are as follows.
    1) Create an rfc enabled fm in se37. In this fm you need to publish the event that you use to start your WF. This can be done by using fm SWE_EVENT_CREATE . You will need the object type, the key and the event name.
    2) Configure a workflow with the steps you want to execute and subscribe it to the event your using. (SWE2 or the event linkage in the workflow template tc pftc).
    These are the basic steps you will have to execute.
    Cheers,
    Kevin.

  • "Function module not allowed" error message

    Hi,
    We created a special FM to be processed when the INVOIC is in inbound processing. We link the FM to the process code and the process code to the partner functions. We get the error message; "Function module not allowed: & name of our FM". However, when we reprocess the idoc via WE19, it goes through.
    Did somebody ever face that situation?
    Thanks
    Martin

    Hi
    is it for MRM  .  If it is ,I faced the same Problem Martin .go to EDIFCT table give ur basic type and execute and check for entries .if there no issue other wise goto we57 and maintain the entry for basic type .

  • Adaptor Module Developemnt ?

    Hi @ ,
    I need to develop Adaptor module.I dont know thow to do that .
    I need some docs or reference to do the same .
    Regards

    Hi
    check this primer
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3bdc14e1-0901-0010-b5a9-a01e29d75a6a
    (How to develop a module for reading file name in a sender file adapter XI 3.0)
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/da5675d1-0301-0010-9584-f6cb18c04805
    and this weblog
    /people/francesco.bersani/blog/2007/03/27/rename-attachment-adapter-module
    regards
    krishna
    Note:award points id useful

  • When I transfer to the Develop module I get a message " The Folder could not be found"

    The photo shows up but I am unable to edit the photo. What am I doing wrong?

    If you are still using a Cloud-acquired version then yes you should uninstall and reinstall using a licensed version.
    Lightroom - all versions
    Windows
    http://www.adobe.com/support/downloads/product.jsp?product=113&platform=Windows
    Mac
    http://www.adobe.com/support/downloads/product.jsp?product=113&platform=Macintosh

  • Content Conversion Module with the J2EE JMS Adapter

    HI,
    I am following this PDF
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/50061bd9-e56e-2910-3495-c5faa652b710
    I have done according to No 3 (page 5) and No 3.1 (page 6),
    but in Adapter Monitor I am getting the following error
    Error: Module exception java.lang.ClassCastException found
    what is this error and where I have to check
    Help pls
    Thanks
    dushanth
    Message was edited by:
            dushanth ry
    Message was edited by:
            dushanth ry

    hi
    Try with this
    Check the library files(aii_af_mp.jar, aii_af_ms_api.jar and aii_af_trace.jar ) are inside the EAR. If this is the case, delete them before deploying
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/02706f11-0d01-0010-e5ae-ac25e74c4c81
    ClassCastException using Moduleprocessor
    Module developemnt: casting to Message
    Thanks

Maybe you are looking for