Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-1369

Const expression suport for idltowsdl

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • Invalid
    • CORBA Binding
    • None

    Description

      Matteo Vescovi [25/Apr/07 06:07 AM]
      I have a few questions about const declarators... Let's use the following const declarations as examples:

      const string s1 = "hello";
      const string<10> s2 = "hello";
      const string<10 + 2> s3 = "hello";
      const string s4 = "hello" + "world";
      const string s5 = "hello" << "world";
      const string<10 + 2> s6 = "hello" + "world";

      const long l1 = 10;
      const long l2 = 10 + 20;
      const long l3 = 10 + ((10 | 20 * (100 << 2)) / 2);

      const float f1 = 3.14 * 10;

      ...and now for the questions:

      • do we need to differentiate between const strings and const bounded strings? For example, strings s1 and s2 both have the constant value of "hello". The information about the bound is only used when validating the idl or when converting the wsdl back to idl. Can we relax our tool and generate the same XmlSchema and CorbaTypeMap for both?
      • do expressions on const strings even make sense? Take constant strings s4 and s5 for example. The IDL grammar allows to produce those declarations, but are they semantically valid? How do you shift "hello" by "world"? Is the + operator overloaded to concatenate strings?
      • if we differentiate between const strings and const bounded strings, then we will have to compute the <10 + 2> bound spec for string s6, as we can't assign a string to the Corba anonstring type bound member. But if we do that, we lose information and cannot get the original IDL back.
      • in general, I think we should assign the full string of const_exp to the value="" attribute of the corba:const element in the corbatypemap. That is the value="10 + ((10 | 20 * (100 << 2)) / 2)" for the const long l3 or value="10 + 20" for const long l2, instead of value="30". Will the code generator (wsdl2java) be able to handle this?

      [ Show » ] Matteo Vescovi [25/Apr/07 06:07 AM] I have a few questions about const declarators... Let's use the following const declarations as examples: const string s1 = "hello"; const string<10> s2 = "hello"; const string<10 + 2> s3 = "hello"; const string s4 = "hello" + "world"; const string s5 = "hello" << "world"; const string<10 + 2> s6 = "hello" + "world"; const long l1 = 10; const long l2 = 10 + 20; const long l3 = 10 + ((10 | 20 * (100 << 2)) / 2); const float f1 = 3.14 * 10; ...and now for the questions: - do we need to differentiate between const strings and const bounded strings? For example, strings s1 and s2 both have the constant value of "hello". The information about the bound is only used when validating the idl or when converting the wsdl back to idl. Can we relax our tool and generate the same XmlSchema and CorbaTypeMap for both? - do expressions on const strings even make sense? Take constant strings s4 and s5 for example. The IDL grammar allows to produce those declarations, but are they semantically valid? How do you shift "hello" by "world"? Is the + operator overloaded to concatenate strings? - if we differentiate between const strings and const bounded strings, then we will have to compute the <10 + 2> bound spec for string s6, as we can't assign a string to the Corba anonstring type bound member. But if we do that, we lose information and cannot get the original IDL back. - in general, I think we should assign the full string of const_exp to the value="" attribute of the corba:const element in the corbatypemap. That is the value="10 + ((10 | 20 * (100 << 2)) / 2)" for the const long l3 or value="10 + 20" for const long l2, instead of value="30". Will the code generator (wsdl2java) be able to handle this?

      [ Permlink | Delete | « Hide ] Balaji Ravi [26/Apr/07 06:19 AM]
      const strings & const bounded strings: I think we should map them differently. We should use a simple type with a restriction on the maxLength for bounded strings.

      expressions: Can we process these expressions and then output the result in the wsdl...

      I dont think we need to reproduce the same idl for these expressions. This is an edge case which we need not tackle. I would say we can process these expressions and simplify the wsdl generated.
      [ Show » ] Balaji Ravi [26/Apr/07 06:19 AM] const strings & const bounded strings: I think we should map them differently. We should use a simple type with a restriction on the maxLength for bounded strings. expressions: Can we process these expressions and then output the result in the wsdl... I dont think we need to reproduce the same idl for these expressions. This is an edge case which we need not tackle. I would say we can process these expressions and simplify the wsdl generated.

      [ Permlink | Delete | « Hide ] Edell Nolan [26/Apr/07 08:00 AM]
      But what happens in the case

      const string<10 + 2> s6 = "hello" + "world";

      Should we print the string then as "hello world" but this does not necessarily have to be another string. Its just another const expression.

      Edell.
      [ Show » ] Edell Nolan [26/Apr/07 08:00 AM] But what happens in the case const string<10 + 2> s6 = "hello" + "world"; Should we print the string then as "hello world" but this does not necessarily have to be another string. Its just another const expression. Edell.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            edellnolan Edell Nolan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment