(March 2016: Lab updated for IIB10003) This lab shows how to use a web service connection to invoke an existing Integration Service (EmployeeService). Also how to use the Graphical Data Mapper to demonstrate schemaless mapping, mapping JSON input and output data. As well as write and read elements to the Environment tree and retrieve information about the runtime environment, including the application and flow names.

Featuring:

  • Graphical Data Mapper with schemaless mapping JSON input/output
  • Mapping Node – element concatenation and Custom XPath
  • Mapping Node – accessing the Environment tree
  • Mapping Node – accessing IIB node runtime information
  • Unit Test with the Flow Exerciser
  • Invoking web services asynchronously

Related tutorial in the IIB V10 Integration Toolkit:

Transformation using a Map in a message flow
Learn how to use a Mapping node to transform data using a Map in an IBM Integration Bus message flow by exploring this simple example.

20 comments on"[iib10] Lab 3: A JSON client Application invoking an Integration Service"

  1. Hi. The last section of the lab where you test the AsyncRequest has only got a scenario where the message goes down to the HTTP Reply node path. What can be implemented to test it going down the Failure path from SOAP Async Req node?

    • Just a little addition – it goes down the OUT path of AsyncRequest node even if the service we send requests to (EmployeeService) is switched off.

  2. Hello Team , can you please update for my query?

    • Hello Team,
      While testing this LAB 3 from Swagger UI i got below 500 error.Code Details
      500 Error: Internal Server Error
      Response body
      500 Internal Server Error
      500 Internal Server Error
      BIP2230E: Error detected whilst processing a message in node ‘gen.EmployeeService_REST.getEmployee (Implementation).getEmployee_REST’.
      BIP3944E: The map script generation for QName ”{default}:getEmployee_REST” has failed, with the following details: Location: ”” Internal Error Number: ”0” Error Message: ”[BIPmsgs:3943]BIP3943E: The map resource specified by QName {default}:getEmployee_REST cannot be located.
      BIP3943E: The map resource specified by QName ‘{default}:getEmployee_REST’ cannot be located.

      IBM Integration Bus v10.0.0.3
      Response headers
      server: Apache-Coyote/1.1 content-type: text/html; charset=utf-8 content-length: 768 date: Thu, 18 Jan 2018 10:19:56 GMT connection: close
      Can you please let me know what went wrong in this?

  3. Hello Team,

    While testing this LAB 3 from Swagger UI i got below 500 error.Code Details

    500 Error: Internal Server Error

    Response body

    500 Internal Server Error

    500 Internal Server Error

    BIP2230E: Error detected whilst processing a message in node ‘gen.EmployeeService_REST.getEmployee (Implementation).getEmployee_REST’.
    BIP3944E: The map script generation for QName ”{default}:getEmployee_REST” has failed, with the following details: Location: ”” Internal Error Number: ”0” Error Message: ”[BIPmsgs:3943]BIP3943E: The map resource specified by QName {default}:getEmployee_REST cannot be located.
    BIP3943E: The map resource specified by QName ‘{default}:getEmployee_REST’ cannot be located.

    IBM Integration Bus v10.0.0.3

    Response headers
    server: Apache-Coyote/1.1 content-type: text/html; charset=utf-8 content-length: 768 date: Thu, 18 Jan 2018 10:19:56 GMT connection: close

    Can you please let me know what went wrong in this?

    • Hello Team,

      I followed all steps provided but seems jdbc is not working properly and below error is thrown.

      BIP6233E: An error occurred in node: ‘Broker ‘IIBV10’; Execution Group ‘default’; Message Flow ‘gen.EmployeeService’; Node ‘getEmployee_Request_Response.getEmployee_WS’; Node Type ‘Mapping’ There was a problem establishing a connection to the given database URL: ‘jdbc:db2://localhost:50000/HRDB:user=G01093828;password=xxxxxxxx;’ Exception details: ‘ error message: IO Exception opening socket to server localhost on port 50000. The DB2 Server may be down., vendor’s error code: -99999, stack trace: [com.ibm.db2.jcc.a.a.<init>(a.java:137)

      Can you please help?

  4. Hello,

    I went through all the steps in Lab3, so far so good, all test results are as expected….
    Got 2 questions though for Lab3:

    1. Under session “6. Invoking the EmployeeService integration service asynchronously (optional)”, there is “4. For the getEmployee_AsyncResponse flow, construct the flow as shown here:”, any idea what’s the purpose of creating this AsyncResponse flow?
    The reason to ask is I don’t see connections between this AsyncResponse flow and AsyncResquest flow created earlier in the same section.

    2. Knowing “Asynchronous Web Service Input nodes are not supported with the Flow Exerciser”, are there other ways to do a test with this AsyncResponse flow?

    Any Advice is welcome, thanks….

    Eric

    • @DevEricDan Hi Eric,
      I’ve passed your questions on to the IBM Betaworks team who wrote the Labs.
      Regards, Ian

  5. Hi Ian,

    On the section Testing Using SOAPUI, it said to open/use an EmployeeService_PrebuiltWorkspace. Can you send me this prebuilt workspace? Thank you.

  6. For the testing using SOAPUI, where do I find the workspace, “EmployeeService_PrebuiltWorkspace” in order to expand the project “EmployeeService_JSONClient – Sync”? Are these included in the labfiles?

    • ILIYA Dimitrov March 24, 2017

      Hello Jimson,

      The labs refers to the SOAPUI workspace used on the development IBM VM. Unfortunately we have not provided the ‘EmployeeService_PrebuiltWorkspace’ in the lab files. However, you should be able to easily set up a new project in SOAPUI. Once you start the new project, set up an ‘Endpoint’ – http://localhost:7800 (assuming your service is running on that port). Then for ‘Resource’ – ‘/EmpServClient_getEmployee’ (again assuming that you have followed the naming as described in the lab). You will need to specify ‘POST’ operation and then provide the input – {“empNumber”:”000010″}. The screen captures in the lab should be able to assist you.

      I hope this helps.

      Thank you

      • I could not get the SOAPUI response in JSON format. It’s only showing as XML. This is the message on the JSON tab “The content you are trying to view cannot be viewed as JSON”. Any suggestion?

        • ILIYA Dimitrov April 07, 2017

          Hi Jimson,

          Did you follow exactly the steps as described in the lab guide and did everything worked as described up to that point? You may need to ensure that your development matches what is shown in the screen captures from the lab guide.
          If you have followed the instructions carefully, you should have a mapping node in EmpServ_JSON_getEmployee message flow called XML_to_JSON, which transforms the XML format to JSON.

          I hope this helps

          • I went through each step and found out that when removing the HTTP Response Header I mistakenly select the “Delete header” in the HTTPInput tab instead of the HTTPResponse tab. Lesson learned. Thanks.

  7. Hello,
    I followed the steps but I see on page 30 of the pdf a instead of a JSON object even though I put {“empNumber”:”000010″} in for the http message. this might be the reason why it is causing me the transformation to fail.

    Thanks for the help.

    • Hello,
      I followed the steps but I see on page 30 of the pdf a BLOB instead of a JSON object even though I put {“empNumber”:”000010″} in for the http message. this might be the reason why it is causing me the transformation to fail.
      Thanks for the help.

  8. Hi,
    I am getting error of timeout after passing message.
    I did several times this exercise but same error arise
    Please provide step by step pictorial so I can understand it properly,

    • ILIYA Dimitrov February 17, 2017

      Hi Abhinav,

      If you still experience the same timeout issue, could you share any errors that you may see?

      Thank you

  9. The link to the zip file (Lab file (144 KB)) is broken. So I am unable to download the file “IIB1000_03_EmployeeService_JSONClient.zip”. The other links to the other files for the other self-study labs in this series are all okay.

Join The Discussion

Your email address will not be published. Required fields are marked *