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
Expand all | Collapse all

Issue with jsonStream as Input to Service

  • 1.  Issue with jsonStream as Input to Service

    Posted Thu July 21, 2016 06:20 PM

    I am having an issue accepting json as a stream in a new service.

    I have set the following property through IS:

    watt.server.http.jsonFormat=stream

    And I am getting the jsonStream parameter, but the value is com.wm.net.HttpInputStream. This is causing the following error when I try to call pub.json:jsonStreamToDocument:

    {“$errorDump”:“Server error occurred”,“$errorInfo”:{“$errorDump”:“Server error occurred”,“$error”:“[ISS.0086.9250] Parameter [jsonStream] is not of type: [InputStream]”,“$localizedError”:“[ISS.0086.9250] Parameter [jsonStream] is not of type: [InputStream]”,“$errorType”:“com.wm.app.b2b.server.ServiceException”,“$service”:“DfsiPunchOut.services:receiveCart”,“$user”:“administrator”,“$time”:“Thu Jul 21 13:55:36 MDT 2016”,“$pipeline”:{“jsonStream”:“com.wm.net.HttpInputStream”,“decodeRealAsDouble”:“false”,“decodeIntegerAsLong”:“false”,“transport”:{“protocol”:“http”,“subprotocol”:“HTTP”,“http”:{“requestUrl”:“/invoke/DfsiPunchOut.services/receiveCart”,“method”:“POST”,“requestHdrs”:{“Host”:“localhost:5555”,“Authorization”:“Basic YWRtaW5pc3RyYXRvcjptYW5hZ2U=”,“User-Agent”:“curl/7.49.0”,“Accept”:“/”,“Content-Type”:“application/json”,“Content-Length”:“347”},“ipInfo”:{“localIp”:“0:0:0:0:0:0:0:1”,“localPort”:“5555”,“remoteIp”:“0:0:0:0:0:0:0:1”,“remotePort”:“53336”}}}},“$details”:null,“$errorMsgId”:“ISS.0086.9250”,“$callStack”:“[ >>>$service=pub.json:jsonStreamToDocument, $currentPath=<<< , >>>$service=DfsiPunchOut.services:receiveCart, $currentPath=/4<<< ]”},“$error”:“[ISS.0086.9250] Parameter [jsonStream] is not of type: [InputStream]”,“$errorType”:“com.wm.app.b2b.server.ServiceException”}

    I have a workaround to set watt.server.http.jsonFormat to bytes instead and then call pub.io.bytesToStream and then call pub.json:jsonStreamToDocument and this works fine. However, I would like to understand how I can make this work properly.

    Thanks,
    Joe


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


  • 2.  RE: Issue with jsonStream as Input to Service

    Posted Thu July 21, 2016 07:13 PM

    Even I have the same workaround and we use the same. Lets see what others comments and meanwhile I will check if we can directly pass the stream. Looks like you have some restful calls.


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


  • 3.  RE: Issue with jsonStream as Input to Service

    Posted Thu September 08, 2016 04:05 AM

    That’s weird, com.wm.net.HttpInputStream extends java.io.InputStream.

    Could you share the stack trace in error log, and what’s your IS version?


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