Calling external URL with POST data

Hi:
In my action bean I have to call and external URL (outside my domain), and along with this URL 'POST' data. I have tried the following code:
try {
FacesContext lclFC = FacesContext.getCurrentInstance().getFacesContext();
lclFC.getExternalContext().getRequestMap().put("x_loc_zip","94804");
lclFC.getExternalContext().redirect("http://www.mysite.com/personals/search/search.html");
} catch (IOException e) {
throw new FacesException(e);
finally {
lclFC.responseComplete();
This works fine in calling the other URL, but no data is sent thru the post protocol. I have no control to the site I am calling....
I have also tried
ExternalContext ectx = FacesContext.getInstance().getFacesContext().getExternalContext();
HttpServletRequest request = (HttpServletRequest) ectx.getRequest();
HttpServletResponse response = (HttpServletResponse) ectx.getResponse();
RequestDispatcher dispatcher = request.getRequestDispatcher("http://www.mysite.com/personals/search/search.html");
               dispatcher.forward(request, response);
But this tends to put a "/" at the front of the called URL. Can someone please recoomed the coorect way to call a URL from yr action bean and sending it data thru post protocol. I also wish that this new URL should now be displayed within the browser. This is urgent, yr quick reply is appreciated

Myfaces sandbox form gives the ability to change its action url and port. Look here:
http://myfaces.apache.org/sandbox/form.html

Similar Messages

  • ABAP WebDynpro: Call a URL with POST-parameters?

    Hi all,
    I want to call a URL from an ABAP WD method with additional data. I know that this is simply possible via the Window Manager, passing a URL. Adding additional parameters inside the URL is of course also possible using "&" and "?" separators.
    Is it somehow possible to call such a URL out of WebDynpro with additional POST data (e.g. an XML datastream)?
    Best regards.
    Alexander

    Hi Alex.,
    As u said that u know how to call URL and pass parameters using window manager., and i am not sure about XML data stream.!!
    I can advise u to post ur thread here: [Web Dynpro ABAP Forum|Web Dynpro ABAP;
    U will get some useful inputs..
    Thanks & Regards
    Kiran

  • ACE match http url with post data

    I need to make a layer-7 load balancing decision at the ACE module based on a URL string that includes form POST data. It is important that the balancing decision include and parse the part of the URL after the question mark. This doesn't seem to work with the "match http url" config on the ACE. My interpretation is that the ACE does not consider the POST data to be part of the URL string, and therefore does not include it in the regular expression matching. Am I missing something here, or have I run into a limitation of the ACE module?
    class-map type http loadbalance match-any L7__URL_MATCH_CLASS
    2 match http url index.php\?field=content.*

    Hi
    The '?' has a special meaning in the URL. It means the end of the main URL and the beginning of the URL query.
    Its not possible to match ? in the url.
    One option could be using secondary cookie matching in ACE.
    class-map type http loadbalance match-any xyz
    2 match http cookie secondary field cookie-value content
    Thanks
    Syed

  • Linking to external URL using POST from a button in APEX

    APEX Experts
    Does anyone know how to link to an external URL using POST rather than GET behind an APEX button? I'm pretty sure there must be a javascript call but I'm a real newbie to both APEX and Javascript.
    Also does anyone know why APEX decodes an encoded URL before sending it out and how to stop it?
    Thanks
    Deborah

    I did something similar recently but it was in .NET.
    Hopefully someone else here can help you do with Apex and Oracle. I am new to both.
    To POST instead of GET is not as easy as it sounds.
    What I did was open a new window where I outputted a dynamically created form. I would think that you would do that by using the pl/sql web toolkit to call a procedure and output the form using htp.p. You may also be able to do it with Apex (I think they are built using the same tech).
    Basically, your proc would look something like this:
    htp.p('<html><head>');
    htp.p('</head><body onload="document.FORM.submit();">');
    htp.p('<form name="FORM" method="POST" action="www.UrlToPostTo.com" >');
    htp.p('<input name="PostVar" type="hidden" value="' || MyValueToPost || '">');
    htp.p('</form></body></html>');
    So, it creates a html page with a form. When the page loads, it runs the javascript to submit the form to the other site. You can add in as many post items as you need. I marked them as hidden so that the user only sees a blank page briefly before the form is submitted.
    I am sure there is more to it than that, but it gives the general outline of how to post to another site dynamically. Hopefully someone else can fill in the rest.

  • How to changes baseline date in miro with Posting date

    Please tell me the procedure to change the baseline date in miro with posting date (EKBE-BUdat) on basis of  Purchase order No (EBELN) .
    I tried it by using user exit :-EXIT_SAPLKONT_011  Enhancement : LMR1M002 but got stuck somewhere .Please tell me how to work on this .

    hey guys my problem is solved by using a badi  " MRM_PAYMENT_TERMS" .In method "PAYMENT_TERMS_SET" writing the code .

  • Exchange rate not updated with posting date, translation date updated

    Hi,
    I have the follwoing problem in F110. Currency documents are posted with exchange date of the docuemnt entry date. Translation date is updated with Posting date, just exchange rate is not updated. the systems calculates according entry date. Why entry date is one day before the date of posting, I cannot understand. The system takes the exchage date from entry date, which is one day before (docuemnt, posting and translation date)
    Thank you,
    Desimira

    Hello,
    This means, that the exhange rate is missing your local currency vs USD in the system. Your Business Partner or any of items you are adding to the invoice is using USD (price list or customer is in USD).
    My tip is some of the items has USD price set or USD Purchase price used.
    DO the following:
    Check the POsting date of your invoice
    Go to Administration -> Exhnage rate, and locate the posting date and USD from the matrix, and enter the rate.
    Post your invoice.
    it will work
    Regards
    János.

  • Inventory: Movement after count with post date before the count date.

    Hi,
    We have stock movements all the days of the week.
    We conduct physical inventories on Sunday mornings. There are not stock movements on Sunday mornings (stock movements on Sunday starts at night).
    Usually we create the SAP Physical Inventory Document on Fridays, assigning Saturday as the Planned Count Date.
    We enter the SAP Physical Inventory Count on Sunday (at the end of the count) or on Monday.
    How you recommend us to use SAPu2019s Physical Inventory feature in order to calculate the Book Inventory considering all stock movements with posting date less than or equal to Saturday?
    Please, suggest us a solution that If we register a movement after we enter the count but with post date before the count date (and the count is not posted yet), the Book inventory is modified accordingly.
    Thanks in advance for your support!!

    SAP takes the book inventory in the moment you enter the count.
    Best you set  block movements , this block will be removed automatically when you enter the count. So you can prevent users from posting until you have entered the count.
    If you set the freeze book inventory, then SAP takes the book inventory in the moment you create the document.
    This is not a good way if you still have movements after inventory document creation and actual count.
    You have to make sure - organisational  wise, outside SAP - that all movements that happened before inventory count  are posted before you start entering the count. There is nothing in SAP that can help you in this case.

  • Call an URL with ABAP program (Method POST)

    Hi everyone,
      I need to call an URL for example "www.google.com?q=hello" with ABAP using POST method.
      Like the FM "Call_Browser", but my variable q=hello need to be passed with POST method.
    Any idea ?
    Thanks.

    here is one example I use from abap to call a web browser ITS solution with a project number, I guess you can adapt the it for your purpose?
          check <data>-pspid is not initial.
          concatenate gv_pfs_link
                      'zpfs2?~okcode=PROJ_SEL&zpspid=<###>&sel_action=X'
          into lv_url.
          replace '<###>' with <data>-pspid into lv_url.
          condense lv_url no-gaps.
          cl_gui_frontend_services=>execute(
            exporting document = lv_url ).

  • Call external URL from ABAP userexit, capture data and return it to SAP?

    My apologies if this question has been asked before, but I've searched for a few hours today and haven't found anything directly related to my question.  Thank you in advance for any help you may be able to provide!
    I would like to be able to make a call from an SAP userexit during Sales Order Entry in the VA01 transaction in the SD module to an external website, allow the user to capture some data in the external site and then pass that data back into the userexit where I can use it to populate internal tables, etc.
    I'm completely unfamiliar with Web Dynpro programming, but this seems like a good place to start my search for a solution. 
    Does this sound like a problem that can be solved with Web Dynpro and what documentation or code examples should I reference to go about building such a solution.
    I should also note that I'm hoping to build a solution that could be called from any userexit in R/3, SAP ERP, SAP CRM, etc. and would obviously need to learn about what dependencies to consider (ex: SAP GUI version, SAP product release number, Web AS release, etc.).
    Eric

    Thank you for the response.  Let me provide some additional information.
    The external application will be a Hosted Web page.  It is not an SAP system. 
    The external application will be a web page served by a separate system outside of the company domain(shouldn't matter what the technology is I would think - but the web page will be hosted by a different company than the one calling the URL) that would appear as a web page in which the user will enter data, logic will be performed on that data and then some or all of the data would need to be passed back to the calling point in SAP.
    For practical discussions it doesn't matter to me if the call in ABAP occurs in an SD userexit, in a custom report, in an HR screen or in a CRM business partner screen.  There will be many places where this external application may be called from and I'm just trying to figure out how to call an external HTTPS URL and return data from that web page to the calling point in ABAP.
    I hope that clarifies my question.
    Thanks!
    Eric

  • Calling External WebService to send data from SharePoint O365 Aspx page

    Hi ,
    There is a Public Website on O365 environment. which has  Apply Now Page on this User enters Name, email and Message and click Submit button., we want to pass these  All three fields data value  to External WebService , Which is
    developed in Asp.Net,
    Please suggest Best approach which will work in SharePoint O365 , to call Webservice and  pass the User entered data.
    Also Share reference code and Links.
    With Regards

    Hi Genius,
    Thanks for posting your query, Kindly browse the below mentioned URLs to get the code for posting data on extranal web Service
    http://blogs.msdn.com/b/sharepointdev/archive/2011/05/12/connecting-to-sharepoint-online-web-services.aspx
    http://blogs.msdn.com/b/cjohnson/archive/2011/05/14/part-2-headless-authentication-with-sharepoint-online-and-the-client-side-object-model.aspx
    I hope this is helpful to you, mark it as Helpful.
    If this works, Please mark it as Answered.
    Regards,
    Dharmendra Singh (MCPD-EA | MCTS)
    Blog : http://sharepoint-community.net/profile/DharmendraSingh

  • Call OAF page with post parameters

    Hi,
    From a custom OAF payment screen, on button click, I'm opening a third party website in the same window.
    Once payment is done, third party will send me conf num back as the background process (user is still in third party website).
    For this post back purpose, I have created a simple OAF page and given the OAF url to third party.
    https://xxx-dev:85/OA_HTML/OA.jsp?page=/xxx/oracle/apps/xx/webui/PostbackPG&confNum=
    However, third party refused to use this url as it is a html get. They send return values (conf num) only by html post as security measure.
    Is it possible to use OAF page to get post requests? If yes, please let me know how to call OAF page with a post and how to get values in PR of CO.
    Thanks
    Prabhu

    Any ideas please!

  • Call a method with complex data type from a DLL file

    Hi,
    I have a win32 API with a dll file, and I am trying to call some methods from it in the labview. To do this, I used the import library wizard, and everything is working as expected. The only problem which I have is with a method with complex data type as return type (a vector). According to this link, import library wizard can not import methods with complex data type.
    The name of this method is this:   const std::vector< BlackfinInterfaces::Count > Counts ()
    where Count is a structure defined as below:
    struct Count
       Count() : countTime(0) {}
       std::vector<unsigned long> countLines;
       time_t countTime;
    It seems that I should manually use the Call Library Function Node. How can I configure parameters for the above method?

    You cannot configure Call Library Function Node to call this function.  LabVIEW has no way to pass a C++ class such as vector to a DLL.

  • RE:Need data vendor no with posting date

    Hi All,
    one of my user requires the data of the GR report with vendor no and posting date data to analysis the batch job.kindly anyone can help me from were i can fletch the data i had tried in MKpf i can get the posting date data but when comes to vendor i can't able to get the data of the GR done for the particular vendor on the particular date.kindly help me out.
    Thanks in advance.

    HI,
    Why you are not using MB51 report ?
    Go to MB51
    Here enter Vendor ,Movement type 101 ,Posting date ( Plant ,material if you want )
    You will get all the desired data
    Edited by: redriver on Dec 22, 2011 12:12 PM

  • Calling external URL defined by Transaction launcher

    Hi Experts
      I'm calling the external URL customized through Transaction launcer using the below code when the button is clicked
       lv_navigation = cl_crm_ui_navigation_service=>get_instance( me ).
       lv_navigation->navigate( iv_link_id = 'ZTL_TEST' ).
    Which is working fine when it is in web ui context, when I Implemented the same code for interaction center (role : ic_agent)
    it was not working  .
    I'm not getting what is went wrong, is the coding will get changed depends on Interaction center and web ui
    Thanks & Regards
    Madhu

    hi glenn
    Thanks for your reply, actually my issue is not that , it is working fine if we are triggering from navigation bar in  interaction center, but I want to trigger programatically from interaction center which is working fine in web ui using the above code but the same code is not working from interaction center view bupadetailb2b
    Thanks & Regards
    Madhu

  • Issue with Posting Date in F.05 - Foreign Currency Revaluation

    Hi All,
    We have a problem with the US-GAAP Foreign currency revaluation run which we're doing every month.
    Although the posting date is entered correctly (for this month as 30.09.2011), the postings that are created have the posting date of 31.07.2011. But the reversal date is right (01.10.2011).
    Could you please explain why wrong date is appearing.
    Thanks IN Advance
    Regards,
    Payal Saxena

    Hi,
    Have you scheduled any batch job to carry out the Foreign Currency Valuation? If yes, then check the variant which has been created for the program. There the posting date might have been entered as 31.07.2011. Dynamic date calculation must be maintained for the posting date.
    Thanks,
    Aman

Maybe you are looking for

  • Aging Analysis report for open Items in SD

    Hi , Please give the code snippet for the following case. aging analysis program for open items:- payments not receivecd for 15 days,30 ,60 ,90days imput: custno range sales area days 30,60,90 selection sort by cust no,sales organization output :repo

  • How to assign a default value to a column ?

    Hi In the Object browser is it possible to modifiy a column in order to assign a defalut value to the column ? I have a table FICHE in which I want to assign a default value 0 to a column which type is NUMBER. Thank you for your kind answers. Christi

  • Why does safari 5.1.3 reset after quit, after updating to Mac OS X 10.7.3?

    I updated to 10.7.3 today and I set Safari up. I turned off my computer and later when I turned it back on Safari was completely reset and all the settings I had set were gone. This also happens when I quit or exit out of Safari too. What is the prob

  • Problem with mail after downloading lion

    i just loaded lion.  opened mail, i have new messages however they will now open in the reading pane "loading"

  • Export map to Excel dates issue

    Hi, I created an export map exporting several dates fields. the problem is that the format is not the same: Finish date format was: dd-mm-yy Finish1 date format was: mm-dd-yy in MSP itself I see both formats the same (dd-mm-yy) Please help. Thank you