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