SAP PI : Web Service Client to Start/Stop Communication Channel
In the previous blog SAP PI : Start/Stop Communication Channel using Webservice we looked at the web service to Start/Stop SAP PI communication channel(s). In the blog, I will show how to create a Java Web Service client, which will consume the IChannelAdmin Service to stop a communication channel. This Resubale Java code is part of Netweaver Google Code Project.
Many of us would have encountered a common query to schedule the PI Jobs i.e. the communication channel(s) in a Job Scheduler tools like Tivoli, Enterprise Scheduler and so on. However we would have ended up using the Availability Time Planning. So I thought to suggest a workaround to control the communication channel(s) by using a Java code schedule in the Job Scheduler tool. This Java code is the web service client program which will consume the IChannelAdmin Service.
Though there is an option to generate the Java Proxy for the Web Service consumption from NWDS, I will show how to generate it using SOAP UI and then use the generated class in NWDS or Eclipse.
Step 1: Open SoapUI. Navigate to Tools -> JAX-WS Artifacts.
Step 2: Provide the WSDL URL, Target Directory for generating Java Classes, Package name and hit Generate.
(Note: Make sure that the JAX-WS WSImport is pointing to the Java in directory)
Step 3: Archive the generated folder(s) as .zip file.
Step 4: Create a new Java Project in Eclipse / NWDS and Import the Archive into it.