Upgrading IS to 10.7: rest service request problem

What product/components do you use and which version/fix level are you on?

IS 10.7

Is your question related to the free trial, or to a production (customer) instance?

production

What are you trying to achieve? Please describe it in detail.

After upgrading IS from 9.8 to 10.7, we encountered a very serious problem, namely, all rest server stopped working.
The input of rest service request (_post method) is not getting received as ‘contentStream’ on the 10.7 version.
All services failed by missing object ‘contentStream’.

Do you get any error messages? Please provide a full error message screenshot and log file.

Postman test:
failed: '/contentStream VV-005 [ISC.0082.9034] Field is absent, field must exist

Have you installed all the latest fixes for the products and systems you are using?

I hope that yes

Hi @Boris_Kouraev ,
You can try a couple of things to check

  1. What is the value of the watt property watt.server.defaultContentHandler in the 10.7 instance in the Admin UI Settings->Extended, you can compare this with the 9.8 instance
  2. In the rest service that is being invoked , you can remove the input pipeline validation for contentStream and add a invoke step for pub.flow:tracePipeline , This will help you to test what is the exact input that is available in the pipeline.

-NP

Hi Nagendra Prasad,
Thank you for your reply.

  1. The value of watt.server.defaultContentHandler is not defined in 10.7 and was not defined in the 9.8.
  2. There is tracePipeLine results where is I didn’t find any body request object:
    2022-09-12 10:06:47 IDT [ISP.0090.0001C] (tid=843213) — START tracePipeline [9/12/22 10:06 AM] —
    2022-09-12 10:06:47 IDT [ISP.0090.0008C] (tid=843213) 0 node {com.wm.lang.xml.Document} = ‘DOCUMENT System ID: null Public ID: null’
    2022-09-12 10:06:47 IDT [ISP.0090.0008C] (tid=843213) 0 transport {com.wm.util.Values} =>
    2022-09-12 10:06:47 IDT [ISP.0090.0008C] (tid=843213) 1 protocol {java.lang.String} = ‘http’
    2022-09-12 10:06:47 IDT [ISP.0090.0008C] (tid=843213) 1 subprotocol {java.lang.String} = ‘HTTP’
    2022-09-12 10:06:47 IDT [ISP.0090.0008C] (tid=843213) 1 http {com.wm.util.Values} =>
    2022-09-12 10:06:47 IDT [ISP.0090.0008C] (tid=843213) 2 requestUrl {java.lang.String} = ‘/rest/FMCGHTTPSrv/Resources/Session’
    2022-09-12 10:06:47 IDT [ISP.0090.0008C] (tid=843213) 2 method {java.lang.String} = ‘POST’
    2022-09-12 10:06:47 IDT [ISP.0090.0008C] (tid=843213) 2 requestHdrs {com.wm.util.Values} =>
    2022-09-12 10:06:47 IDT [ISP.0090.0008C] (tid=843213) 3 Content-Type {java.lang.String} = ‘application/xml’
    2022-09-12 10:06:47 IDT [ISP.0090.0008C] (tid=843213) 3 Authorization {java.lang.String} = ‘Basic XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX’
    2022-09-12 10:06:47 IDT [ISP.0090.0008C] (tid=843213) 3 User-Agent {java.lang.String} = ‘PostmanRuntime/7.28.4’
    2022-09-12 10:06:47 IDT [ISP.0090.0008C] (tid=843213) 3 Accept {java.lang.String} = ‘/
    2022-09-12 10:06:47 IDT [ISP.0090.0008C] (tid=843213) 3 Cache-Control {java.lang.String} = ‘no-cache’
    2022-09-12 10:06:47 IDT [ISP.0090.0008C] (tid=843213) 3 Postman-Token {java.lang.String} = ‘1234a2d7-6775-4cb0-a5e5-96308ecc193f’
    2022-09-12 10:06:47 IDT [ISP.0090.0008C] (tid=843213) 3 Host {java.lang.String} = ‘172.16.3.250:7779’
    2022-09-12 10:06:47 IDT [ISP.0090.0008C] (tid=843213) 3 Accept-Encoding {java.lang.String} = ‘gzip, deflate’
    2022-09-12 10:06:47 IDT [ISP.0090.0008C] (tid=843213) 3 Connection {java.lang.String} = ‘keep-alive’
    2022-09-12 10:06:47 IDT [ISP.0090.0008C] (tid=843213) 3 Content-Length {java.lang.String} = ‘105361’
    2022-09-12 10:06:47 IDT [ISP.0090.0008C] (tid=843213) 2 ipInfo {com.wm.util.Values} =>
    2022-09-12 10:06:47 IDT [ISP.0090.0008C] (tid=843213) 3 localIp {java.lang.String} = ‘172.16.3.250’
    2022-09-12 10:06:47 IDT [ISP.0090.0008C] (tid=843213) 3 localPort {java.lang.String} = ‘7779’
    2022-09-12 10:06:47 IDT [ISP.0090.0008C] (tid=843213) 3 remoteIp {java.lang.String} = ‘10.131.1.66’
    2022-09-12 10:06:47 IDT [ISP.0090.0008C] (tid=843213) 3 remotePort {java.lang.String} = ‘59819’

Hi Boris,

For application/xml content-type, by default body is sent a document node in pipeline, which can then be converted to required type using IS services. This is the default behavior on 10.7.

Could you please check the value for watt property “watt.server.http.xmlFormat” and try setting the property to “stream” and check.

  • Sumit

Hi Sumit,
Thank you.
After changed property
watt.server.http.xmlFormat=stream
and restarted IS I’ve got the same problem.
But I think I found the solution.
I configured ‘Content-Type’ parameter as text/plain and that is resolve problem.

1 Like

Specifying an incorrect Content-Type is very likely to cause an issue in the future. IMO, that is not a solution, it is a temporary work-around. There may be callers that will not (and should not) change the Content-Type header to indicate a type that the payload is not.

There is a configuration mismatch of some sort between your 9.8 and 10.7 installations. The challenge is finding it. Compare all the settings in server.cnf. You might use the savePipeline service (not savePipelineToFile) instead of tracePipeline to capture exactly what is in the pipeline. Based upon the vars there it can be determined how the application/xml is being handled.

Just to make sure about this, as some people miss it – you need to show/hide keys to see the value that is set. Only the keys marked with show will appear in the IS Administrator page but they are there in the server.cnf file.

Hi reamon,
I agree with you that there is not a solution, and only is any temporary work-around.
I checked 2 server.cnf files from 9.8 and 10.7 installations.
And so far I have come to the conclusion that here we can get an answer only directly from the developers.
Judge for yourself what conclusions can be drawn on the basis of HTTP configurations:

9.8
watt.server.http.allowOptions=true

watt.server.http.authorizationEncoding=UTF-8

watt.server.http.header.useHttpOnly=true

watt.server.http.header.useSecure=true

watt.server.http.jsonFormat=parsed

watt.server.http.listRequestVars=asNeeded

watt.server.http.preserveUriReservedChars=true

watt.server.http.reauth.user-agent.list=Firefox;MSIE

watt.server.http.returnException=true

watt.server.http.securityRealm=Integration Server

watt.server.http.useAcceptHeader=true

watt.server.http.x-frame-options=SAMEORIGIN

watt.server.http.xmlFormat=node

watt.server.httplog=false
watt.server.new.http.session.context=false

10.7
http.Content-Security-Policy=none
watt.server.http.Strict-Transport-Security=none
watt.server.http.X-Content-Type-Options=none
watt.server.http.X-Permitted-Cross-Domain-Policies=
watt.server.http.X-XSS-Protection=none
watt.server.http.allowOptions=true
watt.server.http.authorizationEncoding=UTF-8
watt.server.http.forwardHeaders=true
watt.server.http.forwardableHeaders=x-request-id,x-b3-traceid,x-b3-spanid,x-b3-parentspanid,x-b3-sampled,x-b3-flags,x-ot-span-context
watt.server.http.header.sameSite=
watt.server.http.header.useHttpOnly=true
watt.server.http.header.useSecure=true
watt.server.http.interceptor.enabled=false
watt.server.http.interceptor.impl=
watt.server.http.interceptor.outbound.enabled=false
watt.server.http.interceptor.outbound.impl=
watt.server.http.interceptor.preprocess.sizeLimit=-1
watt.server.http.jsonFormat=parsed
watt.server.http.listRequestVars=asNeeded
watt.server.http.preserveUriReservedChars=true
watt.server.http.reauth.user-agent.list=Firefox;MSIE
watt.server.http.request.supportCompression=false
watt.server.http.response.supportCompression=false
watt.server.http.returnException=true
watt.server.http.securityRealm=Integration Server
watt.server.http.uriPath.decodePlus=true
watt.server.http.url.forbidCRLF=true
watt.server.http.useAcceptHeader=true
watt.server.http.x-frame-options=SAMEORIGIN
watt.server.http.xmlFormat=node
watt.server.httplog=false
new.http.session.context=false

Thanks and regards,

Boris

Hi reamon,
In additional there are 2 Pipeline traces for text/plain and application/xml:
2022-09-20 08:49:59 IDT [ISP.0090.0001C] (tid=1217) — START tracePipeline [9/20/22 8:49 AM] —
2022-09-20 08:49:59 IDT [ISP.0090.0008C] (tid=1217) 0 contentStream {com.wm.net.HttpInputStream} = ‘com.wm.net.HttpInputStream@2e5f3aa6’
2022-09-20 08:49:59 IDT [ISP.0090.0008C] (tid=1217) 0 transport {com.wm.util.Values} =>
2022-09-20 08:49:59 IDT [ISP.0090.0008C] (tid=1217) 1 protocol {java.lang.String} = ‘http’
2022-09-20 08:49:59 IDT [ISP.0090.0008C] (tid=1217) 1 subprotocol {java.lang.String} = ‘HTTP’
2022-09-20 08:49:59 IDT [ISP.0090.0008C] (tid=1217) 1 http {com.wm.util.Values} =>
2022-09-20 08:49:59 IDT [ISP.0090.0008C] (tid=1217) 2 requestUrl {java.lang.String} = ‘/rest/FMCGHTTPSrv/Resources/Session’
2022-09-20 08:49:59 IDT [ISP.0090.0008C] (tid=1217) 2 method {java.lang.String} = ‘POST’
2022-09-20 08:49:59 IDT [ISP.0090.0008C] (tid=1217) 2 requestHdrs {com.wm.util.Values} =>
2022-09-20 08:49:59 IDT [ISP.0090.0008C] (tid=1217) 3 Content-Type {java.lang.String} = ‘text/plain’
2022-09-20 08:49:59 IDT [ISP.0090.0008C] (tid=1217) 3 Authorization {java.lang.String} = ‘Basic V3NGbWNnTm92b2xvZzpHYWdvdCRhZHVtaW03Njc=’
2022-09-20 08:49:59 IDT [ISP.0090.0008C] (tid=1217) 3 User-Agent {java.lang.String} = ‘PostmanRuntime/7.28.4’
2022-09-20 08:49:59 IDT [ISP.0090.0008C] (tid=1217) 3 Accept {java.lang.String} = ‘/
2022-09-20 08:49:59 IDT [ISP.0090.0008C] (tid=1217) 3 Cache-Control {java.lang.String} = ‘no-cache’
2022-09-20 08:49:59 IDT [ISP.0090.0008C] (tid=1217) 3 Postman-Token {java.lang.String} = ‘76bee9cc-a51c-4990-9ece-186658801cce’
2022-09-20 08:49:59 IDT [ISP.0090.0008C] (tid=1217) 3 Host {java.lang.String} = ‘172.16.3.250:7779’
2022-09-20 08:49:59 IDT [ISP.0090.0008C] (tid=1217) 3 Accept-Encoding {java.lang.String} = ‘gzip, deflate’
2022-09-20 08:49:59 IDT [ISP.0090.0008C] (tid=1217) 3 Connection {java.lang.String} = ‘keep-alive’
2022-09-20 08:49:59 IDT [ISP.0090.0008C] (tid=1217) 3 Content-Length {java.lang.String} = ‘105361’
2022-09-20 08:49:59 IDT [ISP.0090.0008C] (tid=1217) 2 ipInfo {com.wm.util.Values} =>
2022-09-20 08:49:59 IDT [ISP.0090.0008C] (tid=1217) 3 localIp {java.lang.String} = ‘172.16.3.250’
2022-09-20 08:49:59 IDT [ISP.0090.0008C] (tid=1217) 3 localPort {java.lang.String} = ‘7779’
2022-09-20 08:49:59 IDT [ISP.0090.0008C] (tid=1217) 3 remoteIp {java.lang.String} = ‘10.131.1.66’
2022-09-20 08:49:59 IDT [ISP.0090.0008C] (tid=1217) 3 remotePort {java.lang.String} = ‘50051’
2022-09-20 08:49:59 IDT [ISP.0090.0002C] (tid=1217) — END tracePipeline —

2022-09-20 08:51:26 IDT [ISP.0090.0001C] (tid=1402) — START tracePipeline [9/20/22 8:51 AM] —
2022-09-20 08:51:26 IDT [ISP.0090.0008C] (tid=1402) 0 node {com.wm.lang.xml.Document} = ‘DOCUMENT System ID: null Public ID: null’
2022-09-20 08:51:26 IDT [ISP.0090.0008C] (tid=1402) 0 transport {com.wm.util.Values} =>
2022-09-20 08:51:26 IDT [ISP.0090.0008C] (tid=1402) 1 protocol {java.lang.String} = ‘http’
2022-09-20 08:51:26 IDT [ISP.0090.0008C] (tid=1402) 1 subprotocol {java.lang.String} = ‘HTTP’
2022-09-20 08:51:26 IDT [ISP.0090.0008C] (tid=1402) 1 http {com.wm.util.Values} =>
2022-09-20 08:51:26 IDT [ISP.0090.0008C] (tid=1402) 2 requestUrl {java.lang.String} = ‘/rest/FMCGHTTPSrv/Resources/Session’
2022-09-20 08:51:26 IDT [ISP.0090.0008C] (tid=1402) 2 method {java.lang.String} = ‘POST’
2022-09-20 08:51:26 IDT [ISP.0090.0008C] (tid=1402) 2 requestHdrs {com.wm.util.Values} =>
2022-09-20 08:51:26 IDT [ISP.0090.0008C] (tid=1402) 3 Content-Type {java.lang.String} = ‘application/xml’
2022-09-20 08:51:26 IDT [ISP.0090.0008C] (tid=1402) 3 Authorization {java.lang.String} = ‘Basic V3NGbWNnTm92b2xvZzpHYWdvdCRhZHVtaW03Njc=’
2022-09-20 08:51:26 IDT [ISP.0090.0008C] (tid=1402) 3 User-Agent {java.lang.String} = ‘PostmanRuntime/7.28.4’
2022-09-20 08:51:26 IDT [ISP.0090.0008C] (tid=1402) 3 Accept {java.lang.String} = ‘/
2022-09-20 08:51:26 IDT [ISP.0090.0008C] (tid=1402) 3 Cache-Control {java.lang.String} = ‘no-cache’
2022-09-20 08:51:26 IDT [ISP.0090.0008C] (tid=1402) 3 Postman-Token {java.lang.String} = ‘0acc2346-7e1e-4b21-b175-a277edc8af9b’
2022-09-20 08:51:26 IDT [ISP.0090.0008C] (tid=1402) 3 Host {java.lang.String} = ‘172.16.3.250:7779’
2022-09-20 08:51:26 IDT [ISP.0090.0008C] (tid=1402) 3 Accept-Encoding {java.lang.String} = ‘gzip, deflate’
2022-09-20 08:51:26 IDT [ISP.0090.0008C] (tid=1402) 3 Connection {java.lang.String} = ‘keep-alive’
2022-09-20 08:51:26 IDT [ISP.0090.0008C] (tid=1402) 3 Content-Length {java.lang.String} = ‘105361’
2022-09-20 08:51:26 IDT [ISP.0090.0008C] (tid=1402) 2 ipInfo {com.wm.util.Values} =>
2022-09-20 08:51:26 IDT [ISP.0090.0008C] (tid=1402) 3 localIp {java.lang.String} = ‘172.16.3.250’
2022-09-20 08:51:26 IDT [ISP.0090.0008C] (tid=1402) 3 localPort {java.lang.String} = ‘7779’
2022-09-20 08:51:26 IDT [ISP.0090.0008C] (tid=1402) 3 remoteIp {java.lang.String} = ‘10.131.1.66’
2022-09-20 08:51:26 IDT [ISP.0090.0008C] (tid=1402) 3 remotePort {java.lang.String} = ‘50066’
2022-09-20 08:51:26 IDT [ISP.0090.0002C] (tid=1402) — END tracePipeline —

I see this is the setting in 9.8 and 10.7. This implies that in 9.8 the individual services had the “Default xmlFormat” set to stream which would kick in when the Content-Type is application/xml. I am not aware of anything else that controls the pipeline getting contentStream vs node. If that’s not the case, likely time to open a ticket with support if you have not done so already.

Regarding watt.server.defaultContentHandler I don’t think this applies. The docs indicate that is related to text/html handling, not XML.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.