webMethods

webMethods

Join this online 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.

 View Only
  • 1.  How to configure HTTP intercepter in webmethods

    Posted Tue December 05, 2023 03:52 AM

    I have created the java service like below by implementing HTTPInterceptorIFC interface but how I will register it so that my service will be called?, what are the steps required for this?.

    javaService.java (1.9 KB)

    Thank you!


    #webMethods
    #Integration-Server-and-ESB


  • 2.  RE: How to configure HTTP intercepter in webmethods

    Posted Tue December 05, 2023 10:47 AM

    Please refer the section Creating an HTTP Interceptor in the administrators guide
    for more details.
    -NP


    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: How to configure HTTP intercepter in webmethods

    Posted Tue December 05, 2023 11:41 PM

    Hello @Nagendra_Prasad ,

    Thanks for your response.
    I have gone through the above documentation but it is not clear.
    Below is the package structure and my java class name is intercepter_SVC.
    image (14)

    I have set the below extended property to Intercepter.javaService.intercepter_SVC
    watt.server.http.interceptor.outbound.impl

    After doing this I restarted the server but got the below error.

    java.lang.ClassNotFoundException: Intercepter.javaService.intercepter_SVC
    at com.wm.app.b2b.server.ServerClassLoader.findClass(ServerClassLoader.java:805)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
    at com.wm.app.b2b.server.ServerClassLoader.loadClass(ServerClassLoader.java:1189)
    at com.wm.app.b2b.server.ServerClassLoader.loadClass(ServerClassLoader.java:1133)
    at com.softwareag.is.interceptor.HttpInterceptorManager.init(HttpInterceptorManager.java:59)
    at com.wm.app.b2b.server.Server.run(Server.java:781)

    Need help to understand what exactly we need to put in the extended setting.

    Thank you in advance!


    #webMethods
    #Integration-Server-and-ESB


  • 4.  RE: How to configure HTTP intercepter in webmethods

    Posted Wed December 06, 2023 02:02 AM

    To start with , I would suggest you to figure out which interceptor you need based on your usecase , inbound vs outbound.

    • The watt property you have mentioned is for the outbound interceptor , the property for the inbound interceptor is watt.server.http.interceptor.impl

    • If you need outbound interceptors, your class needs to implement com.softwareag.is.interceptor.HttpOutboundInterceptorIFC versus com.softwareag.is.interceptor.HttpInterceptorIFC for the inbound.

    • A Classnotfoundexception indicates that the class is not found in the following paths as mentioned in the documentation link

    Build the class and add it to a jar file.
    Place the jar file in one of the following locations that Integration Server adds to the classpath:
    Software AG_directory \ Integration Server_directory \instances\instanceName\lib\jars\custom
    Software AG_directory \ Integration Server_directory \lib\jars\custom
    Software AG_directory \ Integration Server_directory \instances\instanceName\packages\packageName\code\jars\static

    • You can confirm if your class is available for the IS runtime to pick up.

    -NP


    #webMethods
    #Integration-Server-and-ESB


  • 5.  RE: How to configure HTTP intercepter in webmethods

    Posted Wed December 06, 2023 10:16 AM

    Sorry @Nagendra_Prasad , In my case I want to implement inbound interceptor , outbound was mentioned by mistake.

    I have my jar in place and it is also visible in class path, but still I am getting the class not found error. Not sure where exactly I am doing wrong…
    Please my configuration below.



    Thank you in advance!


    #Integration-Server-and-ESB
    #webMethods


  • 6.  RE: How to configure HTTP intercepter in webmethods

    Posted Wed December 06, 2023 11:48 AM

    Hi @mukesh.b.behera
    The location of the jar looks fine to me. Please note that the jar needs to be a java jar meaning that the java class needs to be in the right folder as per the package format.
    For example intercepter_SVC class must be inside the Intercepter/javaService folder of the jar.

    -NP


    #webMethods
    #Integration-Server-and-ESB


  • 7.  RE: How to configure HTTP intercepter in webmethods

    Posted Wed December 06, 2023 04:09 PM

    Hello @mukesh.b.behera -

    I recently had to intercept HTTP calls into an Integration Server as well without the need to install and configure an external tool. I still have the Java project I created but instead of typing everything here, I figured I’d just throw it out on GitHub in case others find it useful and want to contribute.

    For now, it’s a simple Eclipse Java project, but if the need arises, we can convert it to a Maven project or whatever we decide is beneficial.

    Here’s the link: GitHub - nibltech/wm-http-interceptor: Sample HTTP interceptors for the webMethods Integraiton Server

    Hope this helps,
    Percio


    #webMethods
    #Integration-Server-and-ESB


  • 8.  RE: How to configure HTTP intercepter in webmethods

    Posted Wed December 06, 2023 11:14 PM