Hi,
I had previously built a SOAP driver to retrieve data on heartbeats on the publisher channel (ITP), but I would like to have it make the request from the subscriber channel, to allow me to use triggers to control when to get data and what to get.
I have kept all the policies (other than ITP) on the publisher channel, because the correct thing to do is still have the incoming data go through the publisher channel, right? Unfortunately, for me, it is not quite so simple to get the events through the publisher channel.
Please let me know if I am going about this all wrong and if there is another way to achieve what I am trying to do. My mind is tainted by how it was done previously:)
My attempt starts with a static SOAP request in the OTP like this that matches triggers:
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet exclude-result-prefixes="query cmd dncv" version="1.0" xmlns:cmd="http://www.novell.com/nxsl/java/com.novell.nds.dirxml.driver.XdsCommandProcessor" xmlns:dncv="http://www.novell.com/nxsl/java/com.novell.nds.dirxml.driver.DNConverter" xmlns:es="http://www.novell.com/nxsl/ecmascript" xmlns:js="http://www.novell.com/nxsl/ecmascript" xmlns:query="http://www.novell.com/nxsl/java/com.novell.nds.dirxml.driver.XdsQueryProcessor" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:cal="http://www.novell.com/nxsl/java/java.util.GregorianCalendar"> <xsl:param name="srcQueryProcessor"/> <xsl:param name="destQueryProcessor"/> <xsl:param name="srcCommandProcessor"/> <xsl:param name="destCommandProcessor"/> <xsl:param name="dnConverter"/> <xsl:param name="fromNds"/> <xsl:variable name="i" select="0"/> <xsl:template match="node()|@*"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> <xsl:template match="trigger" xmlns:java="java:dk.unic.infotjeneste.webservice.returTyper" xmlns:m="https://infotjeneste.uni-c.dk" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:oio:sd:snitflader:2011.12.01" xmlns:ns="http://rep.oio.dk/cpr.dk/xml/schemas/core/2005/03/18/" xmlns:ns1="http://rep.oio.dk/sd.dk/xml.schema/20080201/" xmlns:ns2="http://rep.oio.dk/sd.dk/xml.schema/20070301/" xmlns:ns3="http://rep.oio.dk/sd.dk/xml.schema/20070401/"> <soapenv:Header/> <soapenv:Body> <urn:GetEmployment> <urn:InstitutionIdentifier>AA</urn:InstitutionIdentifier> <urn:EmploymentIdentifier>123456</urn:EmploymentIdentifier> <urn:ActivationDate>2024-06-07</urn:ActivationDate> <urn:DeactivationDate>2024-07-07</urn:DeactivationDate> <ns2:ActivationTime>00:00:00</ns2:ActivationTime> <ns2:DeactivationTime>23:59:59</ns2:DeactivationTime> <ns3:DepartmentIndicator>true</ns3:DepartmentIndicator> <ns3:EmploymentStatusIndicator>true</ns3:EmploymentStatusIndicator> <ns3:ProfessionIndicator>true</ns3:ProfessionIndicator> <ns3:SalaryAgreementIndicator>true</ns3:SalaryAgreementIndicator> <ns3:SalaryCodeGroupIndicator>true</ns3:SalaryCodeGroupIndicator> <ns3:WorkingTimeIndicator>true</ns3:WorkingTimeIndicator> <urn:UUIDIndicator>true</urn:UUIDIndicator> </urn:GetEmployment> </soapenv:Body> </soapenv:Envelope> <operation-data url="~drv.data.sd.GetEmploymentChanged-URL~" instID="AA" regID="9K"/> </xsl:template> </xsl:stylesheet>
What I would expect to happen is that this request is sent via the subscriber channel to the application and I receive a response, which goes through into the ITP. In the ITP I would be able to transform the response to an ADD event, which should go through to the publisher channel policies. That, however, is not the case - it never reaches the publisher channel.
The response I receive looks similar to this:
<nds dtdversion="2.0"> <source> <product build="20190731_0848" instance="SOAP-SDEmpChangedAtDate01" version="4.1.0.0">Identity Manager Driver for SOAP</product> <contact>NetIQ Corporation</contact> </source> <output> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/200 1/XMLSchema-instance"> <soapenv:Body> <sd:GetEmploymentChangedAtDate20111201 creationDateTime="2024-07-19T10:44:49" xmlns:cpr20050318="http://rep.oio.dk/cpr.dk/xml/schemas/core/2005/03/18 /" xmlns:sd="urn:oio:sd:snitflader:2011.12.01" xmlns:sd20070301="http://rep.oio.dk/sd.dk/xml.schema/20070301/" xmlns:sd20070401="http://rep.oio.dk/sd.dk/xml. schema/20070401/" xmlns:sd20080201="http://rep.oio.dk/sd.dk/xml.schema/20080201/" xsi:schemaLocation="urn:oio:sd:snitflader:2011.12.01 https://service.sd.dk/ sdws/xml/schema/sd.dk/xml.schema/20111201/GetEmploymentChangedAtDate/SD_GetEmploymentChangedAtDateInterface_20111201.xsd"> <sd:RequestStructure> <sd:InstitutionIdentifier>AA</sd:InstitutionIdentifier> <sd:EmploymentIdentifier>123456</sd:EmploymentIdentifier> <sd20070301:ActivationDate>2024-06-07</sd20070301:ActivationDate> <sd20070301:ActivationTime>00:00:00</sd20070301:ActivationTime> <sd20070301:DeactivationDate>2024-07-07</sd20070301:DeactivationDate> <sd20070301:DeactivationTime>23:59:59</sd20070301:DeactivationTime> <sd20070401:DepartmentIndicator>true</sd20070401:DepartmentIndicator> <sd20070401:EmploymentStatusIndicator>true</sd20070401:EmploymentStatusIndicator> <sd20070401:ProfessionIndicator>true</sd20070401:ProfessionIndicator> <sd20070401:SalaryAgreementIndicator>true</sd20070401:SalaryAgreementIndicator> <sd20070401:SalaryCodeGroupIndicator>true</sd20070401:SalaryCodeGroupIndicator> <sd20070401:WorkingTimeIndicator>true</sd20070401:WorkingTimeIndicator> <sd:UUIDIndicator>true</sd:UUIDIndicator> <sd20070401:FutureInformationIndicator>false</sd20070401:FutureInformationIndicator> </sd:RequestStructure> <sd:Person> <cpr20050318:PersonCivilRegistrationIdentifier>1234567890</cpr20050318:PersonCivilRegistrationIdentifier> <sd:Employment> <sd:EmploymentIdentifier>123456</sd:EmploymentIdentifier> <sd:Profession changedAtDate="2024-06-18"> <sd20070301:ActivationDate>2024-01-01</sd20070301:ActivationDate> <sd20070301:DeactivationDate>9999-12-31</sd20070301:DeactivationDate> <sd:JobPositionIdentifier>1010</sd:JobPositionIdentifier> <sd:EmploymentName>Biolog</sd:EmploymentName> <sd20070401:AppointmentCode>0</sd20070401:AppointmentCode> </sd:Profession> </sd:Employment> </sd:Person> </sd:GetEmploymentChangedAtDate20111201> </soapenv:Body> </soapenv:Envelope> </output> <operation-data instID="AA" regID="9K" url="https://service.sd.dk/sdws/services/GetEmploymentChangedAtDate20111201" xmlns:cal="http://www.novell.com/nxsl/j ava/java.util.GregorianCalendar" xmlns:java="java:dk.unic.infotjeneste.webservice.returTyper" xmlns:js="http://www.novell.com/nxsl/ecmascript" xmlns:m="https ://infotjeneste.uni-c.dk" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/> </nds>
I transform the response into an ADD event in the exact same form as I did, when the SOAP request was made from the ITP itself. The transformed event looks like this:
<nds dtdversion="2.0"> <source> <product build="20190731_0848" instance="SOAP-SDEmpChangedAtDate01" version="4.1.0.0">Identity Manager Driver for SOAP</product> <contact>NetIQ Corporation</contact> </source> <output> <add class-name="Group" xmlns:cal="http://www.novell.com/nxsl/java/java.util.GregorianCalendar" xmlns:js="http://www.novell.com/nxsl/ecmascript" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:uuid="http://www.novell.com/nxsl/java/java.util.UUID" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <association>AA123456</association> <add-attr attr-name="CN"> <value>04DBF9A557AF49018219E936B86ACD36</value> </add-attr> <add-attr attr-name="XATTRIBWageID"> <value>123456</value> </add-attr> <add-attr attr-name="XATTRIB-CPR"> <value>1234567890</value> </add-attr> <add-attr attr-name="XATTRIBWageInstitutionID"> <value>AA</value> </add-attr> <add-attr attr-name="XATTRIBWageRegionID"> <value>9K</value> </add-attr> <add-attr attr-name="XATTRIBWagePendingChangeDate"> <value>2024-01-01</value> </add-attr> </add> </output> <operation-data instID="AA" regID="9K" url="https://service.sd.dk/sdws/services/GetEmploymentChangedAtDate20111201" xmlns:cal="http://www.novell.com/nxsl/java/java.util.GregorianCalendar" xmlns:java="java:dk.unic.infotjeneste.webservice.returTyper" xmlns:js="http://www.novell.com/nxsl/ecmascript" xmlns:m="https://infotjeneste.uni-c.dk" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/> </nds>
What I note here is that opposed to when the SOAP request was made from the ITP, the event becomes wrapped in a <output> tag rather than an <input> tag.
When this document exits the ITP, the trace shows:
[07/19/24 11:16:43.288]:SOAP-SDEmpChangedAtDate ST: <nds dtdversion="2.0"> <source> <product build="20190731_0848" instance="SOAP-SDEmpChangedAtDate01" version="4.1.0.0">Identity Manager Driver for SOAP</product> <contact>NetIQ Corporation</contact> </source> <output> <add class-name="Group" xmlns:cal="http://www.novell.com/nxsl/java/java.util.GregorianCalendar" xmlns:js="http://www.novell.com/nxsl/ecmascript" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:uuid="http://www.novell.com/nxsl/java/java.util.UUID" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <association>AA123456</association> <add-attr attr-name="CN"> <value>35BB35178405446DA8AA0B02BD3B492B</value> </add-attr> <add-attr attr-name="XATTRIBWageID"> <value>123456</value> </add-attr> <add-attr attr-name="XATTRIB-CPR"> <value>1234567890</value> </add-attr> <add-attr attr-name="XATTRIBWageInstitutionID"> <value>AA</value> </add-attr> <add-attr attr-name="XATTRIBWageRegionID"> <value>9K</value> </add-attr> <add-attr attr-name="XATTRIBWagePendingChangeDate"> <value>2024-01-01</value> </add-attr> </add> </output> <operation-data instID="AA" regID="9K" url="https://service.sd.dk/sdws/services/GetEmploymentChangedAtDate20111201" xmlns:cal="http://www.novell.com/nxsl/java/java.util.GregorianCalendar" xmlns:java="java:dk.unic.infotjeneste.webservice.returTyper" xmlns:js="http://www.novell.com/nxsl/ecmascript" xmlns:m="https://infotjeneste.uni-c.dk" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/> </nds> [07/19/24 11:16:43.289]:SOAP-SDEmpChangedAtDate ST:No schema mapping policies. [07/19/24 11:16:43.289]:SOAP-SDEmpChangedAtDate ST:Resolving association references. [07/19/24 11:16:43.289]:SOAP-SDEmpChangedAtDate ST:Processing returned document. [07/19/24 11:16:43.289]:SOAP-SDEmpChangedAtDate ST:Processing operation <add> for . [07/19/24 11:16:43.289]:SOAP-SDEmpChangedAtDate ST:End transaction.
Specifially the line "Processing operation <add> for ." is confusing to me. I have found that when I set a dest-dn on the event it would be included in this line i.e. "Processing operation <add> for data\dataitems\35BB35178405446DA8AA0B02BD3B492B. For an ADD event I wouldn't have a dest-dn, which means this can't be required.
Still, it would do nothing further.
I am assuming that it is because the event is returned to the subscriber channel, on which there are no more policies.
How do I get the information through the publisher channel policies?
Thanks in advance for anyone who attempted to comprehend this