Menu

Add IFTMIN message type

Help
2011-02-11
2013-01-21
  • Kenneth Eriksen

    Kenneth Eriksen - 2011-02-11

    Hi,

    I have successfully deployed and tested the conversion module into PI 7.1 with a working ORDERS test file. I now would like to use IFTMIN, and have added the IFTMIN message structure to the XSD, and organized it the same way as the other message types in place. But I cannot get any of the IFTMIN-segments to be written in the resulting file, I only get the UNB and UNZ segments, which is formed with parameters from the communication channel.

    How can I add additional message types?

    Thanks!

    -Kenneth

     
  • Holger Himmelmann

    Hi Kenneth,
    the XSD has to be updated in the Java project for the deployable adapter module as well as in the ESR. Have you added IFTMIN in both places?

    Regards, Holger

     
  • Kenneth Eriksen

    Kenneth Eriksen - 2011-02-17

    Hi Holger,

    I have only added the updated XSD to the ESR.

    How/where do I update the XSD in the adapter module?

    Thanks!

    -Kenneth

     
  • Kenneth Eriksen

    Kenneth Eriksen - 2011-02-17

    Hi again,

    I have now uploaded the custom XSD to the Java project under EDIFACT_TransformModule/ejbModule with the name EDIFACT_93A_Custom.xsd.
    I have rebuilt the TransformModule-project and the complete sca and deployed it to the J2EE-server.

    When I run the scenario I get the following error in Communication Channel monitoring:
    17.02.2011 13:22:31 Error Exception was raised in transform-module: com.cbsgmbh.xi.af.edifact.util.ModuleExceptionEEDM: Exception was raised in TRANSFORM Module: com.sap.aii.af.lib.mp.module.ModuleException: Configuration lookup failed
    17.02.2011 13:22:31 Error MP: exception caught with cause com.sap.aii.af.lib.mp.module.ModuleException: Configuration lookup failed
    17.02.2011 13:22:31 Error Adapter Framework caught exception: missing xsdDocument: EDIFACT_93A_Custom.xsd

    I have mentioned "EDIFACT_93A_Custom.xsd" as value for parameter EDIFACT.XSD.Name under Module for the communication channel.

    Any clues?

    -Kenneth

     
  • Holger Himmelmann

    Hi Kenneth,

    you have to insert your additional XSD in the file beansTransformModule.xml

    But I would recommend that you make a backup of the original EDIFACT_93A.xsd and just overwrite it with your custom one, so that you don't have to make any adjustment in the config file above.

    Regards, Holger

     
  • Kenneth Eriksen

    Kenneth Eriksen - 2011-02-23

    Hi Holger,

    I have now tried both editing the the file beansTransformModule.xml and overwriting the existing EDIFACT_93A.xsd in the module and redeployed, but none of the alternatives help. After editing beansTransformModule.xml I am able to choose my EDIFACT_93A_Custom.xsd in the Comm channel so I know it deployed correctly, but the resulting file does not containg any fields from the IFTMIN-message from the custom schema.

    If I map both ListOfOrders and ListOfIFTMINs I only get the fields from the Order.

    There is no error message, but the output simply exclude the custom fields. I thinks the structure of the custom xsd is correct and in the same format as the standard message types like ListOfOrders, otherwise I would get an error message somewhere?

    Do I need to further adjust the code somewhere?

    Any further clues?

    Any way I can post my custom xsd here for you to validate?

    Thanks!

    -Kenneth

     
  • Holger Himmelmann

    Hello Kenneth,

    you have to add the additional message type in the Java classes EDIFACTMessage_Type and EdifactConstants.

    Regards, Holger

     
  • Kenneth Eriksen

    Kenneth Eriksen - 2011-02-23

    Hi,

    I have managed to update the EdifactConstants, but I'm a bit confused regarding the EDIFACTMessage_Type class. There are several methods defined for each message type, I guess I need to add the same methods manually for the IFTMIN-message type?

    The EDIFACTMessage_Type is located under the EDIFACT_Adapter_Http-project. Is this needed even I only use the conversion module i Comm channels?

    And I see there is a separate class for each data-type, i.e. Type7383. Do I need to manually create one such class per new data type I have added to the XSD?

    This suddenly became much more complicated than I hoped for….

    -Kenneth

     
  • Holger Himmelmann

    Hi Kenneth,

    sorry about the confusion! The adjustment in the EDIFACTMessage_Type class is only required if you use the complete EDIFACT adapter with AS2 communication. For the EDIFACT conversion module you only need to adjust the class EdifactConstants. The documentation how to extend the module and adapter with additional messages types is indeed on our open task list for quite a while.

    Regards, Holger

     
  • Kenneth Eriksen

    Kenneth Eriksen - 2011-02-24

    Great, it works!

    So the solution was:
    - Create custom message types in the XSD conforming to the format for the standard delivered message types
    - Upload custom XSD in ESR
    - Upload custom XSD into transformModule project
    - Add custom XSD to beansTransformModule.xml
    - Update the custom message types in the EdifactConstants class

    Build and deploy the SCA, voila!

    Thank you very much for your help, Holger!

    Br,
    Kenneth

     

Log in to post a comment.