IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

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.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  Can any body post simple java service code to learn java service development.

    Posted 09/29/12 12:19 PM

    Hi all ,
    I am new to java services in webMethods.Just now i started learnig java services dvelopment.
    Can any body post simple java services code…so that it will be useful for me.
    Hope for reply…


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: Can any body post simple java service code to learn java service development.

    Posted 09/30/12 02:06 PM

    Hello mumbai,

    See the sample codes posted in the Software AG community site. You should find sample Java service code posted there.

    [url]http://techcommunity.softwareag.com/ecosystem/communities/codesamples/webmethods[/url]


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 3.  RE: Can any body post simple java service code to learn java service development.



  • 4.  RE: Can any body post simple java service code to learn java service development.

    Posted 11/26/20 01:02 AM

    Hi

    It seems link for Java sample are broken !

    Regards


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 5.  RE: Can any body post simple java service code to learn java service development.

    Posted 11/26/20 04:42 AM

    Here’s a quick walkthrough to create a HelloWorld java service

    1. Create the java service inside a package/folder from the package navigator. I called mine ‘helloWorldJavaService’.
      image

    2. Go to the input/output tab by pressing where highlighted
      image

    3. Define your service contract (input and outputs. In this example, we’ll take a string variable to receive a name, and a string response that contains the greeting, e.g.
      image

    4. Go back to the source, right click and find the ‘Generate Code…’ menu item and press this

    5. It’ll ask you to save your service, press to do so, then you’ll see the Code Generation dialog. Select ‘For implementing this service’ and press Finish
      image

    6. A pop-up dialog will inform you that the generated code has been copied to the clipboard
      Press ‘Ok’
      image

    7. Now back in your java service code, in the highlighted area:
      image
      press to paste the generated code.

    8. It should then look something like this:
      image

    The generated code contains the lines to take the input from the pipeline and put them into java variables, and also to return java variables into the pipeline.

    1. Now you just need to add whatever code you like, and change the output variable, I’ve highlighted the bits I’ve just added:
      image

    2. Now you can run your service:

    and you should see the right result :blush:


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 6.  RE: Can any body post simple java service code to learn java service development.

    Posted 12/01/20 02:03 AM

    Hi,

    Do you have an complete Angular application Sample wiith ACME on your repository ?

    Regards


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 7.  RE: Can any body post simple java service code to learn java service development.

    Posted 12/01/20 03:49 AM

    If you want to call an Integration Server service from an angular application then I would create a REST descriptor for the service to expose this as a REST endpoint, then consume this REST endpoint in the angular application.

    Angular structure/code/examples differ across versions (it’s one thing which frustrates me about angular). If you search the web you can probably quickly find an example based on the version of angular you’re using, but here’s a starting point from the angular docs: Angular - Communicating with backend services using HTTP

    If the Integration Server endpoint is being called from the front-end (browser) and the IS/Angular server have different addresses, then you may need to consider CORS, or proxying the request from the server hosting the angular app to the integration server. You should also think about securing the REST endpoint to reduce attack vectors from malicious actors, whether that be via an API Gateway, or other security configuration and appliances.


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB