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.

 View Only
  • 1.  Http get illegal characters error

    Posted Wed May 12, 2021 03:44 AM

    Hi, I am trying to invoke a http get and i am getting following error

    Could not run ‘test_2’
    com.wm.app.b2b.server.ServiceException: java.io.IOException: Illegal character in query at index 29:url ://abcdef.pkmj.com?{“id”:…

    i dont get any error while doing a post but i am not receiving token while using post, instead i am getting a html content of page. Please help , I dont see any special characters in url or in json string.Any help will be much appreciated. thanks in advance :pensive:


    #Integration-Server-and-ESB
    #webMethods
    #webMethods-io-Integration


  • 2.  RE: Http get illegal characters error

    Posted Wed May 12, 2021 04:05 AM

    I believe that you have probably just done an invoke of pub.client:http before the one that is giving you an error.
    You need to make sure that you drop all input/outputs from the previous call otherwise it will interfere e.g.

    Remember you can always map the output to attribute with different names if you want to keep some values and overlap with successive http invokes.
    regards,
    John.


    #Integration-Server-and-ESB
    #webMethods-io-Integration
    #webMethods


  • 3.  RE: Http get illegal characters error

    Posted Wed May 12, 2021 05:33 AM

    Thank you for the response, there are no other services, i am just calling http service only.when i dont pass any string i am getting a ok status with html response .I am not receving the acess token, looks like i am accessing the page but was not passing parameters. I am using 9.5 version:
    please help


    #webMethods-io-Integration
    #webMethods
    #Integration-Server-and-ESB


  • 4.  RE: Http get illegal characters error

    Posted Wed May 12, 2021 05:56 AM

    You can’t use the data attribute if you are doing a get, otherwise it will add it to the URL.
    In which case the string would have to be encoded with key and “=” i.e.

    mj.com?data=%7B%E2%80%9Cid%E2%80%9D%3A%20%221234%22%7D
    

    If doing a post, make sure you include in the headers the expected response type i.e.

    “Accept”: “application/json”


    #webMethods-io-Integration
    #webMethods
    #Integration-Server-and-ESB


  • 5.  RE: Http get illegal characters error

    Posted Thu May 13, 2021 12:03 AM

    Thank you John for your response , The issue is fixed now. I am using http post instead to get the token and i als got my Json incorrect in the beginning.


    #Integration-Server-and-ESB
    #webMethods
    #webMethods-io-Integration