on 08-14-2015 6:18 PM
Hi,
I'm exploring the option to manage PI channels through Java.
I have downloaded the ChannelAdmin.xsd and ran xjc and created the java classes.
"%java_home%\bin\xjc" -p test f:\ChannelAdmin.xsd
ActivationStateType.java
ChannelStateType.java
ChannelsType.java
ChannelType.java
ErrorInformationType.java
ObjectFactory.java
Then using http request I was able get a valid xml response with the channels status.
I tried several ways to unmarshal the response and go through the channels with no success.
For example:
JAXBContext jaxbContext = JAXBContext.newInstance(ChannelsType.class);
Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
StringReader reader = new StringReader(response);
ChannelsType channelsType = (ChannelsType) unmarshaller.unmarshal(reader);
for (ChannelType channel : channelsType.getChannels().getChannel())
System.out.println(channel.getChannelName());
Can someone point me to a working example for managing channels using Java, or explain how to do it?
Thanks!
Nivo,
How to consume web services hosted by SAP PI / PO
This blog uses ChannelAdmin web service.
If you want to generate stub classes please check Using PI 7.3’s Directory API and
http://www.eclipse.org/webtools/community/education/web/t320/Generating_a_client_from_WSDL.pdf
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.