App Connect

App Connect

Join this online user group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#Applicationintegration
#App Connect
#AppConnect
 View Only
  • 1.  Removing NameSpaces from Response message

    Posted Wed August 03, 2022 10:37 AM
    Hi all,

    I have webservice defined on DataPower which i am calling from IBM ACE. Now from business requirements the response message should be without namespaces. I tried to use the set the namespaces null but not able get the expected output. Please see below the full message of debug perspective. 

    And i only need the output message with response body without namespaces. Please with the syntax code for output message.

    Thanks all

    Warm Regards
    Justice Theledi

    ------------------------------
    Tlabo Justice Theledi
    ------------------------------


  • 2.  RE: Removing NameSpaces from Response message

    Posted Wed August 03, 2022 11:45 AM
    Hi ...

    There are two potential actions involved when "removing namespaces" ...

    1. The output message may have a namespace prefix declared which you would like to change or remove. Your screen capture shows the definition of several prefixes hung off the SOAP Envelope level of your tree (many of these are the standard SOAP and XML namespaces, but "xmm" looks bespoke)
    2. The actual elements in the tree have names and values which your screen capture shows in the debugger .. but also note that each element in the tree also has a namespace property ... at the end of the flow when the output node serializes the data in the tree, this namespace is consulted to decide which namespace prefix to use.  So "removing namespaces" might also involve removing the namespace assigned to each element in the tree.  Unfortunately the debugger view shown does not inform us of the namespace for each element ... You can capture that info using a trace node to write the tree out to a file with pattern of ${Root} ... that would show whether your tree elements need to have their namespaces removed.
    ACE offers different technologies for the actions above ... were you thinking of doing this with a JavaCompute node ... or an ESQL Compute node for example? Also providing an example of the output XML you are getting at the moment, and the desired output you would like would help us to point you in the right direction.

    Cheers,
    Ben

    ------------------------------
    Ben Thompson
    IBM UK
    ------------------------------



  • 3.  RE: Removing NameSpaces from Response message

    Posted Mon August 08, 2022 10:38 AM
    Hi Ben,

    This has since been resolved by setting or mapping OutputRoot to InputRoot specifying only elements needed for the final message. It was challenging at first but finally it worked from ESQL statements. Thanks for exploring this conversation for better understanding.

    Warmest Regards
    Justice Theledi

    ------------------------------
    Tlabo Justice Theledi
    ------------------------------



  • 4.  RE: Removing NameSpaces from Response message

    Posted Mon August 08, 2022 10:46 AM
    Hi Tlabo, great to hear you have the scenario working!  Good job!

    ... For benefit of other readers, when copying parts of the logical tree from InputRoot to OutputRoot (as per suggestion 2), you have full control over whether you choose to copy all/which aspects (eg NAME, NAMESPACE, TYPE, VALUE ) of the entries in your logical tree.

    ------------------------------
    Ben Thompson
    IBM UK
    ------------------------------