My agent is sucessfully connected to a customer's ZIS and is receiving events. It's also sending SIF_Requests but is NOT receiving response messages. I HAVE gotten responses from other ZIS's, and this customers has other agents connected to it which ARE also getting repsonses, so there is clearly something out of sync between my agent and this ZIS. Could it be a version issue? Apparently the Request message that gets into the customer's provider queue contains 2 SIF_Version tags:
<<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<- <SIF_Message xmlns="http://www.sifinfo.org/infrastructure/2.x" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Version="2.2">
<- <SIF_Request>
<- <SIF_Header>
M <SIF_MsgId>BF1D657ED7574C199C9417E8DF9522A7</SIF_MsgId>
< <SIF_Timestamp>2010-03-08T14:38:02-05:00</SIF_Timestamp>
<- <SIF_Security>
<- <SIF_SecureChannel>
< <SIF_AuthenticationLevel>0</SIF_AuthenticationLevel>
< <SIF_EncryptionLevel>0</SIF_EncryptionLevel>
</SIF_SecureChannel>
</SIF_Security>
< <SIF_SourceId>LexiaReadingAgent</SIF_SourceId>
<- <SIF_Contexts>
< <SIF_Context>SIF_Default</SIF_Context>
</SIF_Contexts>
< </SIF_Header>
<<<SIF_Version>2.*</SIF_Version>
< <SIF_Version>2.2</SIF_Version>
<<SIF_MaxBufferSize>32000</SIF_MaxBufferSize>
- <SIF_Query>
<SIF_QueryObject ObjectName="StudentSchoolEnrollment" />
</SIF_Query>
</SIF_Request>
</SIF_Message>
So why does it have 2 SIF_Version tags and what should the version be? The only place I specify a version number is in the agent tag in agent.cfg:
<agent id="LexiaReadingAgent" sifVersion="2.2">I'm not even sure if it's set to the right value here. Should it be 2.* to be compatible with more ZIS's? But regardless, how did 2 SIF_Version tags end up in my message? And is that definately the reason why I'm not getting Reponses to my requests, or is something else going on?
Thanks for you help...I'm stumped!
M Miriam
It sounds like the provider agent is setting the SIF_Response version to 2.*.
To work around this you can set the version in 2 ways.
Set the version in code as follows:
Query query = new Query(StudentDTD.SCHOOLINFO); query.setSIFVersions(SIFVersion.SIF22); zone.query(query);
or in agent config:
<policy>
<requestPolicy> <object name="StudentPersonal"> <version>2.2</version> </object> </requestPolicy> </policy>
Hope this helps,
Jon
Hi Miriam,
I've been looking at your SIF_Request and to answer your question, a SIF_Request can contain a list of supported SIF_Version tags (see http://specification.sifinfo.org/Implementation/2.2/Infrastructure.html#SIF_Request for more details). The SIF_Version tag that uses 2.* indicates that even though your registered version of SIF is 2.2, you accept responses in 2.0r1, and 2.1 as well. This is to your advantage as the provider agent(s) connected to the may be publishing responses in an older version of SIF.
However, you may still have a problem if the provider agents that you're communicating with are responding in SIF 1.0, 1.1, or 1.5r1 since it looks like those versions aren't included in the SIF_Request version list. Do you know what provider agent/agents you're trying to get data from and what SIF_Versions they support?
Best Regards,
Jared
Hi Jared,
Thanks for looking at this. I will find out what version the provider agent is communicating with. However, I am successfully getting event messages (presumably from the same provider agent), so it seems odd that I wouldn't also get responses.
What is controlling what SIF_Version tags get set in my Request message? It's not clear to me why both the 2.x and 2.2 tags show up. When I run my agent locally with a local Provider agent and local ZIS, I do not see two SIF_Version tags -- so is that partly controlled by the ZIS? I'm a little confused about how this is all being controlled.
Thanks,
Miriam
I've been told that the Provider agent supports 2.2
Just wanted to let you know you're still on my radar. I've been trying to get in touch with a coworker of mine that might be able to answer your question about why the ADK puts both the 2.* and 2.2 version tags in the SIF_Request object. He's out sick today so I'll see if I can get in touch with him tomorrow to discuss your issue.
-Jared
The Request shouldn't have 2 versions. This is a bug.
When requesting StudentSchoolEnrollment, the ADK uses either 2.0r1 or the actual version that the object first appears in the spec for the message version. For the AU that would be 2.3. For the US that would be 2.0r1. The request version should be 2.*.
Which version of the adk are you using? Is there anything in the agent log? Are you able to send any other requests successfully?
Hi again,
Just to be clear - The message version will always be 2.0r1 unless the requested object appeared in the spec after 2.0r1.
Thanks so much to both of you for following up. Now I only have one SIF_Version tag in my SIF_Request message (see below). The multiple tags were probably due to the fact that I had this in my agent.cfg (because this was required to get the SIF Test Harness to work):
<property name="adk.provisioning.overrideSifVersions" value="2.0r1,2.1,2.*" />
Still, according to the spec you can have multiple SIF_Version tags so I'm not sure that was really a problem. And I'm still not getting responses nor seeing any error messages. Am using latest version of Edustructures Java ADK. Customer sees my request and doesn't see errors on his end. Seems like a silent error is occuring...but why??
<SIF_Message xmlns="http://www.sifinfo.org/infrastructure/2.x" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Version="2.0r1">
<SIF_Request>
<SIF_Header>
<SIF_MsgId>8B116408DB154AB98E6840E1A23E540E</SIF_MsgId>
<SIF_Timestamp>2010-03-10T14:58:18-05:00</SIF_Timestamp>
<SIF_Security>
<SIF_SecureChannel>
<SIF_AuthenticationLevel>0</SIF_AuthenticationLevel>
<SIF_EncryptionLevel>0</SIF_EncryptionLevel>
<SIF_SourceId>LexiaReadingAgent</SIF_SourceId>
<SIF_Contexts>
<SIF_Context>SIF_Default</SIF_Context>
</SIF_Header>
<SIF_Version>2.*</SIF_Version>
<SIF_MaxBufferSize>32000</SIF_MaxBufferSize>
<SIF_Query>
<SIF_QueryObject ObjectName="StudentSchoolEnrollment"/>
Do you have access to the ZIS? Looking at the log may help. Another possibility is to have your agent issue the request and then shutdown. That way you can look at the response message in the ZIS queue before it is delivered to your agent.
What log level is your agent using? Try using
ADK.getLog().setLevel(ADK.getLog().getLevel().INFO);
if you are not already doing so.
Jonathan
I have ADK.debug = ADK.DBG_ALL so I believe I'm getting as much detail as possible in my logs. I don't have direct access to ZIS but have asked customer to look in that log. So far he hasn't seen any errors, but on Monday we're going to debug live together and see if he can get more detail. Good idea to issue request then shutdown; I'll try that.
I'm still stumped by this. Have debugged with the customer and he sees the following error in his ZIS log:
(* 3/15/10 2:53:27 PM EDT *) <b>SIF_Response</b> acknowledged (not successful)Internal Server Error. An internal server error occurred while dispatching the message: java.lang.IllegalArgumentException: 2.* is an invalid version string
So that appears to indicate that the
tag in the SIF_Request object is causing some trouble. I'm still not sure why I have this tag and what's controlling it. I now have
ADK.initialize(SIFVersion.SIF22, SIFDTD.SDO_STUDENT);
in my code, rather than ADK.initialize(SIFVersion.LATEST, SIFDTD.SDO_STUDENT); as I originally had.
Also I have
<agent id="LexiaReadingAgent" sifVersion="2.2">
in the agent.cfg.
So where is it getting version 2.x from and why is it causing a problem anyway??
It almost sounds like the Version of the SIF_Response is bad. Can you catch the SIF_Response at the ZIS before your agent gets it?
When I grab the messages at the ZIS I see something like:
******************* Request ************************<SIF_Message Version="2.0r1"><SIF_Request><SIF_Header><SIF_MsgId>0638035B2A3C4F20899D634BCA27EC72</SIF_MsgId><SIF_Timestamp>2010-03-11T08:56:53-06:00</SIF_Timestamp><SIF_Security><SIF_SecureChannel><SIF_AuthenticationLevel>0</SIF_AuthenticationLevel><SIF_EncryptionLevel>0</SIF_EncryptionLevel></SIF_SecureChannel></SIF_Security><SIF_SourceId>SchoolInfo_Subscriber</SIF_SourceId><SIF_Contexts><SIF_Context>SIF_Default</SIF_Context></SIF_Contexts></SIF_Header><SIF_Version>2.*</SIF_Version><SIF_MaxBufferSize>32000</SIF_MaxBufferSize><SIF_Query><SIF_QueryObject ObjectName="SchoolInfo"/></SIF_Query></SIF_Request></SIF_Message>************** Response ********************************<SIF_Message Version="2.3"><SIF_Response><SIF_Header><SIF_MsgId>B1483E7F531947449F820B17E9A8FF1A</SIF_MsgId><SIF_Timestamp>2010-03-15T17:34:38-06:00</SIF_Timestamp><SIF_Security><SIF_SecureChannel><SIF_AuthenticationLevel>0</SIF_AuthenticationLevel><SIF_EncryptionLevel>0</SIF_EncryptionLevel></SIF_SecureChannel></SIF_Security><SIF_SourceId>SchoolInfo_Publisher</SIF_SourceId><SIF_DestinationId>SchoolInfo_Subscriber</SIF_DestinationId></SIF_Header><SIF_RequestMsgId>0638035B2A3C4F20899D634BCA27EC72</SIF_RequestMsgId><SIF_PacketNumber>1</SIF_PacketNumber><SIF_MorePackets>No</SIF_MorePackets><SIF_ObjectData><SchoolInfo><LocalId>MID SCH 1 !!!!</LocalId><StateProvinceId>WI</StateProvinceId><SchoolName>sif middle school</SchoolName><PhoneNumberList><PhoneNumber Type="0096"><Number>123-4567</Number><Extension>123</Extension><ListedStatus>Listed</ListedStatus></PhoneNumber><PhoneNumber Type="0096"><Number>765-4321</Number><Extension>456</Extension><ListedStatus>Unlisted</ListedStatus></PhoneNumber></PhoneNumberList><GradeLevels><GradeLevel><Code>01</Code></GradeLevel></GradeLevels></SchoolInfo></SIF_ObjectData></SIF_Response></SIF_Message>
The ADK has no problem with this SIF_Response.
Did a test with the customer where he entered a SIF_Request as raw XML which looked just like the SIF_Request coming from my agent except it had
<SIF_Version>2.2</SIF_Version>
instead of
And it worked -- i.e. it resulted in SIF_Responses sent to my agent. So clearly the ZIS or the provider agent is just not happy when the version = 2.*
So:
- Customer is using Edustructures ZIS, which I would think would be ok with 2.*. So is the problem the provider agent? And if it's not ok with 2.*, is that a bug in the agent (because as you say above, you have successfully sent a request with version 2.*, and I have also to another ZIS)? Note that customer has 10+ other agents happily working...
- How is the SIF_Version being set anyway? Is that simply controlled by the ADK, or am I able to change it?
Jon,
Your suggestion to do
query.setSIFVersions(SIFVersion.SIF22);
did the trick! Unfortunately this causes problems when connecting to other zones, as I suspected it might! But it sounds like this is probably a bug/limitation in the provider agent and there's not much I can do about it, as it should be accepting version 2.*.
Looks I'll have to set the SIF version on a per-customer basis, making it one of the configurable fields for each zone I connect to in order to make everyone happy.
Thanks so much Jared and Jon for all of your help on this!