Problem
=======
When calling a service that was defined as "export=true" and a non-optional parameter is missing, then the SOAP-Response is not a valid XML.
Cause
=====
The cause is, that in SOAPEventHandler.invoke() the dispatcher.runSync() throws a ServiceValidationException ("The following required parameter is missing..."). This will be catched by the GenericServiceException-block, a error response will be written to the output stream (via sendError()) and an EventHandlerException will be thrown. This exception will again be catched (this time by the Exception-block and another error response will be written to the output stream.
Solution
========
I think the best solution is simply not to call sendError in the GenericServiceException-block.
JLR: I simply commented out the faulty line (with a reference to OFBIZ-4207) in case someone would want to improve the error message.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1075952 13f79535-47bb-0310-9956-ffa450edef68
Orig. Msg.:
I guess that the makeLoginUrl-method in the LoginWorker should return a string with expandedEntites.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1071362 13f79535-47bb-0310-9956-ffa450edef68
Scott reported: To clarify, the problem only occurs if the Ajax call results in a screen being rendered since it is the ScreenRenderer that causes a new key to be generated.
Bilgin suggested: I think a solution would be to skip generating of new external login key for Ajax requests.
Ajax requests can be identified by presence of 'X-Requested-With': 'XMLHttpRequest', http header. It is set by most of the Javascript libraries we use: prototype, jquery.
I coded it
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1068283 13f79535-47bb-0310-9956-ffa450edef68
Fix using TagLib in freemarker follow this.
1. In ControlServlet.java, create ServletContextHashModel instance and set to request's attritube
2. In ScreenRenderer.java, set ServletContextHashModel instance from request's attribute to context name Application and set HttpRequestHashModel instance from requestAttributes in context to context name Request
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1061310 13f79535-47bb-0310-9956-ffa450edef68
The problem is, when you call a request over http, but the controller wants an https request, the RequestHandler make an redirect to https (which is indeed pretty cool). But this redirect causes that Events/ Services will be called twice. This can be avoided when we return from the Service/ Event directly after doing the redirect.
Example: http://localhost:8080/ecommerce/control/setdistributor?distributor=4711
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1040044 13f79535-47bb-0310-9956-ffa450edef68
- set delegator, dispatcher and security from session, servlet context or request's attribute to app context of birt engine before render and send email
- add the initialPath field to Tenant entity
- create the tenant context which as a default servlet using org.ofbiz.webapp.control.TenantServlet in the catalina container and check the multitenant property for initial the tenant context with root mount /
- move the changing a multi tenant delegator statement from ControlServlet to ContextFilter that could apply to every servlets
(implementation by Chattree Richard)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1032472 13f79535-47bb-0310-9956-ffa450edef68
Patch to improve the delegator call in the countHit method.
The method got the delegator name from the session and got, with this delegator name over the delegator factory, the delegator.
But when the delegator name was not available in the session the method crashes.
I try to get the delegator from the request, and if their is no delegator object I go the factory way.
I think it's a little bit saver to get a delegator object this way
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1021344 13f79535-47bb-0310-9956-ffa450edef68
I found a problem when I switched from one app to another. The multi-tenant did not work if the username and password were the same in the main database and tenants (or different tenants). For example, the password of admin is ofbiz in main database and in DEMO1 tenant, first log in to catalog as admin of tenant DEMO1, and then switch to the content app, the data of content app is from the main database instead of DEMO1.
I debugged this problem, and the code was missing to check the userlogin tenant in checkExternalLoginKey.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1001099 13f79535-47bb-0310-9956-ffa450edef68
setDirectoryForTemplateLoading, so that raw File access is no longer
used. This is to support webslinger, which uses an overlay filesystem
to merge multiple modules, and doesn't really have a single File view of
the webapp.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@997422 13f79535-47bb-0310-9956-ffa450edef68