A customer is attempting to call a DB2 service (that lives in DB2) from an API created in z/OS Connect. He took the steps use zconbt tool to create the .sar file and two .json files. He has deployed his API and he provided me the info to define in the server.xml. We've defined the API name and location, the service name and service ref, and the id, host, port, and httpmethod, and URI.
Why would he be getting a 500? It doesn't seem like he's reaching the service. Please advise.
Answer by Alan Hollingshead (71) | Aug 06, 2018 at 12:03 PM
Hello @A.Calixto
Please can you check the messages.log file for the z/OS Connect EE server, and also any DB2 log file for messages relating to the 500 error?
The IBM White paper z/OS Connect EE V3 Getting Started Guide (from page 121) shows a working example of using z/OS Connect EE V3 with DB2 which you might find useful.
Kind regards, Alan Hollingshead
IBM z/OS Connect EE Test & Performance
Answer by A.Calixto (1) | Aug 08, 2018 at 11:31 AM
I have looked at your link and coded the auth and username/password parms.
I am now getting the following:
BAQR0429W: API getname encountered an error while processing a request under URL http://*host*/getname/deptno/AAA.
in z/OS Connect EE I see the service is coming up as unknown. Does the service need to be deployed to z/OS Connect? The documentation does not specify this and I was under the impression it would need to be since this is a DB2 service in DB2. I coded the connection parms in order for z/OS Connect to know where to find the service (host, port, etc). I used the zconbt tool to create the .json files used for the API.
Please advise ...
Answer by Alan Hollingshead (71) | Aug 14, 2018 at 04:13 AM
Hello @A.Calixto
The services and APIs need to be deployed to your z/OS Connect EE server. There is a screenshot on page 148 of the whitepaper discussed in my previous post which shows how to deploy an API. Do the same for your service.
In your server.xml make sure you have configured:
<zosconnect_services>
</zosconnect_services>
to ensure that z/OS Connect EE server will load your deployed services from the default location. An equivalent setting for APIs is not required. Your server will automatically load APIs from the default location.
Check your messages.log file during initialization of your server to ensure your services and APIs have been installed successfully.
Kind regards, Alan Hollingshead
IBM z/OS Connect EE
What are examples of a serviceref 1 Answer
Configuring invokeGroup in z/OS Connect 11 Answers
Where can I find API documentation for Db2 on Cloud, such as the Disaster Recovery API? (HADR) 1 Answer
zOS Connect API displaying empty page and SRVE8025E java.lang.ArrayIndexOutOfBoundsException 1 Answer
BAQR7040E: Resource not found and HTTP 404 when using z/OS Connect EE 2.0.3.0 1 Answer