Setting cookies in a webservice doesn't work

I am using a ColdFusion component to publish a web service
and I want that web service to set a cookie. However, this does not
appear to always work.
Specifically, if I invoke the web service from the browser by
entering a URL such as "service.cfc?method=name" in the address
bar, then the cookie is set properly. If I use <cfinvoke> the
cookie is not set. If I use the EasySoap C++ library then the
cookie is set if I use <cfheader> to set it, but is not set
if I use <cfcookie>.
Please see the attached code samples. "cookies.cfc" is the
component used to publish the web service, "cookies.cfm" is a
simple test programme which invokes the web service either using
<cfinvoke> or with the web browser (the second time you
invoke the web service you should see that the cookies were set the
last time you invoked it, but this only happens if you invoke it
using the browser. A simple C++ programme to invoke the web service
(using EasySoap, which in turn uses WinInet) returns
"Cookie.EchoLast_2=99" meaning that only cookies set using
<cfheader> are actually being set.
Please explain what on earth it is doing and what is the
correct/approved way of setting cookies in a web service.
Thanks!

quote:
Originally posted by:
MartinW-2006
Any suggestions? AM I right in presuming this is a bug?
Start by ensuring that your function actually runs when you
invoke it. Does anything get returned to your calling template?

Similar Messages

  • Setting NLS_LANG=CANADIAN FRENCH_CANADA.WE8MSWIN1252 doesn't work Win64 bit

    Hi,
    I migrated my database Oracle 10.2.0.4 windows 32 bits to Windows 64 bits. On the new server 64 bits, I set registers key exactly the same way (NLS_LANG, NLS_DATE_FORMAT, etc.).
    In 32 bits, when I started SQLPlus, I had the following output:*
    +Microsoft Windows [Version 5.2.3790]+
    +(C) Copyright 1985-2003 Microsoft Corp.+
    D:\Logiciels\Oracle\Ora10g\rdbms\BIN>sqlplus /nolog
    SQL*Plus: Release 10.2.0.3.0 - Production on Jeu. Juil. 16 14:21:49 2009
    Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.
    SQL> show user
    USER est ""+
    SQL>
    In 64 bits, I had the following output when I started SQLPlus:*
    D:\Logiciels\oracle\ora10g\rdbms\BIN>sqlplus / as sysdba
    SQL*Plus: Release 10.2.0.4.0 - Production on Jeu. Juil. 16 14:16:19 2009
    Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, Real Application Clusters, OLAP and Data Mining options
    SQL> show user
    USER is "SYS"+
    SQL>
    To be sure it's the good key used by SQL*Plus, I voluntary changed the value of the Key NLS_LANG to an invalid value to see what would be the result
    (for example: I omitted the first "A" in CNADIAN FRENCH_CANADA.WE8MSWIN1252). Now is the result:
    D:\Logiciels\oracle\ora10g\rdbms\BIN>sqlplus / as sysdba
    SQL*Plus: Release 10.2.0.4.0 - Production on Jeu. Juil. 16 14:22:40 2009
    Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
    ERROR:
    ORA-12705: Cannot access NLS data files or invalid environment specified
    Enter user-name:
    That's the proof that I'm using the good key. Si why it doesn't work for NLS_LANG=CANADIAN FRENCH_CANADA.WE8MSWIN1252 ???
    I tried with the same bad result with FRENCH_CANADA.WE8MSWIN1252.
    Any idea?
    Thank's
    Yves
    Edited by: yvesthib on 2009-07-16 14:33
    Sorry, I created the this thread in the wrong category ...

    I'm quoting NLS_LANG FAQ http://www.oracle.com/technology/tech/globalization/htdocs/nls_lang%20faq.htm:
    >
    If NLS_LANG is not set in the environment, check the value in the registry:
    SQL>@.[%NLS_LANG%].
    If you get something like:
    Unable to open file.[ENGLISH_UNITED KINGDOM.WE8ISO8859P1].
    The "file name" between the braces is the value of the registry parameter.
    If you get this as result:
    Unable to open file ".[%NLS_LANG%]." then the parameter NLS_LANG is also not set in the registry.
    Note the @.[%NLS_LANG%]. technique reports the NLS_LANG known by the SQL*Plus executable, it will not read the registry itself. But if you run the HOST command first and the NLS_LANG is not set in the environment then you can be sure the variable is set in the registry if the @.[%NLS_LANG%]. returns a valid value.
    >
    Maybe you have several NLS_LANG setting in the registry because you have several ORACLE_HOME ?
    Edited by: P. Forstmann on Jul 16, 2009 9:23 PM

  • Setting proxy from installation program doesn't work

    I think I found a bug in installation program.
    When I go to setup network in installation program, choose not to use dhcp and then setup the proxy configuration there it doesn't work.
    I know it's not a network problem or anything because I managed to install fine after going to another VC and using export http_proxy="myproxyip:port" and export ftp_proxy="myproxyip:port" and then returned to installation program on VC1.

    The best thing to do when you think you found a bug is to post in the bug tracker. Things have a tendency to get lost in the forums very quickly, as well a number of Arch developers don't come into the forums at all.

  • Setting 'struct tm' tm_zone="GMT" doesn't work, takes default system timezone

    Dear Dev-Meisters,
    I'm trying to find out why setting  tm_zone="GMT" in a "struct tm" is not working on Mac OS X 10.6.x. and mktime()....
    However with gmtime() it works but apparently it's not recommended for Mac OS X...
    I need to read in a data file with large datasets which contains date / time along with data.
    Every date/time (can be about > 500000 lines) is converted to a time_t data structure to find out if there a gaps between dates.
    However setting the structure "struct tm" with tm_zone="GMT" doesn't set it to GMT.
    It always takes Mac OS X default time zone defined in the Sys Preferences.
    I made succesful tests with "NSDate timeIntervalSince1970" (when setting the NSTimezone to GMT): this gives the correct GMT time...
    Since > 500000 lines is a little bit overkill performance wise to always create an object I would prefer to use UNIX time stamp...
    /* Test for 24 Feb. 2005 at 17h20:10 / Should return: 1109265610 as UTC time */
    time_t currentTime;
    struct tm myTm;
    myTm.tm_year          = 2005-1900;  // need to subtract -1900
    myTm.tm_mon           = 2-1;        // need to subtract -1 (since month: 0-11) 
    myTm.tm_mday          = 24;
    myTm.tm_hour          = 17;
    myTm.tm_min           = 20;
    myTm.tm_sec           = 10;
    myTm.tm_zone          = "GMT";
    myTm.tm_isdst         = 0; // DayLight Saving Time flag = 0 = Off
    myTm.tm_gmtoff        = 0;
    currentTime = mktime(&myTm);
    Result on Mac OS X: 1109262010 !! Wrong result: -3600 seconds, should be 1109265610
    However using:
    currentTime = gmtime(&myTm);
    gives the right result: 1109265610
    Any suggestions is greatly appreciated

    Thanks for the answer, I read everything except the man page for mktime :-(
    Well I can't remember where I read that about "gmtime" but you are right:
    I will use gmtime instead of mktime and it works, it converts it to a GMT time.
    Thanks again for your precious help.
    Cheers,
    Gilles

  • Webservice doesn't work with: soap-env:mustUnderstand="1"

    Hi friends,
    I created a Webservice Consumer with the assistant, indicating the URL of my WSDL.
    Then I created the logical port in SOAMANAGER, using the same URL.
    When I test the Webservice Consumer I get the following error:
    SoapFaultCode:3  MustUnderstand headers:
    [Action,
    To] are not understood.
    The XML petition to the Webservice is:
    <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
         <soap-env:Header>
              <sap:Trace xmlns:sap="http://www.sap.com/webas/630/soap/features/runtime/tracing/">
                   <sap:TraceLevel>Error</sap:TraceLevel>
                   <sap:TraceContext>
                        <TRC_PATTERN>WSTEST</TRC_PATTERN>
                        <TRC_KEY>4D635EAAEFA70022E10000009353966F</TRC_KEY>
                        <TRC_SSID>EDU_02</TRC_SSID>
                        <TRC_USER>DES005</TRC_USER>
                        <TRC_TS>20110223153559</TRC_TS>
                        <TRC_COUNTER>99</TRC_COUNTER><TRC_EXTERN></TRC_EXTERN><TRC_REQBASED></TRC_REQBASED><TRC_PPVERS>2</TRC_PPVERS>
                   </sap:TraceContext>
              </sap:Trace>
              <wsa:To soap-env:mustUnderstand="1" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">
                   http://soades.upc.edu:8193/EconomiaFinances/InformacioPersona
              </wsa:To>
              <wsa:From xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">
                   <wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address>
              </wsa:From>
              <wsa:ReplyTo xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">
                   <wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address>
              </wsa:ReplyTo>
              <wsa:FaultTo xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">
                   <wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address>
              </wsa:FaultTo>
              <wsa:Action soap-env:mustUnderstand="1" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://comprovacio.ws.upcnet.com/InformacioPersonaImpl/consultaCNRequest</wsa:Action>
              <wsa:MessageID xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">uuid:4d635ec2-efa7-0022-e100-00009353966f</wsa:MessageID>
         </soap-env:Header>
         <soap-env:Body>
              <n0:consultaCN xmlns:n0="http://comprovacio.ws.upcnet.com" xmlns:prx="urn:sap.com:proxy:EDU:/1SAI/TAS65AC049944F09BF8D2C4:701:2010/02/19">
                   <n0:cn>joan.ayala</n0:cn>
              </n0:consultaCN>
         </soap-env:Body>
    </soap-env:Envelope>
    People from my systems team, told me that if instead of having:
    soap-env:mustUnderstand="1"
    I had:
    soap-env:mustUnderstand="0"
    Then, It would work properly. Does anybody know if it is possible to change this value of the XML ?
    Or any other solution can be helpful. Thanks !!!

    Hi,
    You can not modify the SOAP Request just like that. But it seems that your provider does not understand the WS-Addressing protocol properties. If this is synchrnous WS call ,you can try via soamanager to eclude addressing protocol via SOAMANAGER transaction.
    Find your logical port , go to Messaging Tab and set Message ID Protocol to "suppressTransfer".
    Best Regards,
    Desi

  • Setting HP LaserJet 2200d Duplex Doesn't work

    Machine is fully updated via Software Update as of 7/15/2008 (10.5.4), including the 7/15/08 HP Drivers.
    Printer: HP LaserJet 2200d
    Interface: USB
    Driver: /Library/Printers/PPDs/Contents/Resources/HP LaserJet 2200.gz
    I installed the printer and ensured it is using the correct driver.
    Open the print queue, select Info, select Driver, set the Duplex Unit checkbox and set the RAM to 8-15MB to match printer's 8MB RAM.
    Open any PDF using Preview.
    Command-P to print
    Set pages to print From 1 to 2 (to save resources, has no effect on this behavior)
    Open Layout
    Set Duplex to Long-edge binding
    press Print
    Resulting job is printed single-sided on two sheets.
    I use Preview and PDFs as an example application. Every application I have tried prints single-sided when long-edge is set.
    Interestingly, if I issue the following shell command, duplexing is properly enabled:
    lp -P 1-2 -o sides=two-sided-long-edge samefile.pdf
    Also, when I print to this print queue over the network from a Tiger 10.4.11 machine, duplexing is properly enabled.
    Is there a fix?

    Yes, I was using a "No banner" preset here at home, too. Not exactly sure why.
    Printing using "Standard" then setting two-sided worked.
    Exiting Preview then using "Last Used Settings" also resulted in duplex printing.
    I wonder if this has something to do with a printer preset being migrated from a 10.4 account or something....
    Since deleting that preset, I haven't been able to get it to fail either. Even creating new presets, selecting it, then adding duplex.

  • Email with attachments QPAC: setting "From" using process data doesn't work

    Hi,
    I trying to set the "From" in the Email with attachments QPAC from a process variable, let's call it "mailagent", which is of type xs:string.
    So I use a set value QPAC, which sets the "mailagent" variable to "[email protected]". The workflow then continous with the Email QPAC.
    Which stalls and throws the following exception:
    javax.mail.MessagingException: 501 Syntax error, parameters in command "MAIL FROM:<{$/process_data/@mailagent$}>" unrecognized or missing
    Hrm. I thought, I had already used the Email QPAC this way.
    Is there some kind of magic to apply to the Email with attachments QPAC in order for it to accept process data in the "From"?
    Steve

    Yes, I'm sure, it worked for us to. But it obviously no longer does.
    Yes, "mailagent" definitely is a variable of type string, though it's of type
    xs:string. I'm no longer able to create variables, which don't feature the
    xs namespace. Which is quite confusing as I've got absolutely no idea, what the
    xs is used for.
    We are using LiveCycle Workflow 7.2.1, the Email QPAC is 7.0.2. Is this the latest version?
    Steve

  • After setting the reverse proxy, SSO doesn't work

    Hi,
    We are facing a problem after setting a reverse proxy. ITS&SSO is working fine for internal users but the problem is with the external users;ITS is working fine for external users but SSO is not working. Does anyone can help us out with this problem ? It is kind of urgent.
    Thanks
    Serkan

    Eric,
    Sorry for misunderstanding,
    The domain for internal/external users are the same https://external.global.rexam.<b>net</b>/irj/portal
            internal.global.rexam.net/irj/portal
    But the ITS goes through:
    bca.rexam.<b>com</b>

  • Setting browser.cache.check_doc_frequency = 0 doesn't work

    Setting the value of property browser.cache.check_doc_frequency to 0 has no effect. After restarting my browser all items still coming from the local cache.
    btw. if I set the value to 1, it works as described [http://kb.mozillazine.org/Browser.cache.check_doc_frequency here]

    You can only make that work if you use Clear Recent History to clear the browser cache when you close Firefox.<br />
    That will make it impossible to retrieve the page from the local cache.<br />
    The above mentioned pref only seems to have effect if you visit the website and not when you restore a tab with the page.
    *Tools > Options > Privacy : History: [X] Clear history when Firefox closes > Settings
    *https://support.mozilla.org/kb/Clear+Recent+History

  • Set content type on header doesn't work on servlet filter

    I am trying the following filter:
    chain.doFilter(req, responseWrapper);
    and im trying to set the content type:
    response.SetHeader("Content-Type","text/plain");
    But it doesn't seem to set it.
    I have the wrapper as:
    private ByteArrayOutputStream     output;
         private int                              contentLength;
         private String                         contentType;
         private CharArrayWriter               myOut;
         private int                              mode;
         public JPServletResponseWrapper(HttpServletResponse response) {
              super(response);
              output = new ByteArrayOutputStream();
              this.myOut = new CharArrayWriter();
         public ServletOutputStream getOutputStream() throws IOException {
              this.setMode(2);
              return new JPServletOutputStream(output);
         public PrintWriter getWriter() throws IOException {
              this.setMode(1);
              return new PrintWriter(this.myOut);
         public byte[] getData() {
              return output.toByteArray();
         public int getContentLenght() {
              return this.contentLength;
         public void setContentLength(int len) {
              this.contentLength = len;
              super.setContentLength(len);
         public String getContentType() {
              return this.contentType;
         public void setContentType(String type) {
              this.contentType = type;
              super.setContentType(type);
         public int getMode() {
              return mode;
         public void setMode(int mode) {
              this.mode = mode;
         public String toString() {
              return myOut.toString();
    The page is being displayed as text/html and not as text/plain.
    Is there any reason?

    Hello,
    I think RowOrdinal is the problem. You can try below suggestion:
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/634b3f24-b009-415d-8b45-40c11105b803/bug-in-creating-more-columns-in-sharepoint-list-filters?forum=sharepointdevelopmentlegacy
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • WebService doesn't work

    Hello,
    I've created a WebService and Deployed it succefully.
    The Service appears under System Administration->Stystem Configuration->Service Configuration and it is up and running there.
    The problem is that when I browse to it's wdsl file I receive "Page Cannot Be Displayed". I have verified that the URL is the correct one. What could be the problem then?

    Here is my portalapp.xml for a webservice that I created
    <?xml version="1.0"  encoding="iso-8859-1"?>
         <application>
              <application-config>
                   <property name="SharingReference" value="usermanagement,com.sap.portal.runtime.application.soap">
                   </property>
              </application-config>
              <components>
              </components>
              <services>
                   <service alias="com.sap.portal.prt.soap.UMService" name="UMService">
                        <service-config>
                             <property name="className" value="com.sap.sdn.webservices.UMService">
                             </property>
                             <property name="WebEnable" value="true">
                             </property>
                             <property name="WSDL_RPC_ENC" value="UMService_RPC_ENC.wsdl">
                             </property>
                             <property name="WSDL_RPC_LIT" value="UMService_RPC_LIT.wsdl">
                             </property>
                             <property name="WSDL_DOC_LIT" value="UMService_DOC_LIT.wsdl">
                             </property>
                             <property name="SecurityZone" value="com.sap.sdn.webservices.UMService/DefaultSecurity">
                             </property>
                        </service-config>
                        <service-profile>
                             <property name="SystemAlias" value="Default_System_Alias">
                             </property>
                        </service-profile>
                   </service>
              </services>
         </application>
    I hope this helps
    D

  • If I set a calendar alert it doesn't work !

    Should I expect my iPad to alert me if at the time of the alert it is in standby. Outlook will always show current and / or missed alerts when I first reactivate the application. On my iPad if I am not using it the alert seems to simply be ignored. If this is correct it's a bit rubbish.
    Any comments / advice would be welcome.

    I suspect that you clicked the remember this password in keychain when you set the password. Thus, when you attempt to open the document again in Pages, it knows it is you, checks the document password against the keychain entry, and just opens the document without a password challenge. Anyone else on a different account will be challenged for the password.

  • Setting window.location in javascript doesn't work unless i have an alert

    I am attempting to jump to a new URL from a string that I've patched together in javascript. If I just use window.location = newurlstring firefox just reloads my current page. But it I put an alert after i set the new location, then it jumps. I have a very stripped down version of what I'm trying to do at http://www.secretarea51.com/Searches/search2.htm
    That page has two buttons. Both call the same javascript function but with different parameters. One does an alert after attempting to set the new location, the other bypasses the alert. If the alert is bypassed, all that happens is the current page gets reloaded. If the alert is not bypassed, then the new page does get loaded.
    You can look at the source for the page. I've stripped it down to about the bare minimum that I could to demonstrate the problem I'm having.
    I'm sort of new to javascript, but as best as I can tell, there shouldn't be a difference between the two situations.
    == This happened ==
    Every time Firefox opened
    == ever since I've tried it

    Hmmm... It would seem as though the problem has to do with the type="submit" that I had in the input tags for the buttons. I took that out and now it does the jump with or without the alert.
    Now I've just got to find out how to make it look like a button without the type="submit" in there. But I can do that part.
    You can scratch this from the bug list or whatever this is. Maybe shift it to an oddities list or something because I still don't know why the original behavior would be different whether there's an alert or not.

  • Firefox home page opens with jzip and will not open as google, yahoo, unless manually entered - plus window appears asking to set yahoo as default but doesn't work. t

    I have tried all the home page set-up options without success. I have deleted Firefox and reloaded with no change. The Firefox program will open with no other home page but jzip.com

    Hi,
    The Reset Firefox feature can fix many issues by restoring Firefox to its factory default state while saving your essential information.
    Note: ''This will cause you to lose any Extensions, Open websites, and some Preferences.''
    To Reset Firefox do the following:
    #Go to Firefox > Help > Troubleshooting Information.
    #Click the "Reset Firefox" button.
    #Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
    #Firefox will open with all factory defaults applied.
    Further information can be found in the [[Reset Firefox – easily fix most problems]] article.
    Did this fix your problems? Please report back to us!

  • Print-to-tape from in to out doesn't work

    Hi everybody, I've a 1h45 project and I want to save a copy on a dv tape. I've to cut it in two part in order to print on 2 tapes.
    My problem is that when I set "in to out" it doesn't work, despite of that, when I set "entire project" it works !!!
    steve

    Try it using the Edit to Tape function. Set in and out points and "edit" it to the tape using a bit of black on the head of the tape so you can set an in point on the tape.
    Jerry

Maybe you are looking for

  • Asset Report in BW

    Dear All, I need a help in Developing a BW report, required the functional logic for the same, The report format will be as follows 1. Asset Asset Class / Opening balance   /  Additions  /  Retirement  /   Closing Balance                             

  • Condition record for tax calculation

    hi . how to populate value for condition type MWAS (outputax) where to create?

  • Can I use my Ipad 3 in the USA

    Hello I will be in the states in a few weeks and I want to know if it will be possible to use my iPad with 3/4G ? ( I've bought it in Belguim) WIll I have some problems to connect me ? what kind of prepaid sim card does it exist in the states ? Which

  • Ical 5.0.2 won't let me add an invitee...thoughts?

    I have tried numerous ideas (I'm a basic Mac user), but can't seem to get iCal 5.0.2 (new upgrade for me) to add an invitee successfully.  Thoughts?  Thank you!

  • Actual function of stub in RMI

    Help me about actual function of stub in RMI