Avoid http sessions with XML request

Hello,
We are sending quick complete messages (and other XMLs like resource status change,...) to SAP ME. We see on Wily that it always create sessions and as we are starting more and more machines we are always reaching the sessions limits --> we currently increased it to 3000. With MII webservices, we know that we can avoid to create a session with parameter "session=false" but we don't know if something like this can be done with ME xml message.
Any idea ?
Regards,
Michaël.

Hi Michaël,
Session control is done by Netweawer and I'm not aware of a way/setting to make Netweaver not create http/security sessions for requests. What I think could work in your scenario is setting low timeout value for web application responsible for ME web services handling. I'm not sure if suggested re-configuration is valid from WAR archive consistency point of view, but I believe it could be tried in a test system:
1. Find WAR archive in the following path - drive:\usr\sap\[SID]\[InstanceNo]\j2ee\cluster\apps\sap.com\me~ear\servlet_jsp\manufacturing-services\me.webservices.web-5.2.x.x-Base.war   OR ..\servlet_jsp\manufacturing-xml\me.integration.xml.web-5.2.x.x-Base.war
2. Open it and edit WEB-INF\web.xml file. Change session-timeout property to 1.
3. Save the file in the open archive.
4. Restart engine.
If such change is catched up by j2ee engine, all sessions for the web app should be invalidated and purged after 1 minute. Off course the same procedure has to be followed each time application is redeployed/upgraded to a newer version as this will deploy default WAR archive with default 60 min timeout config.
Regards,
Konstantin

Similar Messages

  • HTTP POST with XML with HTTPService

    Hi,
    I need to be able to send an HTTP POST request to a server I
    have on Tomcat. In the body of the POST Request I need to have the
    following:
    <setView domain="someDomain" view="macro" />
    We have tried the following using the HTTPService, but with
    no such luck
    <mx:HTTPService id="setViewHTTPService" url="{serverURL}"
    resultFormat="object" contentType="application/xml"
    method="POST">
    <mx:request>
    <setView domain="abc" view="xyz" />
    </mx:request>
    </mx:HTTPService>
    Is there a way for us to specify the body of the HTTP Post
    using HTTPService, or a different class for that matter.

    var variables:URLVariables = new
    URLVariables("name=Franklin");
    //or variables.name = "Franklin";
    var request:URLRequest = new URLRequest();
    request.url = "
    http://www.[yourdomain
    request.method = URLRequestMethod.POST;
    request.data = variables;
    var loader:URLLoader = new URLLoader();
    loader.dataFormat = URLLoaderDataFormat.VARIABLES;
    loader.addEventListener(Event.COMPLETE, completeHandler);
    try
    loader.load(request);
    catch (error:Error)
    trace("Unable to load URL");
    function completeHandler(event:Event):void
    trace(event.target.data.welcomeMessage);
    This is in the help documentation and what I generally use.

  • How to invalidate the client part of a HTTPS Session with client auth

    Hi to everybody here,
    I'm having an issue with HTTPS and client authentication related with how SSLHandshake works and the behavior of the client browser. I hope you can help.
    I'm setting up a web application that ask for a valid session in order to allow access to the application. If the user has no valid session, he's redirected to the login form, and if the auth process is ok, the user gets a session and is redirected again to the secured pages.
    We are in the way to create a new login service with client certificates, so the user identificates himself with a certificate valid on the application server.
    We have an application server with a secure listener in port 8443. It's configured to request client certificates so we can access to the certificate and validate it and create a session for the user automatically. The user just type his pin code in the browser, no passwords at all. This process is working and sessions are created. The problem comes up when we are trying to log the user out.
    We invalidate the session using a logout.jsp, but if the user goes to the secured pages again, we have observed that the authentication takes place automatically and the user can see the secured pages, so he thinks the logout.jsp doesn't work.
    My questions are: can we access to delete or modify the client browser ssl part in order to reset the https connection established against our application server? Are there any other ways to avoid this behavior?
    Thanks in advance.
    Miss.

    An enduser presents a certificate from a CAC for authentication to our website.
    They pick the Cert off the inserted CAC and submit it. Get logged into the application successfully.
    The user removes the card form the reader and the SSO session times out.
    In the same browser the user clicks log in with CAC and is not prompted for the cert this time the browser just goes ahead and presents the cached cert even though the card is no longer in the reader. The user logs in successfully.
    The desired behavior would be to prompt the user for for a cert again obviously.
    I am wondering how to turn this off as well.

  • Web Dispatcher - Current HTTP Sessions with decimals?

    Hi,
    looking at the statistics of our CurrentHTTPSessions of our three servers in the Web Dispatcher I was wondering how it is possible to get decimals (for example we have on one server 10,33 CurrentHTTPSessions)? As far as I understood the round-robin algorithm is used with sticky sessions but for my understanding decimals does not make sense.
    I hope you can help me with this question.
    Regards,
    Timo

    Hi Mercedes,
    thank you very much for the quick response.
    I guess for the productive environmentI will install 2 'old fashioned' Web Dispatchers because Note 908097 says that 7.20 is not released with SAP Release 7.00. But in a test environment I will try 7.20!
    Regards
    Martina

  • Http session with no interaction

    Is there an easy way, straight forward way, or a simple hack that would allow one to automate a session bean? Currently I have a series of jsp pages attached to a session bean that collect info and perform a process a the end. Now I want to automate this process. Give it all the info in the beginning and run it a certain times. I need to mimic the session object that this process requires.
    I can do this with lots of cutting and pasting and creating new, somewhat identical classes. However I want to create one new class that creates a session object and populates all of the info with the interaction...............

    You could write a class that makes calls to the sessionbean.
    Or add a function to the sessionbean which contains the logic?
    You could try that?

  • Can javax.rmi.PortableRemoteObject be attribute of http session with in-memory replication?

    Hi:
              When the servlet server try to do the in memory replication, a Stub class
              not found exception throwed out.
              The rmi object is compiled with -iiop option, should I compile it without
              iiop option?
              Please help
              thanks
              andrew
              

    Hi don:
              Thanks for you reply.
              I can't get the stack trace right, I am not working today. but I'll get it
              later.
              All the machine has the IIOP tie and stub class.
              The jar file works fine on weblogic6.1 cluster.
              thanks again
              andrew
              "Don Ferguson" <[email protected]> wrote in message
              news:[email protected]..
              > What's the exact stack trace? Is the stub present on all machines in the
              > cluster?
              >
              > -Don
              >
              > Andrew wrote:
              >
              > > Hi:
              > > When the servlet server try to do the in memory replication, a Stub
              class
              > > not found exception throwed out.
              > > The rmi object is compiled with -iiop option, should I compile it
              without
              > > iiop option?
              > >
              > > Please help
              > > thanks
              > > andrew
              >
              

  • Accessing Java webservice (XML over http) via WCF or HTTP adapter with content-type and authorization HTTP headers with POST method

    Hi Team,
    I need to access Java web service which is simple service and accepts and returns XML over HTTP. No credentials are needed to access the service. We need to pass following two HTTP headers (Content-Type and Authorization) along with XML request message:
    <GetStatus> message is being constructed in the orchestration and URI is constant to access.
    Which adapter shall I use to get the response back? I tried using WCF-WSHttp with Security Mode = Transport, and different options of client credential types but every time, error returned stating:
    System.Net.WebException:
    The HTTP request is unauthorized with client authentication scheme 'Basic'. The
    authentication header received from the server was 'Basic realm='.
    Authentication failed for principal Basic. Message payload is of type:
    String 
    In Fiddler, request looks line following
    POST <https://URL/GetServiceReopnse HTTP/1.1
    Content-Type: application/xml
    Authorization: Basic cmVmU3RhdHN2Y19kgeRfsdfs=
    Host: <Server name>
    <GetStatus XMLNS="http://server.com/.....">
    <OrgId>232323</OrgId>
    <HubId>3232342323</HubId>
    </GetStatus>
    MMK-007

    First, you should not use the HTTP Adapter because it's been deprecated and replaced by WCF.
    Start with the WCF-Custom Adapter and select the customBinding.
    You should start with the textMessageEncoder and httpTransport and go from there.

  • Http session replication fails in cluster

    Hello everybody.
    I have some problems with HTTP session replication in WebLlogic cluster environment. I have a cluster with 2 nodes and application deployed there. Application is configured with:
    <session-param>
    <param-name>PersistentStoreType</param-name>
    <param-value>replicated</param-value>
    </session-param>
    in weblogic.xml
    WebLogic plug-in for Apache webserver is configured properly as described in documentation.
    But when I try to make experiment to enter the application, make some activities, look in console where I was redirected by apache proxy and manually shut down the node where request was sent, I loose my HTTP session with all data there (all the beans stored in session are Serializable). Replication doesn't work correctly. May be I've missed something in configuration? How can I configure my application to provide correctness session replication?
    Thanks for advice.
    Thanks

    Thanks for response!
    I'm using WebLogic 8.1 SP 4 and configured Apache proxy as described in documentation for load balancing. The only section I have in httpd.conf is next:
    <Location /HTTPClnt>
         SetHandler weblogic-handler
    </Location>
    <IfModule mod_weblogic.c> 
         WebLogicCluster serv1:7541,serv2:7541
         MatchExpression *.*
         Debug ON 
         WLLogFile /www/tmp/global_proxy.log  
         WLTempDir "/www/tmp" 
         DebugConfigInfo On 
         KeepAliveEnabled ON 
         KeepAliveSecs  15
    </IfModule>
    <Location /myApp> 
         SetHandler weblogic-handler
         WebLogicCluster serv1:7541,serv2:7541
    </Location>and the string to include weblogic proxy module for apache:
    LoadModule weblogic_module     modules/mod_wl_20.soI've configured CookiesEnabled=true in weblogic.xml, but it didn't help. About session specification in httpd.conf - where can I read about that? I've just configured apache according to manual from here:
    [url http://e-docs.bea.com/wls/docs92/plugins/apache.html]http://e-docs.bea.com/wls/docs92/plugins/apache.html
    Thanks

  • SOAP HTTP header in SOAP request

    Hi,
    How to add the soap HTTP additional header in the SOAP request?
    I want to add the headers not through coding. I want to add it manually.
    I can able to add the HTTP headers through SOAPUI. But i need to add the same inside the request.
    Could someone please help me?

    I am sending the SOAP request through SoapUI.
    Here is the sample request which i have used.
    <?xml version="1.0"?>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://requisition.api.newscale.com">
    <soapenv:Header>
    <req:AuthenticationToken>
    <req:Username>***</req:Username>
    <req:Password>***</req:Password>
    </req:AuthenticationToken>
    </soapenv:Header>
    <soapenv:Body>
    <req:getRequisitionStatus>
    <req:loginUserName>***</req:loginUserName>
    <req:requisitionId>123456</req:requisitionId>
    </req:getRequisitionStatus>
    </soapenv:Body>
    </soapenv:Envelope>
    Here i have to add the additional HTTP header with this request.

  • SOAPConnection and HTTP Session ID

    Hi,
    I have a problem.
    I have a HTTPServlet, and a client that sends soap messages to the servlet, I need to keep trace of the session id, with the http connection i could use the setRequestproperty with cookie, but now I don't know how I can do with soap messages.
    Is there a method to use the session ID to connect at a particular http session with soap?
    Thanks in advance.
    Regards

    It depends upon which SOAP API you are using as to how you will achieve this but in any case this has to happen on the underlying HTTPURLConnection object...
    once you get to this you will need to do something like:
    connection.setRequestProperty("Cookie","sessionId=" + sessionId);
    where connection is the connection object and [ "sessionId=" + sessionId ] is the name of the cookie you want to set with the associated value.
    Remeber though... the important bit with this is the SOAP API that you are using - check the docs for it and you will find out how to do it!!

  • Cannot Store HTTP Session error

    We are using SAP MII Version 12.0.11 Build(19)
    In the Netweaver SAP logs we are getting scores of the following error:
    application [XMII] Cannot store HTTP session with id [(J2EE1985000)ID1148896350DB00216050084636765028End] to failover. Session data may be lost. Probably session data is not serializable or a failover storage error has occurred.
    The error is: com.sap.engine.services.failover.exceptions.PersistentStorageException:
    Exception id: [00215AD51B4000C00000922A000017EC00049425438C91E7]
    This is not a "High Availability" server and there isn't a failover storage.
    What does this error really mean? Any ideas?

    It would appear that you are on the latest patch, and I wonder if this issue you mention is a result of item #5 where it mentions that "Session data is not serialized":  https://service.sap.com/sap/support/notes/1512526

  • HTTP POST Request with XML file in

    Hi @ all,
    I would like to send an HTTP Request with an XML File in the body to an SAP System
    I have the target URL and the a XML File.
    Now the question is. Is it possible to use something like the HTTP_POST FuBa to send an url post request with an xml file?
    If yes can anybody give me a hint?
    I have a php script which exactly do this coding. But to integrate it all in one system it is necessary to transform it into ABAP and call it there.
    // compose url and request and call send function
    function test($productID, $categoryID) {
         // create url
         $PIhost = "XXX.wdf.sap.corp";
         $PIport = "50080";
         $PIurl = "/sap/xi/adapter_plain";
         $PIurl .= "?sap-client=800";
         $PIurl .= "&service=XXX";
         $PIurl .= "&namespace=XXX";
         $PIurl .= "&interface=Frontend_Interface";
         $PIurl .= "&qos=EO";
         $PIurl .= "&sap-user=XXX";
         $PIurl .= "&sap-password=XXX";
         // create xml
         $request = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
         $request .="<n1:FrontendInbound_MessageType xmlns:n1=\"http://crmpiebay.com\">\n";
         $request .= "\t<FrontendInbound>\n";
         $request .= "\t\t<ProductName/>\n";
         $request .= "\t\t<ProductCategory>".$categoryID."</ProductCategory>\n";
         $request .= "\t\t<ProductID>".$productID."</ProductID>\n";
         $request .= "\t\t<MessageID/>\n";
         $request .= "\t</FrontendInbound>\n";
         $request .= "</n1:FrontendInbound_MessageType>";
         // send http request
         postToHost($PIhost, $PIport, $PIurl, $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"]."/".$_SERVER["PHP_SELF"], $request);
    // send post request to PI server
    function postToHost($host, $port, $path, $referer, $data_to_send) {
      $fp = fsockopen($host, $port);
      if($fp) {
           $res="";
           fputs($fp, "POST $path HTTP/1.1\r\n");
           fputs($fp, "Host: $host\r\n");
           fputs($fp, "Referer: $referer\r\n");
           fputs($fp, "Content-type: text/plain\r\n");
           fputs($fp, "Content-length: ". strlen($data_to_send) ."\r\n");
           fputs($fp, "Connection: close\r\n\r\n");
           fputs($fp, $data_to_send);
           while(!feof($fp)) {
               $res .= fgets($fp, 128);
           fclose($fp);
           return $res;
    Would be great if anybody could give me a hint how to solve such a HTTP Post request with XML body data.
    Thanks in advance.
    Chris
    Edited by: Christian Kuehne on Feb 26, 2009 4:32 PM

    hi friend could you please share your solution regarding this query if u got it already?

  • How to work with Fedex xml request

    Hi Developers,
    In USPS I can send the xml request with http url in the browser and successfully getting the xml response. How can we achieve the same concept in FedEx?
    Is this possible?
    In FedEx site i downloaded the xml-transaction pdf, which contains the multiple xml request. I don't know how to test it with the browser.
    Sample xml request for Fedex which i founded in the above mentioned pdf is shown below:
    <?xml version="1.0" encoding="UTF-8" ?>
    <FDXSubscriptionRequest xmlns:api="http://www.fedex.com/fsmapi" xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance"
    xsi:noNamespaceSchemaLocation="FDXSubscriptionRequest.xsd">
    <RequestHeader>
    <CustomerTransactionIdentifier>String</CustomerTransactionIdentifier>
    <AccountNumber>123456789</AccountNumber>
    </RequestHeader>
    <Contact>
    <PersonName>Jim Smith</PersonName>
    <CompanyName>Creative Widgets</CompanyName>
    <Department>Shipping</Department>
    <PhoneNumber>5405559900</PhoneNumber>
    <PagerNumber>9999999999</PagerNumber>
    <FaxNumber>5405559901</FaxNumber>
    <E-MailAddress>[email protected]</E-MailAddress>
    </Contact>
    <Address>
    <Line1>123 Main Street</Line1>
    <Line2>1st Floor</Line2>
    <City>Anycity</City>
    <StateOrProvinceCode>VA</StateOrProvinceCode>
    <PostalCode>24060</PostalCode>
    <CountryCode>US</CountryCode>
    </Address>
    </FDXSubscriptionRequest>
    and they also provide the sample xml response which is given below:
    <?xml version="1.0" encoding="UTF-8" ?>
    <FDXSubscriptionReply xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="FDXSubscriptionReply.xsd">
    <RequestHeader>
    <CustomerTransactionIdentifier>String</CustomerTransactionIdentifier>
    </RequestHeader>
    <MeterNumber>1234567</MeterNumber>
    <SubscribedService>FedEx Express Shipping</SubscribedService>
    </FDXSubscriptionReply>
    I want to know how to send the above mentioned FedEx xml request in the browser to reach the FedEx Server or how to achive the FedEx xml request using java
    code.
    But these concepts is possible in the USPS because we make a connection with http url(provided by usps) and then we will send the xml request, where as in FedEx the http url is inside the xml structure. So how can we achive this?
    Please help me to come out from this problem
    Thanks
    Srinivasan

    You might have to tweak this code some to get it to work, but it should at least lay the groundwork for solving your problem:
    Code Snippet
    /* Declare an XmlNode object and initialize it with the XML response from the GetListItems method. The last parameter specifies the GUID of the Web site containing the list. Setting it to null causes the Web site specified by the Url property to be used.*/
                System.Xml.XmlNode nodeListItems =
                    MyListsService.GetListItems
                    (listName, viewName, query, viewFields, rowLimit, queryOptions, null);
    System.Xml.XmlDocument xd = new System.Xml.XmlDocument();
    xd.LoadXml(nodeListItems.OuterXml);
    System.Xml.XmlNamespaceManager nm = new System.Xml.XmlNamespaceManager(xd.NameTable);
    nm.AddNamespace("rs", "urn:schemas-microsoft-com:rowset");
    nm.AddNamespace("z", "#RowsetSchema");
    nm.AddNamespace("rootNS", "http://schemas.microsoft.com/sharepoint/soap");
    System.Xml.XmlNodeList nl = xd.SelectNodes("/rootNS:listitems/rs:data/z:row", nm);
    foreach(System.Xml.XmlNode listItem in nl)
      listBoxProsjekter.Items.Add(listItem.OuterXml);
    I hope this helps!
    Please look into the following site for more info:
    http://msdn2.microsoft.com/en-us/library/4bektfx9(vs.80).aspx

  • Model session not in sync with Http Session

    Hi All,
    I have an application developed in JDev 11.1.1.4 and we are not using ADF Security for login.
    The problem occurring is randomly some of the LOV on my home page are getting null (having no data). These LOVs are populated using the values passed as bind parameter from the login values (basically HTTP session values at web layer). So i added a method in all the task flow to set the session value at the model layer (default method) . Also on each call to the Am Impl call i am setting the value in the HTTP session and then invoking the method, but some how what happens is the Model level session value is not in sync with HTTP session and the list gets empty.
    Any inputs what i can do to get out of this prblm ?
    thnk

    In this case you need to overwrite the activateState/passivateState method of your am and store/reads the values from the xml structure you get as parameters to this methods.
    For more detailed information check the docs http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/bcstatemgmt.htm#sm0495
    By the way, this is nothing you need to open an SR on as it's working as designed.
    Timo

  • How would I do a http post with a xml file

    How would I do a http post with a xml file.
    I have a url called https://localhost:8443/wss/WSS and the XML file is sent as part of the HTTP POST body.
    How would I send this XML file when posting?

    most people just add feedback to the comments they've asked about already, rather than ignoring all the feedback and making a new post with the exact same information:
    http://forum.java.sun.com/thread.jspa?threadID=5247331&messageID=10020973#10020973
    If you want to add in an XML file to a POST command, you'd add it just like any other file you'd attach to a post request, especially (if you're request is the same as your last post) if you're just doing a jsp page. I'd do it something like this:
    <form method=POST ENCTYPE="multipart/form-data" action="https://rcpdm.mnb.gd-ais.com/Windchill/servlet/IE/tasks/DJK/fcsAddContentComplete.xml">
    <H3> File Name </H3>
    <input type=file name=filename>
    <input type=submit value="Do it!">
    </form>Then again, this solution has literally nothing to do with java, and you still need to make sure that your servlet knows what to actually do with that information you're sending it.

Maybe you are looking for