This post was updated on .
Hi All,
I am putting all my xform code in index.jsp in xforms-jsp/ss60 folder outside of the WEB-INF. I am loading the instance data from a template called template_config_s60.xml which in the same folder. The code snoppet in index.jsp is : <xf:model> <xf:instance id="handheld-instance" src="template_config_s60.xml"/> <xf:submission action="http://localhost:8080/hct/hhprofileconfigdatarmanager" method="post" id="change" replace="all"/> </xf:model> But the problem is data is not loading at all and when i submit from this page an error come like as provided below : <?xml version="1.0" encoding="utf-8" ?> <null xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" /> Please find the attachment for the error message. Please anybody help me. Thanks, Ingoba Attachment : error.bmp |
Administrator
|
Ingoba,
The src="..." is resolved relative to the URL of the form, so if you request your form by going to http://localhost:8080/Orbeon/xforms-jsp/xforms-jsp/ss60/index.jsp, it will try load http://localhost:8080/Orbeon/xforms-jsp/xforms-jsp/ss60/template_config_s60.xml. What happens when you try to load that from your browser? Maybe the file template_config_s60.xml doesn't get served, hence the error. You need to either make sure you have in the src="..." something that you can get from your browser, or if you want to put the file under WEB-INF/resources (say WEB-INF/resources/template_config_s60.xml) then you can use oxf:/template_config_s60.xml. Alex |
Hi Alex,
Thank you for your reply. I tried by putting the template_config_s60.xml in WEB-INF/resources/template_config_s60.xml and changing the src="oxf:/template_config_s60.xml" but I got the following error. Expected scheme name at index 0: :oxf/template_config_s60.xml Moreover, can u please suggest me how to make sure the src="..." something that I can get from my browser? Please me help on both the scenerios. Thanks, Ingoba
|
Administrator
|
Ingoba,
I just tried adding an <xforms:instance src="oxf:/some-file.xml"/> to a JSP I have here, and it loaded the XML as expected. Is this really what you have; can you double check there is no syntax error? From the error, it looks as if there was a ":" at the beginning of the URL. If you can't see anything, can you quote the exception you get in the orbeon.log? Say, if the XML is on some other server, and you write src="http://other-server/my-file.xml". The src is just a regular URL, and there is no magic there :). Alex |
This post was updated on .
Thanks Alex. Now data is loading but I am facing the same problem while submitting.
Code snippet is : <xforms:model> <xforms:instance id="handheld-instance" src="oxf:/apps/ss60/template_config_ss60.xml"/> <xforms:submission action="http://localhost:8080/hct/hhprofileconfigdatarmanager" method="post" id="change" replace="all"/> </xforms:model> The error is : <?xml version="1.0" encoding="utf-8" ?> <null xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" /> The requirement is : the template file needs to be updated with data in the UI when we submit through a servlet. Please help me once again. Thanks, Ingoba
|
Thanks Alex. Now data is loading but I am facing the same problem while submitting.
Code snippet is : <xforms:model> <xforms:instance id="handheld-instance" src="oxf:/apps/ss60/template_config_ss60.xml"/> <xforms:submission action="http://localhost:8080/hct/hhprofileconfigdatarmanager" method="post" id="change" replace="all"/> </xforms:model> The error is : <?xml version="1.0" encoding="utf-8" ?> <null xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" /> The requirement is : the template file needs to be updated with data in the UI when we submit through a servlet. Please help me once again. Thanks, Ingoba |
Administrator
|
In reply to this post by Ingoba
Ingoba,
I don't quite understand what you mean by "the error is: (and then some XML document)". Where do you see this? Can you submit a case that we can reproduce here, and that runs in the XForms sandbox, or that we can run by dropping a file in xforms-jsp? Alex |
Thanx. Let me clarify my question again.
I am putting all my xform code in index.jsp in xforms-jsp/ss60 folder outside of the WEB-INF. I am loading the instance data from a template called template_config_s60.xml which in the same folder. The code snoppet in index.jsp is : <xf:model> <xf:instance id="handheld-instance" src="template_config_s60.xml"/> <xf:submission action="http://localhost:8080/hct/hhprofileconfigdatarmanager" method="post" id="change" replace="all"/> </xf:model> when I submit from this page an error come like as provided below : <?xml version="1.0" encoding="utf-8" ?> <null xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" /> Please find the refer the picture. Before submit: After submit: Please help me.. Thanks, Ingoba |
Hi,
I am using Orbeon Xforms.The xform instance(xml file) is submitted to a Servlet.I am trying to retrieve the same xform instance in the Servlet using the following code. My Servlet contains the following code segment : BufferedReader requestData = new BufferedReader( new InputStreamReader(req.getInputStream())); when i try to see what the InputStream holds using out.print, i notice that it is not proper xml ( although , it contains the values which i entered in textfields ). out.print on (request.getInputStream) gives the following: INPUT STREAM CONTENT%24portlet%24p1.=&%24portlet%24p1.%24node%5E0s9WqPrV24I%3D=ipass&%24portlet%24p1.%24node%5EHVFtrBn2ms4%3D=Ingoba+SINGH&%24portlet%24a1.%24action%5E=Submit&%24portlet%24p1.%24instance=0ZzMD9YYnN3r8g3AmDd%2BCtfarq3X2FUD%2BNE7GPlgd%2BJ9yuarhw0dEE9y2wU701B1KIWvf0wVwmZx%0D%0AQ5jYbB%2Bw8V0ggwrqucu2DE4Xp4p%2BB8Ci0LpDmnS6LF7CKE6NISrlrI0M%2FVcyiKewWAkFg5eIa2Dg%0D%0A9xgtrQcmRAQSFrVrwo8EZlU4ew8%2BT9sFsFph25D5MmP1VPBVuUqlq%2BOvyWqDo9Wk7FgenIJEEzXG%0D%0AV3KkOg6n9EARBZYka6KkZHL41qY%2BE5TmftoHGv6FyuhRsfqjoXsWBqwIicP3NfYbZcTLTWI%3D&%24portlet%24p1.%24key=LTOVlxYclwULvY4ov2LveWw761ek4WYr&%24instance=7JcdLCa02wbO2qnhtqrjAe1CAaIskGOtTMXrgcbV2YCM39AfIi7BdXG4fe9D2pse1CEHTaPFgxE8%0D%0AGm2IDjQC5ieuSa6PT4Q0h4c6o69Fzzh3tmjBU9rhOf3cf8FlGl2H9XzlkpuHzcE%2Fx9QBWYk3P%2FvT%0D%0A34KwHgljppkIo9Gxw8Ou9L1WFcu9b5Yti%2FyV17QHZeC15642pptb2UBtY7ufQwqtkoFXo%2B1eG2Sh%0D%0ASiZgcm5TEcE8%2BrHCyQHwFDac9DZ4yeEA5wU0pLCZNlB92uTOn1gmY8zDkYOi0gM5OCHafMM%3D&%24key=sVGGqfusdKWuZ31VrpD%2BsMracKQEdBB%2B (P.S : ipass and Ingoba SINGH were the values which i entered in textfields ) I couldn't get the proper xml file as output but in Chiba I can get the proper XML. Alex please one suggest me the possible solution for this also? Thanks in advance !! Regards, Ingoba |
Administrator
|
In reply to this post by Ingoba
Ingoba,
OK, thank you for the clarification. And I assume that http://localhost:8080/hct/hhprofileconfigdatarmanager maps to a servlet of yours? Is the servlet called? What does it return? I'd recommend you create a simple test case for this that is independent of your application and that we can use to reproduce this. It will be much easier for us to debug it this way. Maybe you can replace your servlet by a JSP. Alex |
Administrator
|
In reply to this post by Ingoba
Ingoba,
Not sure about this one. You should just get the XML that you are submitting. Maybe an issue related to portlet. Can you try running this outside of the portlet environment? You can look at xforms-jsp/service-search.jsp that ships with Orbeon Forms and that shows a service that receives XML and returns XML (case of a replace="instance"). Alex |
Free forum by Nabble | Edit this page |