BEA Web Service Session Example (Reformatted)

Hi,<br>
<p>
Has anyone been able to get access to the HTTP Session functionality from a web
service under WebLogic 8.1sp1 (Service Pack 1)?
I tried the example as shown at http://e-docs.bea.com/wls/docs81/webserv/api.html#1067906.
The relevant code section is as
follows:
<pre>
import weblogic.webservice.context.WebServiceContext;
import weblogic.webservice.context.ContextNotFoundException;
import weblogic.webservice.context.WebServiceSession;
* Shows how to use HTTP Session to maintain session state between
* invokes
public int maintainSessionState(){
try{
WebServiceContext wsContext = WebServiceContext.currentContext();
WebServiceSession session = (WebServiceSession)wsContext.getSession();
Integer count = (Integer)session.getAttribute( "count" );
count = (count==null) ?
new Integer( 0 ) : new Integer( count.intValue() + 1 );
session.setAttribute( "count", count );
return count.intValue();
}catch( ContextNotFoundException e ){
e.printStackTrace();
return -1;
</pre>
</p>
<p>
The ContextNotFoundException exception is thrown (the web service returns a –1
as it’s result). I have tried everything I
could think of to track this problem down, but I’ve had no luck. Here is my setup.<br>
Environment:<br>
WebLogic 8.1 (Service Pack 1)<br>
JDK 1.4.1.03<br>
Windows 2000<br>
</p>
<p>
I created a new clean Basic WebLogic Workshop Domain using the Configuration Wizard
that ships with WebLogic 8.1sp1. No JDBC,
JMS, or anything extra. I then created a new clean Empty Application under WebLogic
Workshop that ships with WebLogic 8.1sp1.
I associated the Application with the domain through Workshop’s Tools/Application
Properties menu. I added one Web Service
project to the application, then added one Web Service to the project, and then
added one method to the Web Service. I renamed
the method to the same method as in the example listed above. I copied all the
imports and method implementation into the web
service. Then ran the web service inside workshop. It failed. The method returned
a –1 (the ContextNotFoundException was
thrown). The return value from the WebServiceContext.currentContext() called
is null.
</p>
<p>
When I start a debug session (Debug\Start in Workshop), the following warning
is emitted:<br>
<br>
<Warning> <WLW> <000000> <Unable to load class ProcessControl><br>
<br>
Not sure if this is part of the problem. Other than not being able to get the
context through WebServiceContext, everything
else with the web services seems to be running fine.
</p>
<p>
When I run the example above I get the following stack trace in the logs:
<br>
<pre>
weblogic.webservice.context.ContextNotFoundException: unable to find context for
current thread
     at weblogic.webservice.context.WebServiceContext.currentContext(WebServiceContext.java:36)
at WebServiceSessionTest.maintainSessionState(WebServiceSessionTest.jws:15)
at sun.reflect.GeneratedMethodAccessor161.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(DispMethod.java:353)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:420)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:393)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:245)
at com.bea.wlw.runtime.core.bean.BaseContainerBean.invokeBase(BaseContainerBean.java:185)
at com.bea.wlw.runtime.core.bean.SLSBContainerBean.invoke(SLSBContainerBean.java:103)
at com.bea.wlwgen.StatelessContainer_ly05hg_ELOImpl.invoke(StatelessContainer_ly05hg_ELOImpl.java:99)
at com.bea.wlwgen.GenericStatelessSLSBContAdpt.invokeOnBean(GenericStatelessSLSBContAdpt.java:59)
at com.bea.wlw.runtime.core.bean.BaseDispatcherBean.runAsInvoke(BaseDispatcherBean.java:160)
at com.bea.wlw.runtime.core.bean.BaseDispatcherBean.invoke(BaseDispatcherBean.java:54)
at com.bea.wlw.runtime.core.bean.SyncDispatcherBean.invoke(SyncDispatcherBean.java:159)
at com.bea.wlw.runtime.core.bean.SyncDispatcher_k1mrl8_EOImpl.invoke(SyncDispatcher_k1mrl8_EOImpl.java:100)
at com.bea.wlw.runtime.core.dispatcher.Dispatcher.remoteDispatch(Dispatcher.java:134)
at com.bea.wlw.runtime.core.dispatcher.Dispatcher.dispatch(Dispatcher.java:46)
at com.bea.wlw.runtime.core.dispatcher.HttpServerHelper.exploreExec(HttpServerHelper.java:253)
at com.bea.wlw.runtime.core.dispatcher.HttpServerHelper.executeGetRequest(HttpServerHelper.java:570)
at com.bea.wlw.runtime.core.dispatcher.HttpServer.doGet(HttpServer.java:81)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1053)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:387)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6316)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3622)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2569)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
</pre>
</p>
Thanks in advance,
<br>
Brad Babb
P.S. Is there a preview pain somewhere on the posting page?

Hi,<br>
<p>
Has anyone been able to get access to the HTTP Session functionality from a web
service under WebLogic 8.1sp1 (Service Pack 1)?
I tried the example as shown at http://e-docs.bea.com/wls/docs81/webserv/api.html#1067906.
The relevant code section is as
follows:
<pre>
import weblogic.webservice.context.WebServiceContext;
import weblogic.webservice.context.ContextNotFoundException;
import weblogic.webservice.context.WebServiceSession;
* Shows how to use HTTP Session to maintain session state between
* invokes
public int maintainSessionState(){
try{
WebServiceContext wsContext = WebServiceContext.currentContext();
WebServiceSession session = (WebServiceSession)wsContext.getSession();
Integer count = (Integer)session.getAttribute( "count" );
count = (count==null) ?
new Integer( 0 ) : new Integer( count.intValue() + 1 );
session.setAttribute( "count", count );
return count.intValue();
}catch( ContextNotFoundException e ){
e.printStackTrace();
return -1;
</pre>
</p>
<p>
The ContextNotFoundException exception is thrown (the web service returns a –1
as it’s result). I have tried everything I
could think of to track this problem down, but I’ve had no luck. Here is my setup.<br>
Environment:<br>
WebLogic 8.1 (Service Pack 1)<br>
JDK 1.4.1.03<br>
Windows 2000<br>
</p>
<p>
I created a new clean Basic WebLogic Workshop Domain using the Configuration Wizard
that ships with WebLogic 8.1sp1. No JDBC,
JMS, or anything extra. I then created a new clean Empty Application under WebLogic
Workshop that ships with WebLogic 8.1sp1.
I associated the Application with the domain through Workshop’s Tools/Application
Properties menu. I added one Web Service
project to the application, then added one Web Service to the project, and then
added one method to the Web Service. I renamed
the method to the same method as in the example listed above. I copied all the
imports and method implementation into the web
service. Then ran the web service inside workshop. It failed. The method returned
a –1 (the ContextNotFoundException was
thrown). The return value from the WebServiceContext.currentContext() called
is null.
</p>
<p>
When I start a debug session (Debug\Start in Workshop), the following warning
is emitted:<br>
<br>
<Warning> <WLW> <000000> <Unable to load class ProcessControl><br>
<br>
Not sure if this is part of the problem. Other than not being able to get the
context through WebServiceContext, everything
else with the web services seems to be running fine.
</p>
<p>
When I run the example above I get the following stack trace in the logs:
<br>
<pre>
weblogic.webservice.context.ContextNotFoundException: unable to find context for
current thread
     at weblogic.webservice.context.WebServiceContext.currentContext(WebServiceContext.java:36)
at WebServiceSessionTest.maintainSessionState(WebServiceSessionTest.jws:15)
at sun.reflect.GeneratedMethodAccessor161.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(DispMethod.java:353)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:420)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:393)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:245)
at com.bea.wlw.runtime.core.bean.BaseContainerBean.invokeBase(BaseContainerBean.java:185)
at com.bea.wlw.runtime.core.bean.SLSBContainerBean.invoke(SLSBContainerBean.java:103)
at com.bea.wlwgen.StatelessContainer_ly05hg_ELOImpl.invoke(StatelessContainer_ly05hg_ELOImpl.java:99)
at com.bea.wlwgen.GenericStatelessSLSBContAdpt.invokeOnBean(GenericStatelessSLSBContAdpt.java:59)
at com.bea.wlw.runtime.core.bean.BaseDispatcherBean.runAsInvoke(BaseDispatcherBean.java:160)
at com.bea.wlw.runtime.core.bean.BaseDispatcherBean.invoke(BaseDispatcherBean.java:54)
at com.bea.wlw.runtime.core.bean.SyncDispatcherBean.invoke(SyncDispatcherBean.java:159)
at com.bea.wlw.runtime.core.bean.SyncDispatcher_k1mrl8_EOImpl.invoke(SyncDispatcher_k1mrl8_EOImpl.java:100)
at com.bea.wlw.runtime.core.dispatcher.Dispatcher.remoteDispatch(Dispatcher.java:134)
at com.bea.wlw.runtime.core.dispatcher.Dispatcher.dispatch(Dispatcher.java:46)
at com.bea.wlw.runtime.core.dispatcher.HttpServerHelper.exploreExec(HttpServerHelper.java:253)
at com.bea.wlw.runtime.core.dispatcher.HttpServerHelper.executeGetRequest(HttpServerHelper.java:570)
at com.bea.wlw.runtime.core.dispatcher.HttpServer.doGet(HttpServer.java:81)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1053)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:387)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6316)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3622)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2569)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
</pre>
</p>
Thanks in advance,
<br>
Brad Babb
P.S. Is there a preview pain somewhere on the posting page?

Similar Messages

  • BEA Web Service Session Example

    Hi,
    Has anyone been able to get access to the HTTP Session functionality from a web
    service under WebLogic 8.1sp1 (Service Pack 1)? I tried the example as shown at
    http://e-docs.bea.com/wls/docs81/webserv/api.html#1067906. The relevant code
    section is as follows:
    import weblogic.webservice.context.WebServiceContext;
    import weblogic.webservice.context.ContextNotFoundException;
    import weblogic.webservice.context.WebServiceSession;
    * Shows how to use HTTP Session to maintain session state between
    * invokes
    public int maintainSessionState(){
    try{
    WebServiceContext wsContext = WebServiceContext.currentContext();
    WebServiceSession session = (WebServiceSession)wsContext.getSession();
    Integer count = (Integer)session.getAttribute( "count" );
    count = (count==null) ?
    new Integer( 0 ) : new Integer( count.intValue() + 1 );
    session.setAttribute( "count", count );
    return count.intValue();
    }catch( ContextNotFoundException e ){
    e.printStackTrace();
    return -1;
    The ContextNotFoundException exception is thrown (the web service returns a –1
    as it’s result). I have tried everything I could think of to track this problem
    down, but I’ve had no luck. Here is my setup.
    Environment:
    WebLogic 8.1 (Service Pack 1)
    JDK 1.4.1.03
    Windows 2000
    I created a new clean Basic WebLogic Workshop Domain using the Configuration Wizard
    that ships with WebLogic 8.1sp1. No JDBC, JMS, or anything extra. I then created
    a new clean Empty Application under WebLogic Workshop that ships with WebLogic
    8.1sp1. I associated the Application with the domain through Workshop’s Tools/Application
    Properties menu. I added one Web Service project to the application, then added
    one Web Service to the project, and then added one method to the Web Service.
    I renamed the method to the same method as in the example listed above. I copied
    all the imports and method implementation into the web service. Then ran the
    web service inside workshop. It failed. The method returned a –1 (the ContextNotFoundException
    was thrown). The return value from the WebServiceContext.currentContext() called
    is null.
    When I start a debug session (Debug\Start in Workshop), the following warning
    is emitted:
    <Warning> <WLW> <000000> <Unable to load class ProcessControl>
    Not sure if this is part of the problem. Other than not being able to get the
    context through WebServiceContext, everything else with the web services seems
    to be running fine.
    When I run the example above I get the following stack trace in the logs:
    weblogic.webservice.context.ContextNotFoundException: unable to find context for
    current thread
         at weblogic.webservice.context.WebServiceContext.currentContext(WebServiceContext.java:36)
    at WebServiceSessionTest.maintainSessionState(WebServiceSessionTest.jws:15)
    at sun.reflect.GeneratedMethodAccessor161.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(DispMethod.java:353)
    at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:420)
    at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:393)
    at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:245)
    at com.bea.wlw.runtime.core.bean.BaseContainerBean.invokeBase(BaseContainerBean.java:185)
    at com.bea.wlw.runtime.core.bean.SLSBContainerBean.invoke(SLSBContainerBean.java:103)
    at com.bea.wlwgen.StatelessContainer_ly05hg_ELOImpl.invoke(StatelessContainer_ly05hg_ELOImpl.java:99)
    at com.bea.wlwgen.GenericStatelessSLSBContAdpt.invokeOnBean(GenericStatelessSLSBContAdpt.java:59)
    at com.bea.wlw.runtime.core.bean.BaseDispatcherBean.runAsInvoke(BaseDispatcherBean.java:160)
    at com.bea.wlw.runtime.core.bean.BaseDispatcherBean.invoke(BaseDispatcherBean.java:54)
    at com.bea.wlw.runtime.core.bean.SyncDispatcherBean.invoke(SyncDispatcherBean.java:159)
    at com.bea.wlw.runtime.core.bean.SyncDispatcher_k1mrl8_EOImpl.invoke(SyncDispatcher_k1mrl8_EOImpl.java:100)
    at com.bea.wlw.runtime.core.dispatcher.Dispatcher.remoteDispatch(Dispatcher.java:134)
    at com.bea.wlw.runtime.core.dispatcher.Dispatcher.dispatch(Dispatcher.java:46)
    at com.bea.wlw.runtime.core.dispatcher.HttpServerHelper.exploreExec(HttpServerHelper.java:253)
    at com.bea.wlw.runtime.core.dispatcher.HttpServerHelper.executeGetRequest(HttpServerHelper.java:570)
    at com.bea.wlw.runtime.core.dispatcher.HttpServer.doGet(HttpServer.java:81)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1053)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:387)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6316)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3622)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2569)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    Thanks in advance,
    Brad Babb

    The maintain session example works only with the
    web service stack that comes with WLS. You
    need to use servicegen, source2wsdd, etc ant
    tasks to assemble this web service.
    Here is the full session example:
    http://www.manojc.com/?sample30
    Webservice generated by Workshop use a diffrent
    soap stack and this functionality is not supported in it.
    Regards,
    -manoj
    http://manojc.com
    "Brad Babb" <[email protected]> wrote in message
    news:[email protected]...
    >
    Hi,
    Has anyone been able to get access to the HTTP Session functionality froma web
    service under WebLogic 8.1sp1 (Service Pack 1)? I tried the example asshown at
    http://e-docs.bea.com/wls/docs81/webserv/api.html#1067906. The relevant
    code
    section is as follows:
    import weblogic.webservice.context.WebServiceContext;
    import weblogic.webservice.context.ContextNotFoundException;
    import weblogic.webservice.context.WebServiceSession;
    * Shows how to use HTTP Session to maintain session state between
    * invokes
    public int maintainSessionState(){
    try{
    WebServiceContext wsContext = WebServiceContext.currentContext();
    WebServiceSession session =(WebServiceSession)wsContext.getSession();
    Integer count = (Integer)session.getAttribute( "count" );
    count = (count==null) ?
    new Integer( 0 ) : new Integer( count.intValue() + 1 );
    session.setAttribute( "count", count );
    return count.intValue();
    }catch( ContextNotFoundException e ){
    e.printStackTrace();
    return -1;
    The ContextNotFoundException exception is thrown (the web service returnsa -1
    as it's result). I have tried everything I could think of to track thisproblem
    down, but I've had no luck. Here is my setup.
    Environment:
    WebLogic 8.1 (Service Pack 1)
    JDK 1.4.1.03
    Windows 2000
    I created a new clean Basic WebLogic Workshop Domain using theConfiguration Wizard
    that ships with WebLogic 8.1sp1. No JDBC, JMS, or anything extra. I thencreated
    a new clean Empty Application under WebLogic Workshop that ships withWebLogic
    8.1sp1. I associated the Application with the domain through Workshop'sTools/Application
    Properties menu. I added one Web Service project to the application, thenadded
    one Web Service to the project, and then added one method to the WebService.
    I renamed the method to the same method as in the example listed above.I copied
    all the imports and method implementation into the web service. Then ranthe
    web service inside workshop. It failed. The method returned a -1 (theContextNotFoundException
    was thrown). The return value from the WebServiceContext.currentContext()called
    is null.
    When I start a debug session (Debug\Start in Workshop), the followingwarning
    is emitted:
    <Warning> <WLW> <000000> <Unable to load class ProcessControl>
    Not sure if this is part of the problem. Other than not being able to getthe
    context through WebServiceContext, everything else with the web servicesseems
    to be running fine.
    When I run the example above I get the following stack trace in the logs:
    weblogic.webservice.context.ContextNotFoundException: unable to findcontext for
    current thread
    atweblogic.webservice.context.WebServiceContext.currentContext(WebServiceConte
    xt.java:36)
    atWebServiceSessionTest.maintainSessionState(WebServiceSessionTest.jws:15)
    at sun.reflect.GeneratedMethodAccessor161.invoke(Unknown Source)
    atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
    .java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    atcom.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(DispMethod.java:353)
    atcom.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:420)
    atcom.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:393)
    atcom.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:245)
    atcom.bea.wlw.runtime.core.bean.BaseContainerBean.invokeBase(BaseContainerBean
    .java:185)
    atcom.bea.wlw.runtime.core.bean.SLSBContainerBean.invoke(SLSBContainerBean.jav
    a:103)
    atcom.bea.wlwgen.StatelessContainer_ly05hg_ELOImpl.invoke(StatelessContainer_l
    y05hg_ELOImpl.java:99)
    atcom.bea.wlwgen.GenericStatelessSLSBContAdpt.invokeOnBean(GenericStatelessSLS
    BContAdpt.java:59)
    atcom.bea.wlw.runtime.core.bean.BaseDispatcherBean.runAsInvoke(BaseDispatcherB
    ean.java:160)
    atcom.bea.wlw.runtime.core.bean.BaseDispatcherBean.invoke(BaseDispatcherBean.j
    ava:54)
    atcom.bea.wlw.runtime.core.bean.SyncDispatcherBean.invoke(SyncDispatcherBean.j
    ava:159)
    atcom.bea.wlw.runtime.core.bean.SyncDispatcher_k1mrl8_EOImpl.invoke(SyncDispat
    cher_k1mrl8_EOImpl.java:100)
    atcom.bea.wlw.runtime.core.dispatcher.Dispatcher.remoteDispatch(Dispatcher.jav
    a:134)
    atcom.bea.wlw.runtime.core.dispatcher.Dispatcher.dispatch(Dispatcher.java:46)
    atcom.bea.wlw.runtime.core.dispatcher.HttpServerHelper.exploreExec(HttpServerH
    elper.java:253)
    atcom.bea.wlw.runtime.core.dispatcher.HttpServerHelper.executeGetRequest(HttpS
    erverHelper.java:570)
    atcom.bea.wlw.runtime.core.dispatcher.HttpServer.doGet(HttpServer.java:81)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    atweblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Servle
    tStubImpl.java:1053)
    atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :387)
    atweblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
    atweblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
    atweblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(W
    ebAppServletContext.java:6316)
    atweblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubjec
    t.java:317)
    atweblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
    atweblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
    ntext.java:3622)
    atweblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
    :2569)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    Thanks in advance,
    Brad Babb

  • Web services sessions

    Can WebLogic 6.x maintain web services sessions between the client and the
    server?
    I need to implement a set of web services which share some session data.
    SOAP itself does allow for maintaining a session, so it is possible to have
    a SOAP header that will handle the passing of a session ID. Does WebLogic
    provide an API to implement this feature?
    Thanks in advance
    Regards

    We've spent a lot of time thinking about conversations between Web Services
    clients and WebLogic Servers where session data and ids are maintained. I
    don't think we can provide much detail yet on the newsgroups, but it's
    definitely an area that we're very much looking into.
    Currently, you would have to role your own service. If you just wanted to
    maintain a session id between client and server, the easiest (but most
    intrusive) thing to do would be to pass an extra 'id' parameter on every method
    call between client and server.
    -- Rob
    David Solis wrote:
    Almost all of the sample code for Web Services that we are seeing today is
    simple stateless method calls like "requesting a key or password",
    "validations", "calculations", etc.
    Has anybody experimented into the next logical step of a Stateful Web
    Service i.e a set of interaction request/responses for example a teller bank
    application or a shopping cart like example. Something on the lines of a
    Stateful Session Bean in EJB.
    It would be useful to all followers of this forum if either WebLogic
    Engineers or developers of web services throw some light on their
    experiences, suggestions.
    Regards
    "Rob Woollen" <rob@trebor_nelloow.moc> wrote in message
    news:3BFE9675.EE4AB56@trebor_nelloow.moc...
    WLS 6.1 does not currently provide a means to automatically propogate asession
    ID in the SOAP header. I'd be interested in hearing more about what youwould
    want for this feature. It's something that we are working on for a future
    release.
    -- Rob
    David Solis wrote:
    Can WebLogic 6.x maintain web services sessions between the client and
    the
    server?
    I need to implement a set of web services which share some session data.
    SOAP itself does allow for maintaining a session, so it is possible tohave
    a SOAP header that will handle the passing of a session ID. DoesWebLogic
    provide an API to implement this feature?
    Thanks in advance
    Regards
    AVAILABLE NOW!: Building J2EE Applications & BEA WebLogic Server
    by Michael Girdley, Rob Woollen, and Sandra Emerson
    http://learnWebLogic.com
    [att1.html]

  • WEB Service Session - Login

    Hello Experts,
    I have to consume a BOBJ Web Service Session in SAP Netweawer.
    Hello,
    We have SAP NetWeaver 2004s and BusinessObjects Enterprise 12.0.
    I've created an proxy object on the SAP Netweaver side in the following way :
    se80->Create->Enterprice Service->Service-Consumer->URL/HTTP Destination-> URL = http://<host>:8080/dswsbobje/services/Session?wsdl
    Then I've created an Port using soamanager.
    I't seems to be working, becouse methods like : getServerInfo, getServerInfoDetails are working ok.
    Now I have a problem with the method Login. As parameter for this method I see only structure CREDENTIAL, which have only one field CONTROLLER (PRXCTRLTAB).
    I've expected to have in the Parameters for this method a structure EnterpriceCredential with fields like username, password and so on - but its not.
    Could You help me ?
    Greetings
    Wojciech
    Here my coding :
    REPORT  ztest.
    DATA text TYPE string.
    DATA : lr_proxy TYPE REF TO zsco_session_port.  " its my session proxy object
    DATA : oref   TYPE REF TO cx_root.
    TRY.
        CREATE OBJECT lr_proxy
          EXPORTING
            logical_port_name = 'LP1'.
      CATCH cx_ai_system_fault INTO oref.
        text = oref->get_text( ).
    ENDTRY.
    DATA get_server_info_in TYPE zsget_server_info_soap_in.
    DATA get_server_info_out TYPE zsget_server_info_soap_out.
    THIS IS WORKING WELL
    TRY.
        CALL METHOD lr_proxy->get_server_info
          EXPORTING
            input  = get_server_info_in
          IMPORTING
            output = get_server_info_out.
      CATCH cx_ai_system_fault  INTO oref..
      CATCH zscx_dswsexception  INTO oref..
      CATCH cx_ai_application_fault  INTO oref..
    ENDTRY.
    break-point.
    AND THIS IS ENDINNG WITH EXCEPTION
    TRY.
        CALL METHOD lr_proxy->login
          EXPORTING
            input  = login_in
          IMPORTING
            output = login_out.
      CATCH cx_ai_system_fault INTO oref.
        text = oref->get_text( ).
    _ CATCH zscx_dswsexception INTO oref.   this exeption is being called_
        text = oref->get_text( ).
      CATCH cx_ai_application_fault INTO oref.
        text = oref->get_text( ).
    ENDTRY.

    Hello,
    I struggle with exactly the same problem accessing the login webservice of the BOE server. Unfortunately the previous answer did not help me since I don't understand it
    Anyone able to enlighten me?
    Edit: Nevermind, I just found out by myself.
    Thanks,
    Sebastian
    Edited by: Sebastian Solzbacher on Nov 25, 2011 9:43 AM

  • Web Service session manager not found.

    I'm trying to understand how to use the HTTP utilities, and I'm having trouble just creating a session.  I get a Web Service session manager not found error.  I've read where the client has to support cookies.  My eventual client will be a labview VI that talks to a web server.  I llooked at the Toolsptions, but don't see anything related to cookies.  Not sure if that's what's causing this anyway, but I'm just digging.  Also, I want to eventually send http messages across TCP/IP.  Do I need to use the TCP/IP VIs (i.e. open connection, etc) or do I use the http utilities alone.  If both are needed, how does the httpRequestID and the TCP/IP connection ID correlate.
    Attachments:
    htttGetSession.vi ‏9 KB
    WebServerError.PNG ‏13 KB

    Hi can you please let me know how you resolved this issue?

  • BOBJ WEB Service Session - Login

    Hello Experts,
    I have to consume a BOBJ Web Service Session in SAP Netweawer.
    Hello,
    We have SAP NetWeaver 2004s and BusinessObjects Enterprise 12.0.
    I've created an proxy object on the SAP Netweaver side in the following way :
    se80->Create->Enterprice Service->Service-Consumer->URL/HTTP Destination-> URL = http://<host>:8080/dswsbobje/services/Session?wsdl
    Then I've created an Port using soamanager.
    I't seems to be working, becouse methods like : getServerInfo, getServerInfoDetails are working ok.
    Now I have a problem with the method Login. As parameter for this method I see only structure CREDENTIAL, which have only one field CONTROLLER (PRXCTRLTAB).
    I've expected to have in the Parameters for this method a structure EnterpriceCredential with fields like username, password and so on - but its not.
    Could You help me ?
    Greetings
    Wojciech
    Here my coding :
    REPORT ztest.
    DATA text TYPE string.
    DATA : lr_proxy TYPE REF TO zsco_session_port. " its my session proxy object
    DATA : oref TYPE REF TO cx_root.
    TRY.
    CREATE OBJECT lr_proxy
    EXPORTING
    logical_port_name = 'LP1'.
    CATCH cx_ai_system_fault INTO oref.
    text = oref->get_text( ).
    ENDTRY.
    DATA get_server_info_in TYPE zsget_server_info_soap_in.
    DATA get_server_info_out TYPE zsget_server_info_soap_out.
    THIS IS WORKING WELL
    TRY.
    CALL METHOD lr_proxy->get_server_info
    EXPORTING
    input = get_server_info_in
    IMPORTING
    output = get_server_info_out.
    CATCH cx_ai_system_fault INTO oref..
    CATCH zscx_dswsexception INTO oref..
    CATCH cx_ai_application_fault INTO oref..
    ENDTRY.
    break-point.
    AND THIS IS ENDINNG WITH EXCEPTION
    TRY.
    CALL METHOD lr_proxy->login
    EXPORTING
    input = login_in
    IMPORTING
    output = login_out.
    CATCH cx_ai_system_fault INTO oref.
    text = oref->get_text( ).
    _ CATCH zscx_dswsexception INTO oref. this exeption is being called_
    text = oref->get_text( ).
    CATCH cx_ai_application_fault INTO oref.
    text = oref->get_text( ).
    ENDTRY.

    Hello,
    I struggle with exactly the same problem accessing the login webservice of the BOE server. Unfortunately the previous answer did not help me since I don't understand it
    Anyone able to enlighten me?
    Edit: Nevermind, I just found out by myself.
    Thanks,
    Sebastian
    Edited by: Sebastian Solzbacher on Nov 25, 2011 9:43 AM

  • Keeping "CS Web Service session" alive while uploading big files.

    Hi.
    I have a problem when I'm uploading big files, which takes longer than the session timeout value, causing the upload to fail.
    As you all know uploading a file is a three step process:
    1). Create a new DocumentDefinition Item on the server as a placeholder.
    2). Open an HTTP connection to the created placeholder and transfer the data using the HTTPConnection.put() method.
    3). Create the final document using the FileManager by passing in the destination folder and the document definition.
    The problem is that step 2 take so long that the "CS Web Service Session" times out and thus step 3 can not be completed. The Developer guide gives a utility method for creating an HTTP connection for step 2 and it states the folllowing "..you must create a cookie for the given domain and path in order to keep the session alive while transferring data." But this only keeps the session of the HTTP Connection alive and not the "CS Web Service Session". As in my case step 2 completes succesfully and the moment I peform step 3 it throws an ORACLE.FDK.SessionError:ORACLE.FDK.SessionNotConnected exception.
    How does one keep the "CS Web Service Session" alive?
    Thanks in advance
    Regards.

    Okay, even a thread that pushes dummy stuff through once in a while doesn't help. I'm getting the following when the keep alive thread kicks in while uploading a big file.
    "AxisFault
    faultCode: {http://xml.apache.org/axis/}HTTP
    faultSubcode:
    faultString: (409)Conflict
    faultActor:
    faultNode:
    faultDetail:
    {}:return code: 409
    &lt;HTML&gt;&lt;HEAD&gt;&lt;TITLE&gt;409 Conflict&lt;/TITLE&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;H1&gt;409 Conflict&lt;/H1&gt;Concurrent Requests On The Same Session Not Supported&lt;/BODY&gt;&lt;/HTML&gt;
    {http://xml.apache.org/axis/}HttpErrorCode:409
    (409)Conflict
         at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:732)
         at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:143)
         at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
         at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
         at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
         at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
         at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
         at org.apache.axis.client.Call.invoke(Call.java:2748)
         at org.apache.axis.client.Call.invoke(Call.java:2424)
         at org.apache.axis.client.Call.invoke(Call.java:2347)
         at org.apache.axis.client.Call.invoke(Call.java:1804)
         at oracle.ifs.fdk.FileManagerSoapBindingStub.existsRelative(FileManagerSoapBindingStub.java:1138)"
    I don't understand this, as the exception talks about "Concurrent Requests On The Same Session", but if their is already a request going on why is the session timing out in the first place?!
    I must be doing something really stupid somewhere. Aia ajay jay what a unproductive day...
    Any help? It will be greatly appreciated...

  • RPC web service session beans and local interfaces

    I am wondering if it is possible to use EJB 2.0's local
    interface (vs remote interface) with 6.1's RPC web service
    session beans. Since WLS generates the SOAP servlet that
    invokes the RPC session bean and I do not find
    a way to some how tell SOAP servlet to use local interface to
    get the session bean's local home interface, I am not sure
    this can be done.
    Any comments would be appreciated.
    Thanks.
    Peter

    Ta. Thanks for the info.
    Any idea when Local I/F support is due?
    -Nick
    "Neal Yin" <[email protected]> wrote:
    >
    "Nick Minutello" <[email protected]>
    wrote
    in message news:3d4413a4$[email protected]..
    I was just about to post the very same question - but for WLS 7.0.0.1.
    There are essentially two questions:
    1) (from a functional perspective)
    Can I expose Local Interfaces as SOAP using the auto-generation(servicegen ant
    tasks)?Local Interfaces support is coming.
    2) (from a performance perspective)
    Does the generated SOAP implementation go via the (expensive) RemoteInterface
    (ie marshalling) - or is the RMI marshalling optimised out (by setting<enable-call-by-reference>true</>)?
    You can set this option by yourself on your EJB. Web service runtime
    doesn't
    do any magic in this area.
    Regards,
    Nick
    "Peter" <[email protected]> wrote:
    I am wondering if it is possible to use EJB 2.0's local
    interface (vs remote interface) with 6.1's RPC web service
    session beans. Since WLS generates the SOAP servlet that
    invokes the RPC session bean and I do not find
    a way to some how tell SOAP servlet to use local interface to
    get the session bean's local home interface, I am not sure
    this can be done.
    Any comments would be appreciated.
    Thanks.
    Peter

  • Future direction of BEA Web Services? - binary / attachments

    Hello,
    I'm looking at needing to transfer binary data through a web service,
    but can't handle the 4/3+ size increase that occurs when embedding the
    data with base64 encoding.
    I know that WL 8.1sp3 support SwA, but that standard is being deprecated
    in favor of newer technologies like Fast Web Services (based on ASN.1
    encoding rules), MTOM/XOP, Basic Attachments Profile.
    We'd prefer to be able to rely on the support of the application server.
    What is BEA's future direction in terms of this technology? Will they be
    supporting one or all of these binary standards? When is the estimated
    date for this technology to be implemented?
    If these technologies won't be implemented for a while, is it possible
    to plug in 3rd party web services solutions into BEA WL8.1 (e.g. Sun's
    JWSDP, Axis, etc)? I believe it is, but am just asking for the sake of a
    full answer.
    Thanks

    Steve,
    Due to BEA's award winning support they offer, I had to figure this out on my own. After weeks of dealing with a support case they provided me with absolutely nothing. Just as they have done in this thread. I will share what I have done for the mean time to get around their limitations using attachments.
    I used the Axis libraries to create a DIME attachment and call a BEA web service. Since BEA doesn't support Dime, a servlet filter had to be implemented and parse the DIME message prior to the web service received it. I'm sending 2GB files with transfer rates of 6MB/S.
    This is a response from BEA's award winning support:
    "We do not have good specification standard as yet as to how to best solve the issue. It appears like a pretty larger issue to solve because of the lack os standards and specification. Engineering is still researching on the issue and we don't know which version will have the fix."

  • Trouble With Web Services Tutorial Examples

    I am having trouble getting the Web Services Tutorial examples to run.
    For example, when I compiled the hello1 example, and tried to run it, I got a directory listing. All the directory listing contained was the dukewaving.gif file.
    When I tried to run hello2, I got something similar. This time though, there were two jsp files in the listing. By clicking on the first one, I was able to run the application.
    Now I can't run the bookstore1 example. I went back a second time, to be sure that I was following the instructions exactly as written. I am gettng an HTTP Status 404 - Servlet BookStoreServlet is not available.
    I don't know why this is happening. There were no errors when I ran the Ant targets, and the WAR file did get copied to the webapps directory.
    I would be very grateful for any help. I am very new to Java and am finding this very frustrating.
    Thank You,
    Chrissy

    This is what's in my log file. Why is the servlet being marked as unavailable?
    2004-03-13 21:11:37 Manager: deploy: Deploying web application at '/bookstore1'
    2004-03-13 21:11:37 Manager: Uploading WAR file to C:\jwsdp-1.3\webapps\bookstore1.war
    2004-03-13 21:11:37 Manager: Extracting XML file to C:\jwsdp-1.3\conf\Catalina\localhost\bookstore1.xml
    2004-03-13 21:11:37 Manager: install: Installing context configuration at 'file:/C:/jwsdp-1.3/conf/Catalina/localhost/bookstore1.xml' from 'jar:file:/C:/jwsdp-1.3/webapps/bookstore1.war!/'
    2004-03-13 21:13:47 Marking servlet BookStoreServlet as unavailable

  • Life BEA web service

    Hi,
    Can someone help me to find some examples of live/open web services create
    on BEA that i can test my new solution with?
    thanks

    Hello,
    Check out this site: http://webservice.bea.com:7001
    Hope this helps,
    Bruce
    Omri Reuter wrote:
    Hi,
    Can someone help me to find some examples of live/open web services create
    on BEA that i can test my new solution with?
    thanks

  • Web Services Session /Singleton cluster environment

    Hi!
    I am having trouble figuring out how to do sessions in web services.
    I am trying to build an app that uses multiple GUI's in different languages (not java) and we want to implement our business layer with web services.
    I need a session to save user settings, and user info so that I can avoid going to the database and ldap in every call.
    So far my idea is to have a web service that deals with the authentication. If the user is valid, the web service will save in a singleton that has hashmap the user setting and return to the client the hashmap key as a token.
    The client has the responsibility to save the token and to use it in later calls.
    The problem that I have is that a singleton would not work in a cluster environment! And I really don't want to be passing all the user information between calls
    Any ideas how can I solve this???

    Hi Gaurav,
    Yes, the currently running session will be taken care of by the another server node which is up and running.
    Your question: Does this mean that the a session of WebDynpro application will continue to work or the changes are lost and the user needs to login again?
    "The state of the session is maintained in the persistent storage after the last successfully ended request." Which means that for example a user was filling up a form and haven't saved the changes and the server crashes then the data on that form will be lost when the second server node starts processing the request. But if the user had saved the data before the server crashes that state of the session will be stored and the data of the form will be saved and user need not fill it up again. If the Server crashes in between the HTTP request session then the request is assinged to the another server node to generate the response. In none of the case user needs to login again.
    Your question: Fundamentally the question is what WebDynpro uses behind the scenes for maintaining session?
    It uses Java Serialization to serialize the HTTP Sessions
    "Serialization involves saving the current state of an object to a stream, and restoring an equivalent object from that stream. The stream functions as a container for the object. The information stored in the container can later be used to construct an equivalent object containing the same data as the original."
    Edited by: Aishwarya Sharma on Oct 7, 2008 8:07 AM

  • Unsupported Version error when trying to run Web Services Tutorial example

    Hi there,
    I'm trying to run the first example from the Java Web Services Tutorial and get the following error when I type 'asant build' in my Command Window.
    Buildfile: build.xml
    BUILD FAILED
    java.lang.UnsupportedClassVersionError: com/sun/tools/ws/ant/WsImport (Unsupport
    ed major.minor version 49.0)
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
    at org.apache.tools.ant.loader.AntClassLoader2.defineClassFromData(AntCl
    assLoader2.java:76)
    When I do a java -version I see my version is Java 1.5, and I'm not sure why the build is still trying to use Java 1.4. I do not want to delete the 1.4 from my machine as it is used for something else.
    C:\jwstutorial20\examples\jaxws\helloservice>java -version
    java version "1.5.0_09"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b03)
    Java HotSpot(TM) Client VM (build 1.5.0_09-b03, mixed mode, sharing)
    Could you please help me with this problem?
    Thanks in advance.
    Azeem.

    Hi Azeem.
    Check out values specified for JAVA_HOME, PATH and CLASSPATH under environment variable. Was facing the same problem. Changed the values to point to jdk1.5 and it is working now.
    BTW.
    You don't have to uninstall jdk1.4.
    Cheers!!!

  • Web service session question

    i develop a web service from a java class that has get and set method for a int variable.
    first i call set method of web service then i call get method.But i lose the value set before.
    Is it possible to store the value of the variable for the session.

    This is not something related to WS.
    Check your backend java code.

  • Web Service Session Tracking

    Is there a standard protocal that will allow Web Services to be tracked via a session?
    I know that one can do it via an http session, but from what I have read - it is not recommended.
    A correlation ID has been referred to - but is there a standard way of doing this via a correlation ID - I hate to just start creating my own tracking mechanism.
    Thanks in Advance!
    dustoff

    Is there a standard protocal that will allow Web Services to be tracked via a session?
    I know that one can do it via an http session, but from what I have read - it is not recommended.
    A correlation ID has been referred to - but is there a standard way of doing this via a correlation ID - I hate to just start creating my own tracking mechanism.
    Thanks in Advance!
    dustoff

Maybe you are looking for

  • How to get ip number in WSDL instead of host name?

    It could be some simple setting I am overlooking. What is the case. When you type in the URL of the services followed by ?wsdl you will get the WSDL file of that service. In that WSDL file the URL is created using the logical name of the machine on w

  • Why can't I access my iCloud-stored Pages document on my iPhones (Pages iOS)?

    I have the latest iOS my 2 phones.  I have an iCloud account.  The phones are connected to the net. I have the current version of the Pages iOS app on each phone.  I have several Pages documents on my iPhones (created there, locally) and I am able to

  • No option to turn on cellular calls

    I have upgraded to Yosemite and have iOS 8 on my iPhone 5S. The option for iPhone cellular calls has been turn on my iPhone, but when i go to FaceTime > Preferences there is no option to turn on cellular calls like man of the instructions guide state

  • How to get Photoshop CC in French

    I'm a creative cloud member and just downloaded Photoshop CC, but is is in english, usually all my  soft are in french, how can I get it in french ? tks for the help

  • Sourcing of product categories

    Hi, We are running on SRM 5.0 and ECC 6.0 In our scenario--if shopping cart is a catalog item,purchase order is created automatically. If the shopping cart is created using 'describe requirement' link--the shopping cart is sent to sourcing. But in th