Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-7213

Override allow-html attribute do not work in service implementing any interface

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: Trunk
    • Fix Version/s: 14.12.01, 15.12.01, 13.07.04
    • Component/s: framework
    • Labels:
      None

      Description

      To test I used an interface say "testInterface". Try as shown below

      =============Add test interface and service =========

          <service name="testInterface" engine="interface">
              <attribute name="testData" type="String" mode="IN" optional="true"/>
          </service>
          <service name="checkAllowHtmlForOverride" engine="java" location="org.ofbiz.order.order.OrderServices" invoke="checkAllowHtmlForOverride">
              <implements service="testInterface"/>
              <override name="testData" allow-html="any" ></override>
          </service>
      

      ===================================

      Add service definition for the service "checkAllowHtmlForOverride" in "org.ofbiz.order.order.OrderServices".

      public static Map<String, Object> checkAllowHtmlForOverride(DispatchContext dctx, Map<String, ? extends Object> context) {
              String testData = (String) context.get("testData");
              Debug.log("==============" + testData);
              return ServiceUtil.returnSuccess();
          }
      

      Run service "checkAllowHtmlForOverride" from service engine.

      *Exception :* 
      
           [java] 2016-06-07 19:07:38,429 |http-nio-8443-exec-9 |ServiceDispatcher             |E| Incoming context (in runSync : checkAllowHtmlForOverride) does not match expected requirements
           [java] org.ofbiz.service.ServiceValidationException: In field [testData] less-than (<) and greater-than (>) symbols are not allowed.
           [java] 	at org.ofbiz.service.ModelService.validate(ModelService.java:597) ~[ofbiz-service.jar:?]
           [java] 	at org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:376) [ofbiz-service.jar:?]
      

        Attachments

        1. OFBIZ-7213.patch
          0.9 kB
          Nameet Jain

          Activity

            People

            • Assignee:
              deepak Deepak Dixit
              Reporter:
              nj Nameet Jain
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: