by admin on August 23, 2010
We just released an Upgrade to our OpenAgent – a SIF Agent Development Kit written in Ruby.
So lets show you what we can easily do.
Create a text file named agent.yaml – and paste the information below. Make sure toupdate the sourceid and sif_name to your Agents info.
sourceid : Your Agent ID Here
sif_name : Your Agent Name Here
sif_version : 2.0r1
sif_maxbuffersize : 64000
sif_mode : Pull
msg_version : 2.0r1
msg_xmlns : http://www.sifinfo.org/infrastructure/2.x
sif_provideobjects:
sif_subscribeobjects:
- LEAInfo
- SchoolInfo
- StudentPersonal
sif_publishaddobjects:
sif_publishchangeobjects:
sif_publishdeleteobjects:
sif_requestobjects:
- LEAInfo
- SchoolInfo
- StudentPersonal
sif_respondobjects:
Now create a text file named zone.yaml and paste the info below. Make sure you add your ZONE URL.
uri : Your ZONE URL Here
use_ssl : false
verify_ssl : false
verify_mode : OpenSSL::SSL::VERIFY_NONE
puts_msg_before_post : true
So lets code up a School Interoperability Framework Agent which will Register and then Subscribe.
Please note that we are not reviewing the SIF_Ack messages that are being set from the ZIS Server
for these messages.
Create a text file names bot.rb
1. require 'rubygems'
2. require 'openagent'
3.
4. agent = OpenAgent::Agent.new('agent.yaml')
5. zone = OpenAgent::Zone.new('zone.yaml')
6. sif = OpenAgent::SIF.new
7.
8. act = OpenAgent::Activity.new( agent, zone, sif)
9.
10. xml, i = act.create_xml('SIF_Register')
11. response = zone.send_message(xml)
12. puts response.body
13. puts
14. xml, i = act.create_xml('SIF_Provision')
15. response = zone.send_message(xml)
16. puts response.body
17. puts
Now you can create a simple SIF bot which can send and receive SIF Messages. Now why don’t you try and send a SIF_GetMessage or a SIF_Ping.
Have Fun.
by admin on July 27, 2010
While working with a client we found that the TestAccommodation object does not validate within the SIF_Provision message. Check this out for yourself by pointing your browser to http://compliance.sifinfo.org/validate/ and paste this in.
<?xml version="1.0" encoding="UTF-8"?>
<SIF_Message Version="2.3" xmlns="http://www.sifinfo.org/infrastructure/2.x">
<SIF_Provision>
<SIF_Header>
<SIF_MsgId>BD5070007BDF012D83B2001FF3502BAD</SIF_MsgId>
<SIF_Timestamp>2010-07-27T15:04:43</SIF_Timestamp>
<SIF_SourceId>Zone1Provider</SIF_SourceId>
</SIF_Header>
<SIF_ProvideObjects>
<SIF_Object ObjectName="TestAccommodation"/>
</SIF_ProvideObjects>
<SIF_SubscribeObjects/>
<SIF_PublishAddObjects>
<SIF_Object ObjectName="TestAccommodation"/>
</SIF_PublishAddObjects>
<SIF_PublishChangeObjects>
<SIF_Object ObjectName="TestAccommodation"/>
</SIF_PublishChangeObjects>
<SIF_PublishDeleteObjects>
<SIF_Object ObjectName="TestAccommodation"/>
</SIF_PublishDeleteObjects>
<SIF_RequestObjects/>
<SIF_RespondObjects>
<SIF_Object ObjectName="TestAccommodation"/>
</SIF_RespondObjects>
</SIF_Provision>
</SIF_Message>
As of July 27th 2010 this won’t validate. Now try this XML SIF Message:
<?xml version="1.0" encoding="UTF-8"?>
<SIF_Message Version="2.3" xmlns="http://www.sifinfo.org/infrastructure/2.x">
<SIF_Provision>
<SIF_Header>
<SIF_MsgId>23D54AA07BE1012D83B3001FF3502BAD</SIF_MsgId>
<SIF_Timestamp>2010-07-27T15:14:45</SIF_Timestamp>
<SIF_SourceId>Zone1Provider</SIF_SourceId>
</SIF_Header>
<SIF_ProvideObjects>
<SIF_Object ObjectName="TestAccommodation"/>
</SIF_ProvideObjects>
<SIF_SubscribeObjects/>
<SIF_PublishAddObjects/>
<SIF_PublishChangeObjects/>
<SIF_PublishDeleteObjects/>
<SIF_RequestObjects/>
<SIF_RespondObjects/>
</SIF_Provision>
</SIF_Message>
It validates successfully!
This is interesting – We are reporting this to the SIF association immediately. This error is within SIF 2.1, 2.2, 2.3 and 2.4 as far as we can tell. If you are able to provide it you should be able to Publish! With so many objects its hard to imagine that we don’t find more of these… but the SIF Association does a great job.
To fix this you will need to update your XSD SIF_SubscribeObjectNamesType. We have updated the XSD for OpenZIS.