How to acess HttpServletContext from webservice ?

Hi Folks,
Does anyone has any idea, how to get access to HttpServletRequest from webservice.
My webservice is designed as collection of Java Classes.
Main classes are:
1. MyServiceIF - This class defines methods that are exposed over webservice, and can be called by Remote Clients.
2. MyServiceImpl - This class implements all methods defined in MyServiceIF.
I then use wsdeploy.bat tool from JWSDP to generate ties, wsdl file and deployable WAR file.
Thanks & Regards,
Arun Gupta

Hi Jena,
with this "string received" you can do whatever you like:
- write to a text file
- convert to a number (you should know the format of the string from the manual) to do comparison to limits or some plotting
- you may even compare this string with a given one to check for certain values
To convert strings to number you will find several functions in the string palette. Pick the appropriate one...
To do comparisons you have a full palette of functions...
Why are you "unsure of how to access it"? You already have the string in an indicator
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome

Similar Messages

  • How get java Object from webservice

    Hai
    i gave ArrayList<bean> , i can't get this ArrayList<bean> from webservice. How can i get ? via for each or iterator or any ?????
    Note: i iterated  but only one element was come from bean property  using next() of iterator .
    I need all property. any one please help.
    thanks
    Mr...Javan

    Try to return an Array instead of an ArrayList?
    Have a look at http://forums.sun.com/thread.jspa?forumID=331&threadID=5289022.

  • SAP Web Repository, how can acess it from outside

    I'm reading this http://help.sap.com/saphelp_sm40/helpdata/en/14/030fc5b63f11d5993900508b6b8b11/content.htm
    and it says this:
    "You use a Web repository (manager) to provide read access to documents stored on remote Web servers."
    This could be really useful to me, but how does this work? I'm able to add objects to it using the transaction SMW0 but how can I get a valid url so that the users in my network can acess these files.
    the only FM I know is 'DP_PUBLISH_WWW_URL' but this generates a kind of links that my browser can't process (something like SAPR3://WebRepository/0123456789/ZMY_FILE?Version=00001")
    How can I do to create valid links to these documents, so that I can open them im my web browser??

    though they have the same name, they are different! The SAP library you mention is about Knowledge Management.
    If you want to generate an external URL for the Web Repository (SMW0), first read Note 865853 - WebReporting/WebRFC obsolete as of NW2004s. I don't know your SAP release, but if you are on a 7.0, you need to "release for internet" WWW_GET_MIME_OBJECT function module via SMW0, and probably activate /sap/bc/webrfc service using SICF transaction. Then you'll be able to access your ZZZZZ web document using URL like this: http://youserver:port/sap/bc/webrfc/!?_function=WWW_GET_MIME_OBJECT&_object_id=ZZZZZ&client=220&language=EN
    Note: DP is only for allowing the HTML browser (and other SAPGUI controls) to access objects transmitted from SAP to the SAPGUI using the Data Provider service.
    Edited by: Sandra Rossi on Jun 30, 2010 10:45 PM CET

  • How to return xmlType from Webservice generated with JDev and PL/SQL

    Hi,
    I have generated an PL/SQL package that's returning a value as xmlType.
    With JDeveloper I'm deploying this package as a webservice. When invoking the webservice from a webbrowser the result looks like:
    <?xml version="1.0" encoding="UTF-8" ?>
    <SOAP-ENV:Envelope
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <SOAP-ENV:Body>
    <ns1:testXmltypeResponse
    xmlns:ns1="http://app/webservice.wsdl"
    SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <return xsi:type="xsd:string">
    <ROWSET>
    <ROW>
    <TODAY>12-OCT-07</TODAY>
    </ROW>
    </ROWSET>
    </return>
    </ns1:testXmltypeResponse>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    The problem is that the <return> tag contains 'xsi:type="xsd:string"'. And now the webservice response is not valid XML because the return value contains XML and not a string.
    The solution would be, when invoking the webservice if the xsi:type would be missing from the result tag or would contains xsd:any. I tried editing the WSDL in JDeveloper and changing the type to xsd:any. After deploying and calling the WSDL from the webbrowser it contains this type. But when invoking the method from the webbrowser it still returns xsd:string as type.
    How can I get rid of this type in the <return> or change it.
    My JDeveloper version is 10.1.3.3.0 The Oracle database and 9iAS are 10.2.
    Thanks in advance,
    Thijs

    What version are you on?
    Works fine for me on my 11g:
    SQL> create or replace procedure testxml (clob_out out clob)
      2  is
      3     l_clob   clob;
      4     l_ctx    dbms_xmlquery.ctxhandle;
      5  begin
      6     l_ctx := dbms_xmlquery.newcontext ('select * from dual');
      7     l_clob := dbms_xmlquery.getxml (l_ctx);
      8     clob_out := l_clob;
      9     dbms_xmlquery.closecontext (l_ctx);
    10  end testxml;
    11  /
    Procedure created.
    SQL>
    SQL> variable vout clob;
    SQL>
    SQL> exec testxml (:vout)
    PL/SQL procedure successfully completed.
    SQL>
    SQL> print vout
    VOUT
    <?xml version = '1.0'?>
    <ROWSET>
       <ROW num="1">
          <DUMMY>X</DUMMY>
       </ROW>
    </ROWSET>But definitely you can optimize your proc a bit: Try
    create or replace procedure testxml (clob_out in out nocopy clob)
    is
       l_ctx    dbms_xmlquery.ctxhandle;
    begin
       l_ctx := dbms_xmlquery.newcontext ('select * from dual');
       clob_out := dbms_xmlquery.getxml (l_ctx);
       dbms_xmlquery.closecontext (l_ctx);
    end testxml;
    /

  • How to display response from webservice in second view?

    Hello,
    I would like to develop an application which should do a webservice request from one view and displays the result on another view. How can I do this? Is there an example how to do this?
    Thanks in advance.
    Kind regards,
    Carsten

    Hi Carsten,
    let view VA be the requesting view, VB the view to display the response and RCC a custom controller which is used for actually performing the request and "owns" the Web Service model, then you need the following:
    1. VA has a context node with attributes mapped to the request-attributes of the model. If necessary, some UI elements may be bound to these request attributes. For triggering a request, there's an additional button.
    2. VB has a context node mapped to the response/result node of the WS model. There could be a table bound to the node in case of multiple possible results.
    3. RCC imports the Web Service model and acts as the service controller (you can use Apply template->Service controller to achieve that) and provides a method "executeXXX" to call the Web Service.
    If the button in VA is pressed, executeXXX is invoked, the service is called using the current contents of the request attributes of the model, results are stored in the response/result node. Invalidating the node will display the result(s) in VB.
    Hope that helps.
    Regards
    Stefan

  • How to read response from WebService call

    Hi,
    I am consuming webservices in ABAP. I got proxy classes created. Port is also created.
    I am calling classes generated by proxy in ABAP. Classes creates few structure by system. when i make a call to service, I am not getting importing values in veariables declared. Trace file (in SOAMANAGER ) shows call successful & XML file shows the correct response values, but are not appearing in program variables. I declared variables of same type generated by system.
    My question is, am I missing any step.configuration? or how to read the variables?
    Thanks in advance.
    Sunil

    You coud create a procedure like this:
    CREATE OR REPLACE PROCEDURE soap_env_pr (p_soap_env IN VARCHAR2)
    IS
       v_start     NUMBER;
       v_end       NUMBER;
       v_message   VARCHAR2 (400);
       v_length    NUMBER;
    BEGIN
       v_start := INSTR (p_soap_env, '<ns0:Ok>');
       v_length := LENGTH ('<ns0:Ok>');
       v_end := INSTR (p_soap_env, '</ns0:Ok>');
       v_message :=
              SUBSTR (p_soap_env, v_start + v_length, v_end - v_start - v_length);
       HTP.prn ('Ok: ' || v_message);
       v_start := INSTR (p_soap_env, '<ns0:SessionNumber>');
       v_length := LENGTH ('<ns0:SessionNumber>');
       v_end := INSTR (p_soap_env, '</ns0:SessionNumber>');
       v_message :=
              SUBSTR (p_soap_env, v_start + v_length, v_end - v_start - v_length);
       HTP.prn ('SessionNumber: ' || v_message);
       v_start := INSTR (p_soap_env, '<ns0:ErrorMessage>');
       v_length := LENGTH ('v_length');
       v_end := INSTR (p_soap_env, '</ns0:ErrorMessage/>');
       v_message :=
              SUBSTR (p_soap_env, v_start + v_length, v_end - v_start - v_length);
       HTP.prn ('ErrorMessage: ' || v_message);
    END;and call it like this:
    BEGIN
       soap_env_pr
          ('<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Header/>
    <env:Body>
    * <invokeScenarioResponse xmlns:ns0="xmlns.oracle.com/odi/OdiInvoke/" xmlns="xmlns.oracle.com/odi/OdiInvoke/">*
    * <ns0:Ok>true</ns0:Ok>*
    * <ns0:SessionNumber>2223201</ns0:SessionNumber>*
    * <ns0:ErrorMessage/>*
    * </invokeScenarioResponse>*
    </env:Body>
    </env:Envelope>'
    END;That would give you this output:
    Ok: true
    SessionNumber: 2223201
    ErrorMessage:Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • How to update the Sent Idoc Status based on the Response From Webservice

    Hi All,
    I have to develop Idoc--SOAP Sync Process Scenario Using BPM .
    I have configured every thing using BPM and mapped
    MATMAS----SOAP Request
    SOAP Resp----STATUS.SYSTAT01
    In R/3  the Main Idoc Number(MATMAS) Status needs to be update , but it is creating the new Idoc with STATUS.SYSTAT01.
    I have used STATUS.SYSTAT01 Idoc to Update the status of the Original idoc based on the Response that is coming from webservice .
    I was posted the same thread a days ago and there Bhavesh suggested me some sugessions.
    How can we make the status of the Idoc based on some response Text
    iam unable to follow OR not able to clear my self on this.
    Please suggest me or give some over view kind of thing on this
    Regards

    Hi Suman,
    It is clearly mentioned in SAP help that "SAP Intermediate Documents (IDOCS) are EDI like documents that are asynchronous in nature."
    So Your Scenario is Asynch(receive) - Synch(WS call) -Transformation (Multimapping)- Asynch(Send to R/3).
    now go in this way:
    you can develop all the message Interfaces  of  Abstract catagory (not manditory )
    MI_AA_MATMAS   -> Abstract Asynchronous message    interface for your Matmas IDOC
    MI_AS_SOAP_ReqandResp  -> Abstarct Syncronous MI for SOAP request and response.
    MI_AA_STATUS ->Abstract Asyncronous MI for Status Idoc
    MI_AA_SOAP_Req ->  Abstarct Asyncronous MI for SOAP request .
    MI_AA_SOAP_Res ->  Abstarct Asyncronous MI for SOAP response .
    Thats all in Message interface.
    your first reciever :
    (This will receive the message asynchronously from R/3)
    create a conatainer varaiable (say preceive) and assign it message interface MI_AA_MATMAS
    Now in thw Propert TAB of this step: give this message name.
    Step2: Synchronous call :
    create container Variable psoaprequest and psoapresponse  give abstract message interface MI_AA_SOAP_Req and MI_AA_SOAP_Req  resp.
    Now in thw Propert TAB of this step:
    Synchronous Interface : MI_AS_SOAP_ReqandResp
    Request Message : psoaprequest
    Response Message: psoapresponse
    Transformation Step :
    Here you will specify Interface Mapping that will conatain Multimapping between Synch Response - MATMAs and STATUS
    Let's name it as IM_ResandMatmasToStatus
    create a container variable as pstatus and assign it abstract interface MI_AA_STATUS.
    In Property pan of this step :
    Interface mapping :IM_ResandMatmasToStatus
    Source Message :psoapresponse
                                preceive
    (IT will ask you for two source messages as IM selected in this transformation has 2 source messages)
    Target Message :pstatus
    Send step:
    Select a message as pstatus.
    thats all in IR.
    If have doubt in ID just let me know.
    Thanks
    Sunil Singh

  • How to execute an internal WebService from CRM On Demand?

    Hello,
    I would like to know how to execute an internal WebService, for example Contact's WebService, from CRM On Demand?
    I have seen in the online documentation:
    "An integration event is a mechanism for triggering external processes that are based on changes (create, update, delete, associate, dissociate) to the records in Oracle CRM On Demand.
    You can specify which fields on a record that you want to track. If your company wants to use workflow rules to create integration events, contact Customer Care to request support for Integration Event Administration and to specify the total size of the integration event queues that you require".
    I have this option activated. In fact, I have tried to create a workflow rule to assign an integration event to call the WebService process, but I couldn't do it...
    Thank you and regards.

    Hi, sorry for the late answer. I now understand what you are trying to do, it is an automatic approach so you will need to use integration events.
    So if custom object 2 field is changed you have to generate an integration event with a workflow that triggers when modified record is saved. The event should be transfered to the queue you defined.
    What you need is an external componenet e.g. java component that is running in an application server and polls every (let's say 30 seconds for events in the queue. If there is an event in the queue you will need the custom object 3 Id and the value for the field you would like to update and afterwards you can update the related customonject3 record with a ws call.
    If you use java you can start the timer with a servlet lifecycle event (when application is up start the timer for polling)
    Best Regards
    SL

  • How to acess windows share from Ipad ios 7

    how to acess windows share from Ipad ios 7

    Download an app from the AppStore that provides this functionality. Search for 'access Windows share' for some options.

  • How to do nating in isa570 and is routing to be enabled for that . I have static ip configured and pining at my office and i want to acess rdp from my home

    How to do nating in isa570 and is routing to be enabled for that . I have static ip configured and pining at my office and i want to acess rdp from my home

    HHow did you export? Did you use H.264? Hour and a half is going to be a big file. For your customers sake you might consider breaking it down into segments.

  • How can i return an object isn't java object from webservice????

    Hi !
    I have a problem in my Project. When i call method return a java object from webservice , it 's too easy. But when i create my own object (ex:ClientRequest.class) , it doesn't work exactly T_T . When i return that object (on client, doesn't have ClientRequest.class) , i cann't access its static variables.
    How can i do it ??
    Please help me !
    Thanks a lot !!!!!
    class ClientRequest {
    public static int i;
    public static String s;
    public ClientRequest() {
    }

    You can use REFCURSOR type for this. In java SQL TYPES this is available too. In your PLSQL use REFCURSOR for that array and then take the same from java code. Look in the servelet programming book for this SQLTYPE and see PLSQL for handling refcursors. We have done this way and it works.

  • How to call XI exposed webservice from J2ee

    How to call XI exposed webservice from J2EE , and how to pass UserID and Password to it.

    hi sapuser,
    i do not know on which j2ee stack you currently run. Description Link comes from CE:
    // consuming webservices in j2ee
    http://help.sap.com/saphelp_nwce10/helpdata/en/46/a95353005d371ae10000000a11466f/content.htm
    // user & password
    configure the client in the nwa by changing logical port settings:
    http://help.sap.com/saphelp_nwce10/helpdata/en/46/a86ac5f9ee371ce10000000a11466f/content.htm
    Regards, Jens

  • How to refresh AdvancedDataGrid in flashbuilder 4, getting data from webservice

    I have tried many things like below to get my grid updated when it gets data from webservice ,
    myGridName.ValidateNow(),
    myGridName.InvalidateList(),
    if(myGridName.updateCompletePendingFlag)
    the problem is I have two buttons that can show hourly, and daily data in one grid, when activating daily button, I got the data in the grid but with delay of maybe 2 to 5 seconds(to get data from webservice) and within this period if user clicks on hourly button, to see the hourly data, then user will see the daily data attached to the end of the hourly data in the grid, please notice that there is just one grid. the problem is I don't know how much to wait for the first set of data to show up on the grid (daily data) and then enable all other buttons so user can only just choose Hour button when all the daily data has been shown in the grid, so when user click on hour button, the daily data will not attached to the end of hourly data in the grid.
    any help is appreciated

    Thanks for the answer,
    I do disable other controls when one of the buttons are clicked and waiting for the data, and  in my retrieved data function from webserver , at the very end after I retrievd all the data from webserver and add it to the dataprovider of the grid, I enable all the controls, but the problem is in reality , I see that all other controls are enabled sooner than I see the data show on the grid, and because of that user can think there is no data in the grid and click on the hour buttons , causing that  the daily data to be attached to the hourly data in one grid.
    I appreicate if you could still help me

  • Adf11g how to open pdf or html files from  webservice

    hi all,
    adf11g how to open pdf or html files from webservice .

    Hi,
    This is standard functionality, that you can read more about in the OLM User Manual. You can upload the files to an OLM content server or to any other content server that can be accessed with a URL.
    Regards Anders Northeved

  • How to select data from structure

    how to select data from structure

    Hi Laxman,
    Structure holds single record of data. You can acess data by using the syntax <b>Structure-field</b>
    Please see sample.
    data: wa_mara  type mara.
    select *
              from  mara
              into wa_mara
              up to 1 rows.
    endselect.
    write:/ wa_mara-mandt,
             wa_mara-matnr,
             wa_mara-maktl.
    if helps plz reward points.
    Regards
    Bhupal Reddy

Maybe you are looking for

  • Organizing music in iTunes

    Hello- I apologize if this question has been posted in the past, but I'm having a difficult time successfully searching the thousands of threads here. I am a new iPod owner (80gb) and am trying to organize my music. I am running Windows XP and have m

  • ITunes 7 - slow for other people also?

    Has anyone's computer gotten slower/delayed since installing iTunes 7? My iMac G5 seems a lot slower, not to mention the new iTunes itself is really sluggish. It isnt necessarily slow, but compared to the older iTunes, its very slow. Plus the cover a

  • Exporting webpages as pdfs? Losing pages?

    Okay, I often open webpages on my Mac in Safari, and either export or print them to pdf to read on an e-reader, a Story HD. The pdfs look fine on my Mac in Preview, but they sometimes get cut off partway through, leaving blank pages thereafter, on th

  • JS CS2 Call out specific image in script

    I've never had to do anything with images in scripting, and I'm unclear whether I need to use "links", "images", "graphics"...so I came here. For everything I've found here so far, people are dealing with all images in a document. I just want to perf

  • E63 Phone failed

    While updating my phone software the Nokia Ovi suite (latest version) crashed on my windows 7 computer. So in this moment my phone does not start and the ovi program and the nokia software updater program does not find the phone. What can i do? Thx