Creating XLang Message using C#

Hello all,
I want to create a new XLangMessage using C# code to test one of the method which takes XLangMessage as input.
Here is what i tried:
Microsoft.XLANGs.BaseTypes.
XLANGMessage sampleOutput;
XmlDocument tempInput=new XmlDocument ();
tempInput.Load (
@"InputMessage.xml");
sampleOutput[0].LoadFrom(tempInput.ToString());
returnOutput = classObject.MethodName (sampleOutput
In the method i implemented some logic.
However am getting an error message : "Use of Unassigned valriable".
I tried by initializing null. In that case, its throwing error, "Object Ref Not Set To An Instance" at [sampleOutput[0].LoadForm()] line.
How to proceed further?
Regards
kumaraguru

I don't know why you need to create XlangMessage (I do do this occasionally, but not very often), and I strongly suggest that you read Paolo Salvatori's excellent post - 
http://blogs.msdn.com/b/appfabriccat/archive/2010/06/23/4-different-ways-to-process-an-xlangmessage-within-an-helper-component-invoked-by-an-orchestration.aspx
It will be very useful for you (and any BizTalk developer!) in general, the last section about custom BTX message shows how you can create and return an XlangMessage if you have to.
Well worth while looking at the second part of this post as well - http://blogs.msdn.com/b/paolos/archive/2009/09/21/4-different-ways-to-process-an-xlangmessage-within-an-helper-component-invoked-by-an-orchestration-part-2.aspx
Yossi Dahan http://www.sabratech.co.uk/blogs/yossidahan [To help others please mark replies as answers if you found them helpful]

Similar Messages

  • Create null message using BizTalk mapper XSLT

    Hi,
    I have a requirement to check if a message contains a certian value, and if so, throw away the message.  Does anyone know how this could be done using BizTalk mapper/ XSLT?  It's an ESB messaging only solution so don;t want to introduce orchestratons
    / c# code.
    In short is field A = 'yes' the message will be thrown away / made null. 
    Thanks in advance.
    GilesB

    If you consider doing this in Receive-side with some pipeline component, I am afraid you can't eat the data at the receive pipeline. For a null returned, I believe at least a empty message would be published to message box.
    Without orchestration, in message-only scenario one option you can consider is using a custom adapter where you can have your logic whether to send a stream/message out or not. Something like:
    public bool TransmitMessage(IBaseMessage msg)
    _terminate.Enter();
    try
    bool logMessages = Convert.ToBoolean(
    GetAdapterConfigValue(msg.Context, "logMessages")
    if ( logMessages ) {
    SystemMessageContext ctxt = new SystemMessageContext(msg.Context);
    //Add your logic using XPathReader - stream based XPath
    //and check whether the message has the value your're looking for
    bool isFound = false;
    if (!isFound)
    string msgData = "";
    StreamReader reader = new StreamReader(msg.BodyPart.Data);
    using (reader)
    msgData = reader.ReadToEnd();
    // discard the message
    return true;
    } finally {
    _terminate.Leave();
    Above is part of the send adapter code where you add your logic using XPathReader - stream based XPath and check whether the message has the value your're looking for. You can use
    null send adapter as refernce and build your logic where it would check for the required value in your custom adapter.
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • Create Support Message from external system

    HI experts,
    I would like to change the Create Support Message screen(Menu->Help->Create Support Message) and add three fields namely: Category, Subject and Solution Number because currently these fields are not populated in the Service desk if I create message in this way unlike in using NOTIF_CREATE tcode where there are selection fields for these.
    Also, I'm creating the support message from an external SAP system and the messsage is sent to the Solution Manager system. The NOTIF_CREATE tcode does not exist in the external system as well as the whole package DSWP.
    Please let me know you rthoughts on this.
    Thanks
    Eric

    Hi guys,
    Thanks for your answers... But is it possible to call transaction NOTIF_CREATE from an external system?
    I have done something already so that those 3 fields will be automatically populated for a message sent from an external system.
    I changed the screen and called FM BAPI_NOTIFICATION_CREATE(a remote enabled FM which is the one being used by transaction NOTIF_CREATE to create a message) inside FM BCOS_SEND_MSG.
    I populated the category, subject and solution in the FM export parameters as well as the solution number in the sap data table. I put a destination also..
    This FM calls another FM DNO_OW_CREATE_NOTIFICATION which is the one being used from the external system but do not cater the functionality to send the 3 fields that we need.
    As you will notice, there are lots of standard objects that I've changed. =)
    My problem now is that the system data sent is the same with the system data if you create the message using NOTIF_CREATE. Some system that were sent when a message is sent from an external system is missing but at least the sap system and client ID is sent. There is no external reference number also. But hopefullly, the users will accept it. Can't find any other solution to this.
    Thanks,
    Eric

  • Urgent SAP Help menu not showing option "Create Support Message"

    Hi all,
    We are running SAP 4.6c landscape (dev,qa,prd), and have solution manager installed .
    Now when i want to create a support messge from any system in my landscape i dont get the option "Create Support Message" in the SAP Help menu, and we create a support message using Help->Feedback option . Is this the correct was or is there any other settings or notes i need to make/apply on my landscape to get this option.
    Message was edited by: Kamran Ellahi

    Hi guys,
    Thanks for your answers... But is it possible to call transaction NOTIF_CREATE from an external system?
    I have done something already so that those 3 fields will be automatically populated for a message sent from an external system.
    I changed the screen and called FM BAPI_NOTIFICATION_CREATE(a remote enabled FM which is the one being used by transaction NOTIF_CREATE to create a message) inside FM BCOS_SEND_MSG.
    I populated the category, subject and solution in the FM export parameters as well as the solution number in the sap data table. I put a destination also..
    This FM calls another FM DNO_OW_CREATE_NOTIFICATION which is the one being used from the external system but do not cater the functionality to send the 3 fields that we need.
    As you will notice, there are lots of standard objects that I've changed. =)
    My problem now is that the system data sent is the same with the system data if you create the message using NOTIF_CREATE. Some system that were sent when a message is sent from an external system is missing but at least the sap system and client ID is sent. There is no external reference number also. But hopefullly, the users will accept it. Can't find any other solution to this.
    Thanks,
    Eric

  • Unable to capture error message while creating an SO using bapi

    Hi,
    Can anybody suggest how to capture the error message while creating a SO using BAPI.
    I have developed a customeized BAPI and using the BDC format to create the SO.
    Note: i am using a call transaction method for the BDC.
    I am sending the message into message1.
    but i am unable to send the same into an internal table
    shyam.

    Hi Shyam
    If my understanding is correct, you are performing BDC process within the customized BAPI...
    And you want to collect the messages from BDC to an internal table and pass to the output.
    Proceed as below:
    1. While calling BDC, use CALL TRANSACTION .... with addition: <b>MESSAGES INTO itab</b>. The structure of itab should be like <b>BDCMSGCOLL</b>.
    2. Now the messages will be collected in ita.
    3. Prepare the messages using FM: <b>FORMAT_MESSAGE</b>
    4. Collect to the returning table.
    Hope this helps...
    Though i could not understand the reason of creating a BDC within BAPI, you can opt for loading orders via BAPI's like: BAPI_SALESORDER_CREATEFROMDAT1 or BAPI_SALESORDER_CREATEFROMDAT2.
    Kind Regards
    Eswar

  • HT3529 Is there a way to create, store and use preset messages for use with "Messages"?

    Is there a way to create, store and use preset messages for use with "Messages". I often have a recurrinig message to send, after a repeating event, and need to enter the same short message each time. It would be nice to have this short message stored and selectable so that I do not need to enter each time.

    found an answer that seems to work:
    https://discussions.apple.com/message/17997300#17997300

  • How do I create a message board/forum using forms in Dreamweaver?

    I want to create a forum or messageboard using the form in Dreamweaver but I don't know how to do it. Is there any guidance on how I could create a message board or forum on Dreamweaver?

    I don't think it can be done with just dreamweaver,
    You will have to download something like PHPBB,
    If you have a host with fantastico deluxe you can easily set up a forum
    with it.
    Daniel

  • How to create Object related messages using cl_bsp_wd_message_service?

    Hi Gurus,
    Can any ony explain how to create the object related messages using add_message method of cl_bsp_wd_message_service?
    Thanks,
    Murali.

    Hi Murali,
    Check the below code .. hope it helps..
      DATA lr_msg_service     TYPE REF TO cl_bsp_wd_message_service.
      DATA lr_exception       TYPE REF TO cx_root.
      DATA lr_rtti            TYPE REF TO cl_abap_objectdescr.
      DATA lv_msg_type        TYPE        symsgty.
      DATA lv_msg_id          TYPE        symsgid.
      DATA lv_msg_number      TYPE        symsgno.
      DATA lv_msg_v1          TYPE        symsgv.
      DATA lv_msg_v2          TYPE        symsgv.
      DATA lv_msg_v3          TYPE        symsgv.
      DATA lv_msg_v4          TYPE        symsgv.
      DATA lv_msg_level       TYPE        bsp_wd_message_level.
      DATA lr_verification    TYPE REF TO if_bsp_wd_message_handler."#EC NEEDED
      DATA lv_important_info  TYPE        abap_bool.
      DATA lv_exc_prog_name   TYPE        syrepid.
      DATA lv_exc_incl_name   TYPE        syrepid.
      DATA lv_exc_src_line    TYPE        i.
      lr_exception = ir_exception.
    drill down to first exception
      WHILE lr_exception->previous IS BOUND.
        lr_exception = lr_exception->previous.
      ENDWHILE.
      lr_rtti ?= cl_abap_typedescr=>describe_by_object_ref( p_object_ref = lr_exception ).
      lr_exception->get_source_position( IMPORTING program_name = lv_exc_prog_name
                                                   include_name = lv_exc_incl_name
                                                   source_line  = lv_exc_src_line ).
    prepare message
      lr_msg_service = cl_bsp_wd_message_service=>get_instance( ).
      lv_msg_type   = if_genil_message_container=>mt_warning.
      lv_msg_id     = 'CRM_IC_APPL'.
      lv_msg_number = '003'.
      lv_msg_v1     = lr_rtti->get_relative_name( ).
      lv_msg_v2     = ir_exception->get_text( ).
      lv_msg_v3     = lv_exc_incl_name.
      lv_msg_v4     = lv_exc_src_line.
      lv_msg_level  = '9'.
    add message to error log
      lr_msg_service->add_message(
          iv_msg_type       = lv_msg_type
          iv_msg_id         = lv_msg_id
          iv_msg_number     = lv_msg_number
          iv_msg_v1         = lv_msg_v1
          iv_msg_v2         = lv_msg_v2
          iv_msg_v3         = lv_msg_v3
          iv_msg_v4         = lv_msg_v4
          iv_msg_level      = lv_msg_level
          iv_verification   = lr_verification
          iv_important_info = lv_important_info ).
    Regards,
    Raghu

  • "unknown error" creating a Messages account using AIM

    I had a perfectly good AIM account and password yet whenever I tried creating an account in Messages using AOL type account, I got the error "An unknown error has occurred". It also happened when I tried to add the AIM account in SystemPreferences->Internet Accounts.
    SOLUTION: In my case the email address for the AIM account was a yahoo.com email address.  The same email address was used for the Yahoo Internet Account in system preferences. Creating another AIM account using a gmail.com address solved the problem. YMMV

    Hi,
    If it is an AIM Name or a email used at/registered with AIM then it pays to check here https://settings.aim.com/ to see if the account has been suspended.
    9:33 pm      Sunday; July 20, 2014
    ​  iMac 2.5Ghz i5 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • I have created some movies using After Effects but can't open them now because I get the following message:

    I have created some movies using After Effects but can't open them now because I get the following message:
    Ray-tracing on the GPU requires an approved NVIDIA graphics card and CUDA 5.0 or later. For now, ray-tracing will use the GPU.
    After installing CUDA 5.0 or later, restart your computer.
    For more information see: http//www.adobe.com/go/aeraytracedgpu
    HELP. I have a project that needs to be delivered.

    The alert message is just telling you that a specific feature won't use the GPU. This message is innocuous. It only means that the processing of one specific, obsolete feature will use the CPU, not the GPU.
    Are you saying that After Effects won't start or open your project?

  • How to raise message using the attributes created in Theme

    Hi,
    I have created an attribute in the theme of the internet service.
    I want to raise a message using alert, how can i use this attribute in the javascript method?
    Regards
    Sohit

    Hi,
    try
    <script language="javascript">
    alert('Attribute:' + `yourAttribute`);
    </script>
    mind the backtics `` !!!
    kind regards,
    ralph

  • How to log in to Service Desk to create sample message to SAP?

    Dear all,
    How to log in to Service Desk under my Solution Manager server to create sample message to SAP under Component: SV-SMG-SUP?
    Regards
    GN

    Hi GN,
    You have different options to create messages in test component SV-SMG-SUP-TST:
    1. if you are on 7.1 you can create message using CRM_UI
    2. If you are using lower vrsion then either you can create message using Workcenter or using transaction NOTIF_CREATE or using menu --> Help --> Create support message.
    Thanks
    Regards,
    Vikram

  • Error while creating a Message Area

    Hi All,
    When I create a Message Area using the UI element 'MessageArea', I get the following error message at the bottom of the screen:
    "Note: Multiple message areas have been implemented, but only one is supported"
    I just have only one Message Area created, but still I get this error.
    Regards,
    Tom

    > 1) I am getting the error message"Valuation area not defined", while creating a requisition. How to solve this problem?
    Please Go to OMS2 Material types and Select Material Type and set Qty / Value is Checked in all Valuation areas. Also go to Material Master and ensure all the values Maintained in Accounting view.
    > 2) We can put a purchase order on hold. What is the equivalent thing in Purchase requisition?
    The Hold Functionality is for External Documents only.
    > 3) What is the difference between holding a PO and changing the PO by ME22n? What are the fields which change PO does not open up, but hold PO opens up?
    Whenever you are not sure about the Details in PO you can put the Document on Hold and Later you can Save after.
    > 4) The tax code is set as default in PO. We want to make a PO of a material which is usually taxable, but not in this case. But the tax code is set as default. So, how to overcome this?
    You can not set Default Tax code for Purchase order ME21N. Further the Tax codes can be Pulled into Purchase Order thru Purchase info Records.
    Regards,
    Ashok

  • SOLMAN EHP1 - anyone can create support message in Satellite System's Help?

    Hi,
    I just curios that why everyone can create support message in satellite system-> help -> create support message?
    I tested with restricted profile user and without role SAP_SUPPDESK_CREATE, NO BP created but he still manage to create support message???? Any idea??
    Also, same goes to any user can process ticket in SOLMAN with no BP-Employee role and SAP_SUPPDESK_* roles assigned.
    Your kind input is very much appreciated.
    Thanks,
    Nicholas Chang

    Hi Nicholas
    If you are using a "Named" user instead of the Trusted Relationship in the RFC maintained in BCOS_CUST for entry OSS_MSG then this is quite possible. In this case the "Named" user will be used to call the interface to create message and the calling user ie the end user creating the ticket will only be used as "Reporter" of the message.
    The user entered in the RFC details probably has the authorization to create Support desk messages.
    Regards
    Amit

  • Service desk error creating support message "help- create support message"

    Hi
    I'm customizing SM 7.0 SP Stack 15 service desk scenario. I'm in a VAR SAP, so It's a mandatory scenario.
    I've done all basic settings from General Settings, Connection to SAP, Online Documentation, ...,
    Business Partners, iBase, Basic BC-Sets for Configuration, Number Ranges. After them , for Scenario-Specific Settings-> Service Desk->Service Provider I've done all these steps. At SAP System Solution Manager, I've created solutions at dswp transaction and EW Alert are centralized these steps works. Transaction notif_create works and iBase are well mantained.
    The problem is when I try create a support message from satellite SAP system. I logged With a SAP user which is BP, key user and has authorizations in a satellite system and I choose help->create support message, so a pop-up appears and I fill the fields, and I press button (Save/Send). An error appears:
    Error in Local Message System: Access via 'NULL' object reference not possible. Message was Not Created
    In order solve the error I review:
    - The satellite SAP system is at the iBase installed components.
    - I've Assign Number Range for ABA notifications at SLF1 transaction.
    - I've Checked number range for Service Desk Message at SLFN transaction.
    - I've configured ABA Message transaction DNO_CUST01, transaction DNO_CUST04
    - (satellite system) Transaction sm30, table BCOS_CUST:
       Appl.            +       Dest.                                  +                     +
       OSS_MSG   W     SM_SMGCLNT010_BACK    CUST620          1.0
       TST_CUS                                                        0120009939
       RFC SM_SMGCLNT010_BACK works, SM recollects EW Alert from this satellite system
    - (satellite system) I logged with a SAP user with these roles:
      SAP_SUPPDESK_CREATE
      SAP_BC_CUS_CUSTOMIZER  according SAP NOTE 834534
      SAP_BC_CUS_ADMIN       according SAP NOTE 834534
      SAP_SV_FDB_NOTIF_BC_CREATE
      SAP_SV_FDB_NOTIF_BC_ADMIN
      All these roles are mantained.
    - I've review SAP Notes 834534, 864195, 621927(I haven't applied this SAP Note because it's older)
    Please could you help me?
    Thanks and Regards
    Raul

    Hi,
    When I try create a SAP message via help->create suuport message, I get the same error so I run help->create support message in a satellite system so I run help->create support message in Solution Manager
    system. Also, a dump is generated in Solution Manager when I try create support message or from satellite or from solution manager.
    ========================================================================
    Runtime Errors         OBJECTS_OBJREF_NOT_ASSIGNED
    Date and Time          10.07.2008 10:17:26
    Short text
        Access via 'NULL' object reference not possible.
    What happened?
        Error in the ABAP Application Program
        The current ABAP program "CL_BOR_SERVICE_PPF============CP" had to be
         terminated because it has
        come across a statement that unfortunately cannot be executed.
    Error analysis
        You attempted to use a 'NULL' object reference (points to 'nothing')
        access a component (variable: " ").
        An object reference must point to an object (an instance of a class)
        before it can be used to access components.
        Either the reference was never set or it was set to 'NULL' using the
        CLEAR statement.
    How to correct the error
        If the error occures in a non-modified SAP program, you may be able to
        find an interim solution in an SAP Note.
        If you have access to SAP Notes, carry out a search with the following
        keywords:
        "OBJECTS_OBJREF_NOT_ASSIGNED" " "
        "CL_BOR_SERVICE_PPF============CP" or "CL_BOR_SERVICE_PPF============CM004"
        "PROFILE_CONTAINS_PARTNERDEP"
        If you cannot solve the problem yourself and want to send an error
        notification to SAP, include the following information:
    Information on where terminated
        Termination occurred in the ABAP program "CL_BOR_SERVICE_PPF============CP" -
         in "PROFILE_CONTAINS_PARTNERDEP".
        The main program was "SAPMSSY1 ".
        In the source code you have the termination point in line 41
        of the (Include) program "CL_BOR_SERVICE_PPF============CM004".
    =========================================================================
    Thanks and Regards
    Raul

Maybe you are looking for