JSDO: passing additional information on add/update - Forum - Mobile - Progress Community

JSDO: passing additional information on add/update

 Forum

JSDO: passing additional information on add/update

  • You are reading the wrong documentation.  The CORS filter used in the rest service is not from Tomcat.

    When changing the allowed headers property you have to input the full list of header names, including the defaults OpenEdge supplies for you.  You may also use a shortcut to append header names to the built in set by using a plus-sign (+) as the first character.  

    Example: "+X-NEW-HEADER"

    Mike J.



    On Jul 8, 2015, at 4:13 PM, Akioma <bounce-Akioma@community.progress.com> wrote:

    Reply by Akioma

    Hi Edsel,

    thanks for the info. I played around with the options but only get errors on tomcat startup.

    Is there some documentation available about the settings?

    My problem is, if I read through tomcat documentation it seems as the property names in OE have slightly different names. E.g. I found the following recommended settings:

    <filter-name>CorsFilter</filter-name>

    <filter-class>org.apache.catalina.filters.CorsFilter</filter-class>

    <init-param>

     <param-name>cors.allowed.origins</param-name>

     <param-value>*</param-value>

    </init-param>

    <init-param>

     <param-name>cors.allowed.methods</param-name>

     <param-value>GET,POST,HEAD,OPTIONS,PUT</param-value>

    </init-param>

    <init-param>

     <param-name>cors.allowed.headers</param-name>

     <param-value>Content-Type,X-Requested-With,accept,Origin,Access-Control-Request-Method,Access-Control-Request-Headers, Last-Modified</param-value>

    </init-param>

    <init-param>

     <param-name>cors.exposed.headers</param-name>

     <param-value>Access-Control-Allow-Origin,Access-Control-Allow-Credentials</param-value>

    </init-param>

    <init-param>

     <param-name>cors.support.credentials</param-name>

     <param-value>true</param-value>

    </init-param>

    but cannot really match that to the OE properties:

                <b:property name="allowAll" value="false" />

                <b:property name="allowDomains" value="http://studio.progress.com,http://mobile.progress.com" />

                <b:property name="allowDomains" value="*" />

                <b:property name="allowSubdomains" value="false" />

                <b:property name="allowMethods" value="" />

                <b:property name="messageHeaders" value="" />

                <b:property name="responseHeaders" value="" />

                <b:property name="supportCredentials" value="true" />

                <b:property name="maxAge" value="-1" />

    Any help greatly appreciated!

    Mike

    Stop receiving emails on this subject.

    Flag this post as spam/abuse.

  • Hi Mike,

    when you say I am reading the wrong documentation, where do I find the right one..? :-)

    Tried all kind of settings now, but with no success. :-(

  • Good question.   After spending some time attempting to find such information in the OpenEdge documentation, I could not find it.   ( Perhaps someone else in the forum has and I just missed it )   In the meantime, I'm going to pass along a .pdf file with information about CORS, the support OpenEdge supplies, and configuration properties.  It is pretty raw information, but I hope it will help.
    Mike J.

     
    From: Akioma <bounce-Akioma@community.progress.com>
    Reply-To: "TU.Mobile@community.progress.com" <TU.Mobile@community.progress.com>
    Date: Thursday, July 9, 2015 at 6:15 AM
    To: "TU.Mobile@community.progress.com" <TU.Mobile@community.progress.com>
    Subject: RE: [Technical Users - Mobile] JSDO: passing additional information on add/update
    Reply by Akioma

    Hi Mike,

    when you say I am reading the wrong documentation, where do I find the right one..? :-)

    Tried all kind of settings now, but with no success. :-(

    Stop receiving emails on this subject.

    Flag this post as spam/abuse.

  • LOL!

    Do you have a similar document on IHybridRealm?

    -peter

  • Yep! Despite the version number of 0.1 the document helped a lot... :-)

    With these properties in the OECORSFilter it is working for me:

    <b:property name="messageHeaders" value="Accept,Accept-Language,Content-Language,Content-Type,X-CLIENT-CONTEXT-ID,Origin,Access-Control-Request-Headers,Access-Control-Request-Method,Pragma,Cache-control,X-CLIENT-PROPS" />

    <b:property name="responseHeaders" value="Cache-Control,Content-Language,Content-Type,Expires,Last-Modified,X-CLIENT-CONTEXT-ID,Pragma,X-CLIENT-PROPS" />

    Thanks,

    Mike

  • Hi Mike,

    We found that the following works as well:

                <b:property name="messageHeaders" value="+X-CLIENT-PROPS" />

                <b:property name="responseHeaders" value="+X-CLIENT-PROPS" />

    That way you only have to specify what you want to add. Is a lot cleaner.

    -peter

  • Peter,

    I found documentation while looking for something else.   This is in the 11.5 documentation set, OpenEdge Application Server: Administration.    Section VI for REST Administration covers both the CORS filter and has subsections for the OERealm feature support ( including IHybridRealm).  

    This 2015 PUG Challenge presentation will go into more details and depth for the OERealm development:  210_OE_Realm_Auth_Process.pptx

    - Mike J.

  • Hi Mike,

    Thank you this already sheds a bit more light. We already studied the PUG presentation but it is only an example, like the OEBPM example in the official docs. But I missed this piece of documentation (because you don't find it if you search on Ihybridrealm, you must search on hybridrealm).

    I will study this.

    Thanks,

    -peter