DWR Remoting setHttpVerb not working at call level

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

DWR Remoting setHttpVerb not working at call level

Nomura_NS
Hi Team,
 
We are facing issues while setting Remoting options at call level but setting at global level as below it works.
 
dwr.engine.transport.xhr.httpMethod = 'GET'
 
We are looking for setting the requests type as ‘GET’ only for certain calls, but the httpVerb setting does not work.
 
The site mentions that ‘Setting the verb is not supported when using ScriptTag remoting’. It further mentions that
‘To use script tag remoting, 2 bits of set-up are required - you need to configure the server to allow cross-domain requests, and to tell the client where the services are located’ .
 
However, our application’s web.xml has only one configuration setup for ‘crossDomainSessionSecurity’, while the ‘allowScriptTagRemoting’ and ‘.path’ variable are not set.
 
  <init-param>
            <param-name>crossDomainSessionSecurity</param-name>
            <param-value>false</param-value>
        </init-param>
 
So I believe, we are not using Script Tag remoting.
 
The approach we follow for injecting dwr into our Spring beans is as below.
 
<bean id="structureService" class="com.nomura.ftg.ns.service.StructureServiceImpl">
        <property name="hierarchyDao" ref="hierarchyDao" />
          <dwr:remote javascript="StructureService">
         <dwr:include method="getAllOperationsControlList"/>
         <dwr:include method="getAllMOOwnerList"/>
            <dwr:filter class="org.directwebremoting.filter.AuditLogAjaxFilter"/>
        </dwr:remote>
        <aop:scoped-proxy proxy-target-class="false" />
</bean>
 
Does this mean that Script Tag remoting is used? Could you please assist us on this issue ASAP?
 
DWR User Name: Nomura_NS
 
Thanks & Regards
Santosh Gajula
____________________________________
CTS - Reference Data Services
Nomura Services India Pvt. Ltd
 
 
 
This e-mail (including any attachments) is confidential, may contain
proprietary or privileged information and is intended for the named
recipient(s) only. Unintended recipients are prohibited from taking
action on the basis of information in this e-mail and must delete all
copies. Nomura will not accept responsibility or liability for the
accuracy or completeness of, or the presence of any virus or disabling
code in, this e-mail. If verification is sought please request a hard
copy. Any reference to the terms of executed transactions should be
treated as preliminary only and subject to formal written confirmation
by Nomura. Nomura reserves the right to monitor e-mail communications
through its networks (in accordance with applicable laws). No
confidentiality or privilege is waived or lost by Nomura by any
mistransmission of this e-mail. Any reference to "Nomura" is a
reference to any entity in the Nomura Holdings, Inc. group.
Please read our Electronic Communications Legal Notice which forms
part of this e-mail: http://www.Nomura.com/email_disclaimer.htm
Reply | Threaded
Open this post in threaded view
|

Re: DWR Remoting setHttpVerb not working at call level

david@butterdev.com
What version of DWR are you using?  What does the JavaScript for your
call look like?

On 2013-12-23 12:07, [hidden email] wrote:

> Hi Team,
>
> We are facing issues while setting Remoting options at call level but
> setting at global level as below it works.
>
> dwr.engine.transport.xhr.httpMethod = 'GET'
>
> We are looking for setting the requests type as ‘GET’ only for
> certain calls, but the httpVerb setting does not work.
>
> The site mentions that ‘Setting the verb is not supported when using
> ScriptTag remoting’. It further mentions that
> ‘To use script tag remoting, 2 bits of set-up are required - you
> need to configure the server to allow cross-domain requests, and to
> tell the client where the services are located’ .
>
> However, our application’s web.xml has only one configuration setup
> for ‘crossDomainSessionSecurity’, while the
> ‘allowScriptTagRemoting’ and ‘.path’ variable are not set.
>
>  <init-param>
>  <param-name>crossDomainSessionSecurity</param-name>
>  <param-value>false</param-value>
>  </init-param>
>
> So I believe, we are not using Script Tag remoting.
>
> The approach we follow for injecting dwr into our Spring beans is as
> below.
>
> <bean id=_"structureService"_
> class=_"com.nomura.ftg.ns.service.StructureServiceImpl"_>
>  <property name=_"hierarchyDao"_ ref=_"hierarchyDao"_ />
>  <dwr:remote javascript=_"StructureService"_>
>  <dwr:include method=_"getAllOperationsControlList"_/>
>  <dwr:include method=_"getAllMOOwnerList"_/>
>  <dwr:filter
> class=_"org.directwebremoting.filter.AuditLogAjaxFilter"_/>
>  </dwr:remote>
>  <aop:scoped-proxy proxy-target-class=_"false"_ />
> </bean>
>
> Does this mean that Script Tag remoting is used? Could you please
> assist us on this issue ASAP?
>
> DWR User Name: NOMURA_NS
>
> Thanks & Regards
> SANTOSH GAJULA
> ____________________________________
> CTS - Reference Data Services
> NOMURA SERVICES INDIA PVT. LTD
>
> This e-mail (including any attachments) is confidential, may contain
> proprietary or privileged information and is intended for the named
> recipient(s) only. Unintended recipients are prohibited from taking
> action on the basis of information in this e-mail and must delete all
> copies. Nomura will not accept responsibility or liability for the
> accuracy or completeness of, or the presence of any virus or disabling
>
> code in, this e-mail. If verification is sought please request a hard
> copy. Any reference to the terms of executed transactions should be
> treated as preliminary only and subject to formal written confirmation
>
> by Nomura. Nomura reserves the right to monitor e-mail communications
> through its networks (in accordance with applicable laws). No
> confidentiality or privilege is waived or lost by Nomura by any
> mistransmission of this e-mail. Any reference to "Nomura" is a
> reference to any entity in the Nomura Holdings, Inc. group.
> Please read our Electronic Communications Legal Notice which forms
> part of this e-mail: http://www.Nomura.com/email_disclaimer.htm
Reply | Threaded
Open this post in threaded view
|

Re: DWR Remoting setHttpVerb not working at call level

david@butterdev.com
In reply to this post by Nomura_NS
I think there may be an issue in the documentation.  Can you try:

Remote.method(params, {
   callback:function(data) { ... },
   httpMethod:"GET"
});

Let me know, if it works I will update the docs.  Thanks.

On 2013-12-23 12:07, [hidden email] wrote:

> Hi Team,
>
> We are facing issues while setting Remoting options at call level but
> setting at global level as below it works.
>
> dwr.engine.transport.xhr.httpMethod = 'GET'
>
> We are looking for setting the requests type as ‘GET’ only for
> certain calls, but the httpVerb setting does not work.
>
> The site mentions that ‘Setting the verb is not supported when using
> ScriptTag remoting’. It further mentions that
> ‘To use script tag remoting, 2 bits of set-up are required - you
> need to configure the server to allow cross-domain requests, and to
> tell the client where the services are located’ .
>
> However, our application’s web.xml has only one configuration setup
> for ‘crossDomainSessionSecurity’, while the
> ‘allowScriptTagRemoting’ and ‘.path’ variable are not set.
>
>  <init-param>
>  <param-name>crossDomainSessionSecurity</param-name>
>  <param-value>false</param-value>
>  </init-param>
>
> So I believe, we are not using Script Tag remoting.
>
> The approach we follow for injecting dwr into our Spring beans is as
> below.
>
> <bean id=_"structureService"_
> class=_"com.nomura.ftg.ns.service.StructureServiceImpl"_>
>  <property name=_"hierarchyDao"_ ref=_"hierarchyDao"_ />
>  <dwr:remote javascript=_"StructureService"_>
>  <dwr:include method=_"getAllOperationsControlList"_/>
>  <dwr:include method=_"getAllMOOwnerList"_/>
>  <dwr:filter
> class=_"org.directwebremoting.filter.AuditLogAjaxFilter"_/>
>  </dwr:remote>
>  <aop:scoped-proxy proxy-target-class=_"false"_ />
> </bean>
>
> Does this mean that Script Tag remoting is used? Could you please
> assist us on this issue ASAP?
>
> DWR User Name: NOMURA_NS
>
> Thanks & Regards
> SANTOSH GAJULA
> ____________________________________
> CTS - Reference Data Services
> NOMURA SERVICES INDIA PVT. LTD
>
> This e-mail (including any attachments) is confidential, may contain
> proprietary or privileged information and is intended for the named
> recipient(s) only. Unintended recipients are prohibited from taking
> action on the basis of information in this e-mail and must delete all
> copies. Nomura will not accept responsibility or liability for the
> accuracy or completeness of, or the presence of any virus or disabling
>
> code in, this e-mail. If verification is sought please request a hard
> copy. Any reference to the terms of executed transactions should be
> treated as preliminary only and subject to formal written confirmation
>
> by Nomura. Nomura reserves the right to monitor e-mail communications
> through its networks (in accordance with applicable laws). No
> confidentiality or privilege is waived or lost by Nomura by any
> mistransmission of this e-mail. Any reference to "Nomura" is a
> reference to any entity in the Nomura Holdings, Inc. group.
> Please read our Electronic Communications Legal Notice which forms
> part of this e-mail: http://www.Nomura.com/email_disclaimer.htm
Reply | Threaded
Open this post in threaded view
|

Re: DWR Remoting setHttpVerb not working at call level

david@butterdev.com
Forget this.  It is not supported at the call level.  I recommend you
use the global option since that is supported.  You can switch to GET
before the call is made and then switch back in the callback/errorhandler.

On 12/23/2013 02:32 PM, [hidden email] wrote:

> I think there may be an issue in the documentation. Can you try:
>
> Remote.method(params, {
>   callback:function(data) { ... },
>   httpMethod:"GET"
> });
>
> Let me know, if it works I will update the docs.  Thanks.
>
> On 2013-12-23 12:07, [hidden email] wrote:
>> Hi Team,
>>
>> We are facing issues while setting Remoting options at call level but
>> setting at global level as below it works.
>>
>> dwr.engine.transport.xhr.httpMethod = 'GET'
>>
>> We are looking for setting the requests type as ‘GET’ only for
>> certain calls, but the httpVerb setting does not work.
>>
>> The site mentions that ‘Setting the verb is not supported when using
>> ScriptTag remoting’. It further mentions that
>> ‘To use script tag remoting, 2 bits of set-up are required - you
>> need to configure the server to allow cross-domain requests, and to
>> tell the client where the services are located’ .
>>
>> However, our application’s web.xml has only one configuration setup
>> for ‘crossDomainSessionSecurity’, while the
>> ‘allowScriptTagRemoting’ and ‘.path’ variable are not set.
>>
>>  <init-param>
>>  <param-name>crossDomainSessionSecurity</param-name>
>>  <param-value>false</param-value>
>>  </init-param>
>>
>> So I believe, we are not using Script Tag remoting.
>>
>> The approach we follow for injecting dwr into our Spring beans is as
>> below.
>>
>> <bean id=_"structureService"_
>> class=_"com.nomura.ftg.ns.service.StructureServiceImpl"_>
>>  <property name=_"hierarchyDao"_ ref=_"hierarchyDao"_ />
>>  <dwr:remote javascript=_"StructureService"_>
>>  <dwr:include method=_"getAllOperationsControlList"_/>
>>  <dwr:include method=_"getAllMOOwnerList"_/>
>>  <dwr:filter
>> class=_"org.directwebremoting.filter.AuditLogAjaxFilter"_/>
>>  </dwr:remote>
>>  <aop:scoped-proxy proxy-target-class=_"false"_ />
>> </bean>
>>
>> Does this mean that Script Tag remoting is used? Could you please
>> assist us on this issue ASAP?
>>
>> DWR User Name: NOMURA_NS
>>
>> Thanks & Regards
>> SANTOSH GAJULA
>> ____________________________________
>> CTS - Reference Data Services
>> NOMURA SERVICES INDIA PVT. LTD
>>
>> This e-mail (including any attachments) is confidential, may contain
>> proprietary or privileged information and is intended for the named
>> recipient(s) only. Unintended recipients are prohibited from taking
>> action on the basis of information in this e-mail and must delete all
>> copies. Nomura will not accept responsibility or liability for the
>> accuracy or completeness of, or the presence of any virus or disabling
>>
>> code in, this e-mail. If verification is sought please request a hard
>> copy. Any reference to the terms of executed transactions should be
>> treated as preliminary only and subject to formal written confirmation
>>
>> by Nomura. Nomura reserves the right to monitor e-mail communications
>> through its networks (in accordance with applicable laws). No
>> confidentiality or privilege is waived or lost by Nomura by any
>> mistransmission of this e-mail. Any reference to "Nomura" is a
>> reference to any entity in the Nomura Holdings, Inc. group.
>> Please read our Electronic Communications Legal Notice which forms
>> part of this e-mail: http://www.Nomura.com/email_disclaimer.htm
>

Reply | Threaded
Open this post in threaded view
|

Re: DWR Remoting setHttpVerb not working at call level

Mike Wilson
Administrator
In reply to this post by david@butterdev.com
"Verb" was the term used in DWR 1.x, it was changed into httpMethod
in DWR 2.x. httpMethod is supported on all levels (global, batch and
call) but the deprecated "verb" only has logic for global level in
DWR 2.x. You should change "verb" into httpMethod.
It seems this setting is missing from the options list in the docs?

Santosh:
Script tag remoting will be used automatically when domains differ,
ie when DWR is pointed at a different domain to where the page came
from.

Best regards
Mike Wilson

David wrote:

> I think there may be an issue in the documentation.  Can you try:
>
> Remote.method(params, {
>    callback:function(data) { ... },
>    httpMethod:"GET"
> });
>
> Let me know, if it works I will update the docs.  Thanks.
>
> On 2013-12-23 12:07, [hidden email] wrote:
> > Hi Team,
> >
> > We are facing issues while setting Remoting options at call
> level but
> > setting at global level as below it works.
> >
> > dwr.engine.transport.xhr.httpMethod = 'GET'
> >
> > We are looking for setting the requests type as 'GET' only for
> > certain calls, but the httpVerb setting does not work.
> >
> > The site mentions that 'Setting the verb is not supported when using
> > ScriptTag remoting'. It further mentions that
> > 'To use script tag remoting, 2 bits of set-up are required - you
> > need to configure the server to allow cross-domain requests, and to
> > tell the client where the services are located' .
> >
> > However, our application's web.xml has only one configuration setup
> > for 'crossDomainSessionSecurity', while the
> > 'allowScriptTagRemoting' and '.path' variable are not set.
> >
> >  <init-param>
> >  <param-name>crossDomainSessionSecurity</param-name>
> >  <param-value>false</param-value>
> >  </init-param>
> >
> > So I believe, we are not using Script Tag remoting.
> >
> > The approach we follow for injecting dwr into our Spring beans is as
> > below.
> >
> > <bean id=_"structureService"_
> > class=_"com.nomura.ftg.ns.service.StructureServiceImpl"_>
> >  <property name=_"hierarchyDao"_ ref=_"hierarchyDao"_ />
> >  <dwr:remote javascript=_"StructureService"_>
> >  <dwr:include method=_"getAllOperationsControlList"_/>
> >  <dwr:include method=_"getAllMOOwnerList"_/>
> >  <dwr:filter
> > class=_"org.directwebremoting.filter.AuditLogAjaxFilter"_/>
> >  </dwr:remote>
> >  <aop:scoped-proxy proxy-target-class=_"false"_ />
> > </bean>
> >
> > Does this mean that Script Tag remoting is used? Could you please
> > assist us on this issue ASAP?
> >
> > DWR User Name: NOMURA_NS
> >
> > Thanks & Regards
> > SANTOSH GAJULA
> > ____________________________________
> > CTS - Reference Data Services
> > NOMURA SERVICES INDIA PVT. LTD
> >
> > This e-mail (including any attachments) is confidential, may contain
> > proprietary or privileged information and is intended for the named
> > recipient(s) only. Unintended recipients are prohibited from taking
> > action on the basis of information in this e-mail and must
> delete all
> > copies. Nomura will not accept responsibility or liability for the
> > accuracy or completeness of, or the presence of any virus
> or disabling
> >
> > code in, this e-mail. If verification is sought please
> request a hard
> > copy. Any reference to the terms of executed transactions should be
> > treated as preliminary only and subject to formal written
> confirmation
> >
> > by Nomura. Nomura reserves the right to monitor e-mail
> communications
> > through its networks (in accordance with applicable laws). No
> > confidentiality or privilege is waived or lost by Nomura by any
> > mistransmission of this e-mail. Any reference to "Nomura" is a
> > reference to any entity in the Nomura Holdings, Inc. group.
> > Please read our Electronic Communications Legal Notice which forms
> > part of this e-mail: http://www.Nomura.com/email_disclaimer.htm