Discussion:
Does system.parseObject("XMLSaxParser", xml) won't work in RMI Adapter for ISIM (v7, VA)
(too old to reply)
Sufyan Khan
2018-01-23 12:04:13 UTC
Permalink
Hello All,

I am facing one strange issue, I have developed one RMI Adapter for ISIM (v7.0 VA) through which I am invoking Webservice.

When I am trying to parse xml response using system.parseObject() api, it is not working, the entry returned by system.parseObject() is null.

But when I executed the same code from Config Editor of TDI (v7.2), it worked fine. The xml got parsed as expected.

Below is the xml which I am trying to parse -



<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>Error Code: 7668277 Error Message: Error: An internal error has occurred within the authentication subsystem for the Siebel application. Please contact your system administrator for assistance.(SBL-DAT-00565)</faultstring>
<detail>
<siebelf:errorstack xmlns:siebelf="http://www.siebel.com/ws/fault">
<siebelf:error>
<siebelf:errorsymbol />
<siebelf:errormsg>Error: An internal error has occurred within the authentication subsystem for the Siebel application. Please contact your system administrator for assistance.(SBL-DAT-00565)</siebelf:errormsg>
</siebelf:error>
</siebelf:errorstack>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


Let me know if it is a known issue also if there is any workaround to fetch the value from "faultstring" tag.


Regards,
Sufyan Khan
Sufyan Khan
2018-01-23 12:34:14 UTC
Permalink
Post by Sufyan Khan
Hello All,
I am facing one strange issue, I have developed one RMI Adapter for ISIM (v7.0 VA) through which I am invoking Webservice.
When I am trying to parse xml response using system.parseObject() api, it is not working, the entry returned by system.parseObject() is null.
But when I executed the same code from Config Editor of TDI (v7.2), it worked fine. The xml got parsed as expected.
Below is the xml which I am trying to parse -
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>Error Code: 7668277 Error Message: Error: An internal error has occurred within the authentication subsystem for the Siebel application. Please contact your system administrator for assistance.(SBL-DAT-00565)</faultstring>
<detail>
<siebelf:errorstack xmlns:siebelf="http://www.siebel.com/ws/fault">
<siebelf:error>
<siebelf:errorsymbol />
<siebelf:errormsg>Error: An internal error has occurred within the authentication subsystem for the Siebel application. Please contact your system administrator for assistance.(SBL-DAT-00565)</siebelf:errormsg>
</siebelf:error>
</siebelf:errorstack>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Let me know if it is a known issue also if there is any workaround to fetch the value from "faultstring" tag.
Regards,
Sufyan Khan
I think we cannot use "system" in rmi adapter like the way the api system.getExternalProperty() won't work.

Please correct me.


Regards,
Sufyan
Eddie Hartman
2018-01-23 21:06:19 UTC
Permalink
Post by Sufyan Khan
Hello All,
I am facing one strange issue, I have developed one RMI Adapter for ISIM (v7.0 VA) through which I am invoking Webservice.
When I am trying to parse xml response using system.parseObject() api, it is not working, the entry returned by system.parseObject() is null.
But when I executed the same code from Config Editor of TDI (v7.2), it worked fine. The xml got parsed as expected.
Below is the xml which I am trying to parse -
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>Error Code: 7668277 Error Message: Error: An internal error has occurred within the authentication subsystem for the Siebel application. Please contact your system administrator for assistance.(SBL-DAT-00565)</faultstring>
<detail>
<siebelf:errorstack xmlns:siebelf="http://www.siebel.com/ws/fault">
<siebelf:error>
<siebelf:errorsymbol />
<siebelf:errormsg>Error: An internal error has occurred within the authentication subsystem for the Siebel application. Please contact your system administrator for assistance.(SBL-DAT-00565)</siebelf:errormsg>
</siebelf:error>
</siebelf:errorstack>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Let me know if it is a known issue also if there is any workaround to fetch the value from "faultstring" tag.
Regards,
Sufyan Khan
Here is how I would do it (or rather, how I parsed your xml).

1. First I made a new AL: _parsingSufyansXML
2. I added an Attribute map with a single attribute (xml) set to 'Substitution text' so I could paste in the xml
3. Then a Script with the following code:
----
// Get xml to variable
xml = work.getString("xml");

// Parse xml to hierarchical Entry with static method fromXML()
hEntry = work.fromXML(xml, "*", "");

// Use DOM Interface method to find NodeList with tag 'faultstring'
// Of course, there is only one so I can just dereference with index 0
faultstring = hEntry.getElementsByTagName("faultstring")[0];

// Print out the faultstring
task.logmsg(faultstring);
----

And if the simplicity of the above tickles your fancy, have a look at these blog posts:
Here is part one (written many moons ago): http://www.tdiingoutloud.com/2013/09/json-and-xml-tutorial-part-1.html
and then (forgive the numbering :P)
http://www.tdiingoutloud.com/2015/02/json-and-xml-tutorial-part-2.html
http://www.tdiingoutloud.com/2016/02/json-and-xml-tutorial-part-2-xml-example.html
http://www.tdiingoutloud.com/2016/11/json-and-xml-tutorial-part-4-json.html
http://www.tdiingoutloud.com/2016/11/json-and-xml-tutorial-part-5.html This one about scripting a connector to hide the complexity of the calls
http://www.tdiingoutloud.com/2016/11/json-and-xml-tutorial-part-6-making.html

Enjoy!
Sufyan Khan
2018-01-24 07:41:58 UTC
Permalink
Post by Eddie Hartman
Post by Sufyan Khan
Hello All,
I am facing one strange issue, I have developed one RMI Adapter for ISIM (v7.0 VA) through which I am invoking Webservice.
When I am trying to parse xml response using system.parseObject() api, it is not working, the entry returned by system.parseObject() is null.
But when I executed the same code from Config Editor of TDI (v7.2), it worked fine. The xml got parsed as expected.
Below is the xml which I am trying to parse -
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>Error Code: 7668277 Error Message: Error: An internal error has occurred within the authentication subsystem for the Siebel application. Please contact your system administrator for assistance.(SBL-DAT-00565)</faultstring>
<detail>
<siebelf:errorstack xmlns:siebelf="http://www.siebel.com/ws/fault">
<siebelf:error>
<siebelf:errorsymbol />
<siebelf:errormsg>Error: An internal error has occurred within the authentication subsystem for the Siebel application. Please contact your system administrator for assistance.(SBL-DAT-00565)</siebelf:errormsg>
</siebelf:error>
</siebelf:errorstack>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Let me know if it is a known issue also if there is any workaround to fetch the value from "faultstring" tag.
Regards,
Sufyan Khan
Here is how I would do it (or rather, how I parsed your xml).
1. First I made a new AL: _parsingSufyansXML
2. I added an Attribute map with a single attribute (xml) set to 'Substitution text' so I could paste in the xml
----
// Get xml to variable
xml = work.getString("xml");
// Parse xml to hierarchical Entry with static method fromXML()
hEntry = work.fromXML(xml, "*", "");
// Use DOM Interface method to find NodeList with tag 'faultstring'
// Of course, there is only one so I can just dereference with index 0
faultstring = hEntry.getElementsByTagName("faultstring")[0];
// Print out the faultstring
task.logmsg(faultstring);
----
Here is part one (written many moons ago): http://www.tdiingoutloud.com/2013/09/json-and-xml-tutorial-part-1.html
and then (forgive the numbering :P)
http://www.tdiingoutloud.com/2015/02/json-and-xml-tutorial-part-2.html
http://www.tdiingoutloud.com/2016/02/json-and-xml-tutorial-part-2-xml-example.html
http://www.tdiingoutloud.com/2016/11/json-and-xml-tutorial-part-4-json.html
http://www.tdiingoutloud.com/2016/11/json-and-xml-tutorial-part-5.html This one about scripting a connector to hide the complexity of the calls
http://www.tdiingoutloud.com/2016/11/json-and-xml-tutorial-part-6-making.html
Enjoy!
Thanks Sir, it worked very well.
Sure will go through the above links, thanks a lot..!

By the way do you have any idea why system.parseObject() not working when the AL is loaded and running from Dispatcher but working when I execute the AL from TDI Config Editor.


Regards,
Sufyan
Eddie Hartman
2018-01-24 19:06:28 UTC
Permalink
Post by Sufyan Khan
Post by Eddie Hartman
Post by Sufyan Khan
Hello All,
I am facing one strange issue, I have developed one RMI Adapter for ISIM (v7.0 VA) through which I am invoking Webservice.
When I am trying to parse xml response using system.parseObject() api, it is not working, the entry returned by system.parseObject() is null.
But when I executed the same code from Config Editor of TDI (v7.2), it worked fine. The xml got parsed as expected.
Below is the xml which I am trying to parse -
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>Error Code: 7668277 Error Message: Error: An internal error has occurred within the authentication subsystem for the Siebel application. Please contact your system administrator for assistance.(SBL-DAT-00565)</faultstring>
<detail>
<siebelf:errorstack xmlns:siebelf="http://www.siebel.com/ws/fault">
<siebelf:error>
<siebelf:errorsymbol />
<siebelf:errormsg>Error: An internal error has occurred within the authentication subsystem for the Siebel application. Please contact your system administrator for assistance.(SBL-DAT-00565)</siebelf:errormsg>
</siebelf:error>
</siebelf:errorstack>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Let me know if it is a known issue also if there is any workaround to fetch the value from "faultstring" tag.
Regards,
Sufyan Khan
Here is how I would do it (or rather, how I parsed your xml).
1. First I made a new AL: _parsingSufyansXML
2. I added an Attribute map with a single attribute (xml) set to 'Substitution text' so I could paste in the xml
----
// Get xml to variable
xml = work.getString("xml");
// Parse xml to hierarchical Entry with static method fromXML()
hEntry = work.fromXML(xml, "*", "");
// Use DOM Interface method to find NodeList with tag 'faultstring'
// Of course, there is only one so I can just dereference with index 0
faultstring = hEntry.getElementsByTagName("faultstring")[0];
// Print out the faultstring
task.logmsg(faultstring);
----
Here is part one (written many moons ago): http://www.tdiingoutloud.com/2013/09/json-and-xml-tutorial-part-1.html
and then (forgive the numbering :P)
http://www.tdiingoutloud.com/2015/02/json-and-xml-tutorial-part-2.html
http://www.tdiingoutloud.com/2016/02/json-and-xml-tutorial-part-2-xml-example.html
http://www.tdiingoutloud.com/2016/11/json-and-xml-tutorial-part-4-json.html
http://www.tdiingoutloud.com/2016/11/json-and-xml-tutorial-part-5.html This one about scripting a connector to hide the complexity of the calls
http://www.tdiingoutloud.com/2016/11/json-and-xml-tutorial-part-6-making.html
Enjoy!
Thanks Sir, it worked very well.
Sure will go through the above links, thanks a lot..!
By the way do you have any idea why system.parseObject() not working when the AL is loaded and running from Dispatcher but working when I execute the AL from TDI Config Editor.
Regards,
Sufyan
Afraid not, good sir. To paraphrase Sinatra, I do it my way :)
Sufyan Khan
2018-01-24 21:39:42 UTC
Permalink
Great...! Your way is sooper easy and awesome as usual.

By the way I have raised PMR for this strange behaviour of system object (of UserFunctions class).


Regards,
Sufyan
Franzw
2018-01-25 21:48:39 UTC
Permalink
Post by Sufyan Khan
Great...! Your way is sooper easy and awesome as usual.
By the way I have raised PMR for this strange behaviour of system object (of UserFunctions class).
Regards,
Sufyan
IIRC just use the full TDI object name instead of system/task etc. when developing adapters.

replace system.parseObject with com.ibm.di.function.UserFunctions.parseObject

I have not tested it recently but I believe it works that way.

HTH
Regards
Franz Wolfhagen
Eddie Hartman
2018-01-26 18:54:40 UTC
Permalink
Post by Franzw
Post by Sufyan Khan
Great...! Your way is sooper easy and awesome as usual.
By the way I have raised PMR for this strange behaviour of system object (of UserFunctions class).
Regards,
Sufyan
IIRC just use the full TDI object name instead of system/task etc. when developing adapters.
replace system.parseObject with com.ibm.di.function.UserFunctions.parseObject
I have not tested it recently but I believe it works that way.
HTH
Regards
Franz Wolfhagen
Eddie Hartman
2018-01-26 18:55:54 UTC
Permalink
Post by Sufyan Khan
Hello All,
I am facing one strange issue, I have developed one RMI Adapter for ISIM (v7.0 VA) through which I am invoking Webservice.
When I am trying to parse xml response using system.parseObject() api, it is not working, the entry returned by system.parseObject() is null.
But when I executed the same code from Config Editor of TDI (v7.2), it worked fine. The xml got parsed as expected.
Below is the xml which I am trying to parse -
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>Error Code: 7668277 Error Message: Error: An internal error has occurred within the authentication subsystem for the Siebel application. Please contact your system administrator for assistance.(SBL-DAT-00565)</faultstring>
<detail>
<siebelf:errorstack xmlns:siebelf="http://www.siebel.com/ws/fault">
<siebelf:error>
<siebelf:errorsymbol />
<siebelf:errormsg>Error: An internal error has occurred within the authentication subsystem for the Siebel application. Please contact your system administrator for assistance.(SBL-DAT-00565)</siebelf:errormsg>
</siebelf:error>
</siebelf:errorstack>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Let me know if it is a known issue also if there is any workaround to fetch the value from "faultstring" tag.
Regards,
Sufyan Khan
Are you saying, Franz, that 'system' is not pointing to an instance of UserFunctions? Or that this instance has been befuddled by the Dispatcher (aka the TDI lobotomizer)?
Franzw
2018-01-28 17:34:17 UTC
Permalink
Post by Eddie Hartman
Post by Sufyan Khan
Hello All,
I am facing one strange issue, I have developed one RMI Adapter for ISIM (v7.0 VA) through which I am invoking Webservice.
When I am trying to parse xml response using system.parseObject() api, it is not working, the entry returned by system.parseObject() is null.
But when I executed the same code from Config Editor of TDI (v7.2), it worked fine. The xml got parsed as expected.
Below is the xml which I am trying to parse -
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>Error Code: 7668277 Error Message: Error: An internal error has occurred within the authentication subsystem for the Siebel application. Please contact your system administrator for assistance.(SBL-DAT-00565)</faultstring>
<detail>
<siebelf:errorstack xmlns:siebelf="http://www.siebel.com/ws/fault">
<siebelf:error>
<siebelf:errorsymbol />
<siebelf:errormsg>Error: An internal error has occurred within the authentication subsystem for the Siebel application. Please contact your system administrator for assistance.(SBL-DAT-00565)</siebelf:errormsg>
</siebelf:error>
</siebelf:errorstack>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Let me know if it is a known issue also if there is any workaround to fetch the value from "faultstring" tag.
Regards,
Sufyan Khan
Are you saying, Franz, that 'system' is not pointing to an instance of UserFunctions? Or that this instance has been befuddled by the Dispatcher (aka the TDI lobotomizer)?
I do not know what the dispatcher is doing - but I seems to remember from multiple occasions that that is the case. But just a word warning - this is just in my memory right now - so lets not jump to conclusions before validating it..

Regards
Franz Wolfhagen

Loading...