Graphman updateServicesRevision fails for SOAP services in API Gateway 11.1.x while working for WEB_API.
search cancel

Graphman updateServicesRevision fails for SOAP services in API Gateway 11.1.x while working for WEB_API.

book

Article ID: 427669

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

When calling graphman 

mutation addServiceComment ($services: [L7ServicePartialInput!]!, $comment: String!) { updateServicesRevision (input: $services, activate: false, comment: $comment) { detailedStatus { action status description } } }

with:

{ "services": [ { "resolutionPath": "/some-soap", "serviceType": "SOAP" } ], "comment": "some-comment" }

Graphman returns:

java.lang.NullPointerException: Cannot invoke "String.getBytes(Charset)" because "<parameter1>" is null

The same mutation works correctly when serviceType = WEB_API.

Resolution

For soap service the resolution path alone is not enough to identify the service . 

In gateway 11.2 there is a error that the resolvers are missing and after adding them it works for both versions 

{ "services": [ {
               "resolutionPath": "/some-soap",
               "serviceType": "SOAP" ,  
               "resolvers": {
                    "soapActions": [
                    "http://<apihost>/ws/listProducts",
                    "http://<apihost>/ws/getProductDetails",
                    "http://<apihost>/ws/placeOrder",
                    "http://<apihost>/ws/currentOrders"
                    ],
                    "baseUri": "http://<apihost>/ws",
                    "resolutionPath": "/some-soap"
                    }
                } ],
     "comment": "NewComment " }