The workaround is to remove the first line from the XML file that contains the XML processing instruction (i.e. the <?xml ... ?> line). This defect isn't published yet as a knowledge article on the website, when it is, it would contain the following:
CLRT-73713 XOG Write returns error if it contains an XML processing instruction at the start (<?xml ... ?>)
Description:
XML files typically begin with a processing instruction that identifies the file as XML. The example XOG files provided with the XOG client also include them. They look like this:
<?xml version="1.0" encoding="UTF-8"?>
To send the files to Clarity to be processed requires embedding the contents of this file into a SOAP request, which is also XML. As such, the processing instruction should be removed since the SOAP request has the one it needs already at the beginning and additional ones are not needed/desired in the file.
The following error occurs in the client:
Failed to retrieve response document
com.niku.xog.XOGException: java.lang.RuntimeException: HTTP Error: Status-Code: 500: Internal Server Error
at com.niku.xog.client.XOGClient.processRequest(XOGClient.java:1096)
at com.niku.xog.client.XOGClient.processRequest(XOGClient.java:1007)
at com.niku.xog.client.XOGClient.processRequest(XOGClient.java:679)
at com.niku.xog.client.XOGClient.processRequest(XOGClient.java:589)
at com.niku.xog.client.XOGClient.processRequests(XOGClient.java:1435)
at com.niku.xog.client.XOGClient.processCmd(XOGClient.java:1358)
at com.niku.xog.client.XOGClient.startShell(XOGClient.java:1287)
at com.niku.xog.client.XOGClient.invokeCommand(XOGClient.java:1248)
at com.niku.xog.client.XOGClient.main(XOGClient.java:142)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.werken.forehead.Forehead.run(Forehead.java:551)
at com.werken.forehead.Forehead.main(Forehead.java:581)
Caused by: java.lang.RuntimeException: HTTP Error: Status-Code: 500: Internal Server Error
at com.niku.union.xml.SimpleSOAPMessage.processRequest(SimpleSOAPMessage.java:316)
at com.niku.union.xml.SimpleSOAPMessage.send(SimpleSOAPMessage.java:88)
at com.niku.union.xml.SimpleSOAPMessage.send(SimpleSOAPMessage.java:79)
at com.niku.union.xml.SimpleSOAPMessage.send(SimpleSOAPMessage.java:56)
at com.niku.xog.client.XOGClient.processRequest(XOGClient.java:1092)
... 14 more
It also produces the following error in the app-ca.log files:
ERROR 2013-12-10 09:26:43,758 [http-bio-14001-exec-423] niku.xog (clarity:none:none:none) XOG POST failed
java.util.NoSuchElementException: ParseError at [row,col]:[9,9]
Message: The processing instruction target matching "[xX][mM][lL]" is not allowed.
Steps to Reproduce: | 1. Run XOG from the command prompt: bin\xog.bat 2. Login to your Clarity 13.3 server: login admin/admin@yourserver 3. Save the following XML to a file and then call it in the xog client: call yourfilename.xml <?xml version="1.0" encoding="UTF-8"?> <NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_user.xsd"> <Header version="6010" action="write" objectType="user" externalSource="ORACLE-FINANCIAL"/> <Users> <User userLanguage="English" userStatus="InActive" userName="xoguser10" userType="Internal" externalId="2323"> <PersonalInformation lastName="xoglastname10" firstName="xogfirstname10" emailAddress="xog10@niku.com"/> <Resource resourceId="xoguser10"/> <Company companyId="xogtestcompany"/> <General addedBy="admin" addedDate="2001-09-05"/> <OBSAssocs/> </User> </Users> </NikuDataBus> |
Expected Result: | The write should complete with a successful insert or update of a Clarity user |
Actual Result: | Error 500 is produced |
Workaround: | Remove the processing instruction (first line beginning with <? ...?>) from the XOG file. |
NJ