How to access HTTP Header from within Web service?

Hello,
Is there a way to access HTTP header variables like CONTENT_TYPE, CONTENT_LENGTH from within Web Logic web service.
I was able to get the HTTP header variable from within Apache AXIS services by calling context.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST
How can i do this from weblogic web service.
I need this to verify the client SSL_CLIENT_DN
In access I can get the header as follows.
HttpServletRequest req = (HttpServletRequest) context
          .getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST);
clientID = req.getHeader("SSL_CLIENT_S_DN_Email");
Thanks
--Arun                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

hi
the following link may helpful to you
http://e-docs.bea.com/wls/docs81/webserv/anttasks.html#1111537
Regards
Prasanna Yalam

Similar Messages

  • Accessing JAXR registry from within web service

    Hi I'm having trouble accessing the registry from within a web service running in the tomcat server.
    The service should register with the registry at startup, but in the logs from the tomcat server I can see that a JAXRException is thrown:
    javax.xml.registry.JAXRException: Unable to create ConnectionFactory: Provider com.sun.xml.registry.common.ConnectionFactoryImpl not found
         at javax.xml.registry.ConnectionFactory.newInstance(Unknown Source)
    If I run the program from outside the tomcat server as a standalone program, it registers perfectly.
    I believe the problem is that it is missing one or more jars.
    I have tried to put the jaxr-jars under shared/libs but that hasn't solved the problem.
    Has anyone an idea of what I'm doing wrong?
    Help is greatly appreciated!
    / Bo

    Hi swatdba
    I know that the build file states alle the packages that I need, and as I said, if I run my program like the regular JAXR examples, it works fine.
    The thing is, the JAXR examples are not web services on their own. They are merely Java programs that access the registry.
    In my case I am building a web service that should run in the tomcat server. When it initialises, it should register with the register, and also be able to search for other web services.
    I thought this would be possible per default, ie. the jars that the web service needs should already be available in the tomcat server, but it doesn't work. I have tried to put the jars that I've found in the build script in the folder C:\jwsdp-1.3\shared\lib, which according to the tomcat manual should be used to put jars that you want to share between your web services.

  • How to access HttpRequest Object from Axis web service?

    Hi all,
    I have Axis web service named shoppingcartService,
    and i have ShoppingCartImpl as implemention class which
    implements passfamily() method
    When client access my web service, ShoppingCartImpl's passFamily method is executed.
    I have one more servlet under my axis web application which implements business logic.
    problem is that i want to call/invoke this servlet from passfamily method of ShopingCartImpl class.
    So how can i call/invoke servlet from passFamily method of ShoppingCartImpl class ?
    (All stuff is under Axis web application under Tomcat).

    hi
    the following link may helpful to you
    http://e-docs.bea.com/wls/docs81/webserv/anttasks.html#1111537
    Regards
    Prasanna Yalam

  • How to access application state from stateless web service?

    I have a beginner J2EE question. After reading through J2EE tutorial, I still don't know how to create an application that would run on J2EE server, and which would have a web service interface to other world, and which would have several threads running, which would connect to other enterprise applications via TCP? Because if I understand it correctly, web service requires a stateless session bean, which means that it can't access any stateleful session bean (except always create one and remove it instantly). So there seems to be no way to store application state and have running threads.
    I'm asking this because .NET seems to have a very simple Application dictionary, which can save all application objects, including threads, and it is very easy to access this Application state from a stateless web service. Isn't there any similar functionality in J2EE? And if not, how it should be done in Java world then?
    I guess that the Connector architecture could be the solution, but it is not documented in the tutorial.

    There's nothing in the J2EE spec that says that you have to use Web Services. Web Services by definition are stateless.
    If your requirements are that you have to use a session bean along with a Web Service, then the architecture needs to be rethought, because it doesn't seem to me that Web Services are what you want.
    That said, you can use a hybrid. You can expose some of the functionality of your application as Web Services while the remaining is implemented in a classic J2EE type framework that is stateful.
    I would also think that you could store your application state via entity beans. You could save and load them when the web service is accessed. An entity bean doesn't require a database... just some form of persistence (could be an XML file for instance).
    You need to decide which components of J2EE make sense when and where.

  • How to retrieve the HttpSession from Axis Web Service

    hello,
    How can I get the HttpSession in Web Service ???
    Eric

    Hi,
    I have generated the java classes from a WSDL using WSDL2Java using the following command line options.
    java -classpath .;%AXISCLASSPATH%;%CLASSPATH% org.apache.axis.wsdl.WSDL2Java -s -S true -d Session -Nhttp://localhost:
    7001/axis=samples.grapha -a samples\grapha\grapha.wsdl
    I need to retrieve HTTPSession in the generated GraphASOAPBindingImpl class. Can you help me?
    Thanks,
    vc

  • HTTP connection from OSB web service to external system via a Proxy Server

    Dear experts,
    May I know has anyone tried to use HTTP protocol to send a request from OSB web service to external system via a proxy server? Heard that we need to establish some sort of tunnel (socket) to talk to Proxy Server. Can you please any have sample code or configuration steps to share?
    Thank you very much!!

    http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/consolehelp/global_resources.html#wp1137294
    Adding Proxy Servers
    Use the Summary of Proxy Servers page to add and configure Proxy Server resources and make them available in Oracle Service Bus as a system resource. You must be in an active session to configure or reconfigure Proxy Server resources.
    1. If you have not already done so, click Create to create a new session or click Edit to enter an existing session. See Using the Change Center.
    2. Select System Administration > Proxy Servers.
    3. Click Add.
    4. In the Name field, enter a name for the Proxy Server resource. This is a required field.
    5. In the Description field, enter a short description for the Proxy Server resource.
    6. In the Host-Port Parameters section, enter the following information:
    1. In the Server Host field, enter the host name or IP address of the Proxy Server. This is a required field.
    The Server Host name for the Oracle Service Bus proxy server must be identical to the server host name of the actual proxy server.
    2. In the Clear Text Port field, enter the Proxy Server clear-text port number.
    3. In the SSL Port field, enter the Proxy Server SSL port number. You must enter either a clear text or SSL port number.
    4. Click Add.
    You can configure multiple Proxy Servers for each Proxy Server resource. This enables Oracle Service Bus to perform load balancing and offer fault tolerance features for the Proxy Server resource.
    7. If the Proxy Server performs proxy authentication, enter a user name in the User Name field, and the associated password in the Password and Confirm Password fields.
    These fields are optional, and required only if the Proxy Server is secured.
    8. Click Save to create and save the Proxy Server resource in the current session.
    9. To end the session and deploy the configuration to the run time, click Activate under Change Center.

  • How to access a variable from within a symbol.

    How do I access a variable set outside a symbol from within that symbol?
    Thanks

    If you set a variable on stage ,say
    sym.setVariable("stageVariable", "I am stage variable");
    You can access it from within  a symbol using :
    var myVariable = sym.getComposition().getStage().getVariable("stageVariable");
    Basically you need to get handle to the symbol in which the variable is defined.

  • How to read http  header from Forms

    Hi,
    I have a forms application deployed on 10g AS. We are planning to integrate Oracle Identity management with our forms application. Currently, I access my forms application with an url, say http://hostname/forms/frmservlet?config=test. And, I get a Signon form, where I capture the logon and pwd, and specific to the user credential, I show another form. By integrating my appln with Identity management, I would be protecting my resource in the oracle access system, the WebGate component will do the backend authentication process along with the access server and the directoy service. Upon successful authentication, the DN form the LDAP repository (lets say the userid of my forms application) for the user is returned to the WebGate as http header information/cookie by the Access System. Now without altering the code in frmservlet Servlet, I need to capture the http header info (which contains the userid for the forms application of the user) in my default Signon form. How can I capture this?
    Can someone please help
    Regards,
    Suresh

    hi
    the following link may helpful to you
    http://e-docs.bea.com/wls/docs81/webserv/anttasks.html#1111537
    Regards
    Prasanna Yalam

  • How to use generated code from "Import Web Services" with Cairngorm Framework

    I recently downloaded Flex Builder 3 beta 2 and tried out the
    wizard that lets you import web services. The code that is
    auto-generated makes if fairly straight forward to consume web
    services using the object types defined in the WSDL. No longer does
    the developer need to decode the XML payload! The only problem I am
    having is how does you integrate the auto- generated code with the
    Cairngorm framework? This seems like a huge question for anyone who
    might want to leverage Cairngorm and the auto-generated proxy code
    in the same project (like me).
    Here are the problems that I see so far.
    1) How do you configure the generated service class to work
    with the Cairngorm service locator? The service constructor only
    accepts a “LCDS destination string” which implies that
    you must use Lifecycle data services. Unfortunately, the project I
    am trying to retrofit currently uses a WebService and does not use
    data services. All I really need to do is change the endpoint URL
    (ie from local to a development server). This issue is noted in the
    bug https://bugs.adobe.com/jira/browse/FB-8456. What I think is
    needed is a way to set the endpointURI in the Services.mxml file.
    2) Even if I come up with a hack around #1, I do not receive
    a callback to my IResponder even though I register it immediately
    after the method call. I can register and listener function within
    my business delegate and receive the callback, but my Command
    object, which implements IResponder, does not receive the call back
    even though it is registered. From what I read in the ASDocs it
    should but it doesn’t for me!
    These are the issues I have observed in 3 hours of messing
    with this. I hope this makes sense. I would love to integrate
    auto-generated web service proxies into Cairngorm but I don’t
    see a straight forward way without re-architecting Cairngorm. Has
    any one else run across this issue? If so, do you have any insights
    on how to proceed? Any help is appreciated.

    Since I posted this question, I have abandoned the notion of
    auto-generated web services and embraced the good old FDS concept
    where the RemoteObject meta-tag does all the conversion work for
    me. We are now using the Granite DS package and it is working well
    for us. I would love to consume web services, but it just isn't
    worth the hassle when all you have to do with Granite (and FDS) is
    cast your return objects to the proper object type.
    BTW, since this posting, I have investigated competing Flex
    app frameworks. After my research, I checked out the PureMVC
    framework. Wow!! Cairngorm always left me with an uneasy feeling
    and I guess I am not alone. Apparently, Cliff Hall felt the same
    way. That is why he started the project. I like his approach alot
    more than Cairngorm especially since it includes notifications
    which allow me to broadcast my own app level events independent
    from the AS Event framework. Check out PureMVC. For what it is
    worth, it has my humble endorsement. Cliff was even gracious enough
    to acknowledge the other Adobe Consulting guys for their work. Good
    for you Cliff, I respect that. Check out a better way at
    http://www.puremvc.org/

  • How to pass Security Header from the Physical Service in ODSI

    We have to call a secured Web service using ODSI. We are trying to build a physical service in ODSI using a WSDL which has username token with password text policy inside it. The requests to that web service are bound by the security policy. But ODSI is not allowing us to create a Physical service usin a WSDL with a security policy in it. How can we then pass the security header from the ODSI physical service to the external web service.

    You would need to write a webservice handler for your physical data service to implement the security.
    http://download.oracle.com/docs/cd/E13162_01/odsi/docs10gr3/datasrvc/How%20To%20Create%20SOAP%20Handlers%20for%20Imported%20WSDLs.html

  • How to add "Prepare Data" from a web service to the form

    Hello,
    Can any one please advise on how to add the "Prepare Data" process from the existing web service and have the form to pre-populate the data from this "Prepare Data" process instead of using schema xsd. I heard that this is an alternative or may be a better way to pre-populate data in ES2/ES3 to avoiding creating a data source in Form Designer. I try to find a sample on Adobe site but could not find one, most of them are using schema.
    Any guidance or URL to the sample would be helpful.
    Thanks,
    HD

    Thanks

  • How to forward security credentials from one web service to another

    Here is what I am trying to do... I have a standalone client that invokes a message-level secured web service (WEBSERVICE A) on a Weblogic 9.1 server (SERVER A) with a username and a password, and this web service (WEBSERVICE A) uses the same username and password from the client, and invokes another message-level secured web service (WEBSERVICE B) deployed on a different WebLogic 9.1 server (SERVER B).
    Does WebLogic 9.X automatically asserts the same client credentials when the WEBSERVICE A invokes WEBSERVICE B on a different server? If it doesn't, what is the best way to do that? Thanks.

    You can save the site (spweb) as a template, and then use the template to create a new site in another web application. 
    When you save the site, it's saved to the solutions gallery. You can download the saved site from the solutions gallery, and then use it to create the new site collection. 
    If the site is a publishing site, you'll need to de-activate the publishing features first.
    You can save the site as a template via the sites settings page, or via SharePoint designer.
    Have a look here: http://office.microsoft.com/en-us/sharepoint-designer-help/save-a-sharepoint-site-as-a-template-HA101782501.aspx
    Regards, Matthew
    MCPD | MCITP
    My Blog
    View
    Matthew Yarlett's profile
    See my webpart on the TechNet Gallery that allows administrative users to upload, crop and format user profile photos. Check it out here:
    Upload and Crop User Profile Photos

  • How to get the cookie from a web service using Axis

    I used the AXIS wizard to consume a WSDL and create a bunch of boiler plate code. It works great in that I can talk to the web service and submit requests.
    The problem is that I need to retrieve the cookie from the login request and use it when making subsequent requests. I have been unable to find the cookie and would appreciate a point in the right direction.
    Currently I'm trying something like this
    String cookie = (String)((Stub)service)._getCall().getMessageContext().getProperty(HTTPConstants.HEADER_COOKIE);
    Thanks in advance.

    Answered on my own:
    Just have to use
    x_result = http_client->response->get_data( ).
    instead of
    x_result = http_client->response->to_xstring( ).
    Just don't knwo why the filesize is wrong also - but I can work with this image!

  • How to call BPEL process from Java Web Service?

    Any example/sample/tutorial on this?
    TIA.

    I've done something similar a few times, specifically using a standalone Java application to invoke a BPEL process (so that it can be called from a cron job, for instance).
    The thing to remember is that a BPEL process presents itself to the outside world as a Web service. If your Java Web service can communicate with other Web services (by sending a message of the appropriate format to the URL of the other Web service), then exactly the same technique can be used to call the BPEL process. You know what the input message has to look like, and you know where the process is located on your network, so set up the Java Web service to send the message to that address.

  • How to catch SOAP fault from PeopleSoft web service

    I am trying to catch the SOAP fault thrown from pplsoft. Currently we get only runtime error if we call pplsoft web service thru ESB. Fault is not being propagated back to route ESB.
    thanks for your help

    Have you managed to solve this issue? BPEL does allow you to do this.

Maybe you are looking for

  • ITunes takes forever to load

    When i first got my computer and installed iTunes, everything worked fine. then when my Norton internet security expired it really slowed down. like it takes 10 minutes to just go to the iTunes homepage, ON A GOOD DAY. About a month ago i installed N

  • Smart Playlists no longer working on my 4G iPod

    I have a 20GB 4G Mono iPod that is running the latest firmware version (3.1.1) and I have several Smart Playlists I use frequently with it. Before I upgraded to iTunes 7 last week these playlists would dynamically update on the iPod itself without th

  • Premiere Elements 13 crash

    I created a short movie, less than 2 minutes, then tried to render it.  After a few minutes an error message appeared, "problem encountered", and shortly after PE 13 crashed.  It appears that I lost the entire project -- a lot of work! I'm new to Pre

  • Word 2008 crashes when pfd files are inserted

    I wonder if anyone at Apple are looking into the issue that seem to be confirmed by many reports in different forums: That Word 2008 do crash if a pdf document is inserted into a document saved in the .doc format - not the never .docx format. Some ha

  • UWL Configuration in Portal

    Hi Please let me know the steps of Configuration UWL in EP. Also, let me know how Users are assigned / removed  to access UWL. Regards