Hi,

I am using as a base, the Avitek Medical Records application.

I log into the patient web app, by using the username "larry@celtics.com". I can see with that the Security subject has been created with that principal.

Then I go to another web app, in another ear: Physician. From there I sent the username to the WebService in order that WebService run with the Subject of that already logged in user.

My problem is: it does not accept only a username, with NO password.

QUESTION: Is there a way to run a WebService using the username if that user is already logged in the realm, without re-authenticating him.

---------------------------
Here is an excerpt of my web service client code:

...webservice client {
WebServiceSession session = serviceContext.getSession();
UserInfo ui = new UserInfo(bup);
session.setAttribute(WSSEClientHandler.REQUEST_USE RINFO, ui);

// Add the username token to the SOAP header.
SecurityElementFactory factory = SecurityElementFactory.getDefaultFactory();
Security security = factory.createSecurity(null);
security.addToken(ui);
session.setAttribute(WSSEClientHandler.REQUEST_SEC URITY, security);
}

------------------------------

Here is an excerpt of my WebService server method, in order to see under which Principal it is run:

...webserviceMethod() {
javax.security.auth.Subject subject = Security.getCurrentSubject();
logger.info("WebService Subject =" + SubjectUtils.displaySubject(subject));
logger.info("WebService Subject username=" + SubjectUtils.getUsername(subject));
}

---------------------------------
RESULTS 1

If I do NOT have any branch in my web-services.xml, here is the exception I get:
---------------------------------

Got a Web Service Request at URL: '/ws_medrec/MedRecWebServices' for web service 'null'
Got a Web Service Request at URL: '/MedRecWebServices' for web service 'MedRecWebServices'
INFO [10:48:08] (PhysicianSessionEJB.java:setSessionContext:68) - Client W.S. - Active BUP used to login to remote WebService: larry@celtics.com
INFO [10:48:08] (PhysicianSessionEJB.java:searchPatientsByLastName Wild:250) - By wildcard last name.

URL : http://localhost:7001/ws_medrec/MedRecWebServices
Headers :

"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Id-oKOBR7i21PQ9mvvOSj5lFtKH">larry@celtics.comCouples

Got a Web Service Request at URL: '/ws_medrec/MedRecWebServices' for web service 'null'
Got a Web Service Request at URL: '/MedRecWebServices' for web service 'MedRecWebServices'


xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

env:mustUnderstand="1">
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
wsu:Id="Id-oKOBR7i21PQ9mvvOSj5lFtKH">
larry@celtics.com





Couples




xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">


env:Server
Exception during processing: javax.xml.soap.SOAPException: Unable to handle mustUnderstand header: wsse:Security (see Fault Detail for stacktrace)

javax.xml.soap.SOAPException: Unable to handle mustUnderstand header: wsse:Security
at weblogic.webservice.core.DefaultMessage.checkMustU nderstand(DefaultMessage.java:415)
at weblogic.webservice.core.DefaultMessage.implicitHe aderToJava(DefaultMessage.java:374)
at weblogic.webservice.core.DefaultMessage.toJava(Def aultMessage.java:436)
at weblogic.webservice.core.handler.InvokeHandler.han dleRequest(InvokeHandler.java:93)
at weblogic.webservice.core.HandlerChainImpl.handleRe quest(HandlerChainImpl.java:143)
at weblogic.webservice.core.DefaultOperation.process( DefaultOperation.java:535)
at weblogic.webservice.server.Dispatcher.process(Disp atcher.java:204)
at weblogic.webservice.server.Dispatcher.doDispatch(D ispatcher.java:176)
at weblogic.webservice.server.Dispatcher.dispatch(Dis patcher.java:96)
at weblogic.webservice.server.WebServiceManager.dispa tch(WebServiceManager.java:98)
at weblogic.webservice.server.servlet.WebServiceServl et.serverSideInvoke(WebServiceServlet.java:297)
at weblogic.webservice.server.servlet.ServletBase.doP ost(ServletBase.java:485)
at weblogic.webservice.server.servlet.WebServiceServl et.doPost(WebServiceServlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletI nvocationAction.run(ServletStubImpl.java:996)
at weblogic.servlet.internal.ServletStubImpl.invokeSe rvlet(ServletStubImpl.java:419)
at weblogic.servlet.internal.ServletStubImpl.invokeSe rvlet(ServletStubImpl.java:315)
at weblogic.servlet.internal.WebAppServletContext$Ser vletInvocationAction.run(WebAppServletContext.java :6452)
at weblogic.security.acl.internal.AuthenticatedSubjec t.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Se curityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.inv okeServlet(WebAppServletContext.java:3661)
at weblogic.servlet.internal.ServletRequestImpl.execu te(ServletRequestImpl.java:2630)
at weblogic.kernel.ExecuteThread.execute(ExecuteThrea d.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.ja va:178)





URL : http://localhost:7001/ws_medrec/MedRecWebServices
Response Code :500
Headers :
Date=Thu, 07 Oct 2004 14:48:08 GMT
Server=WebLogic Server 8.1 SP3 Tue Jun 29 23:11:19 PDT 2004 404973
Content-Length=2817
Content-Type=text/xml
Connection=Keep-Alive
Envelope :
env:ServerException during processing: javax.xml.soap.SOAPException: Unable to handle mustUnderstand header: wsse:Secu
rity (see Fault Detail for stacktrace)
javax.xml.soap.SOAPException: Unable to hand
le mustUnderstand header: wsse:Security
at weblogic.webservice.core.DefaultMessage.checkMustU nderstand(DefaultMessage.java:415)
at weblogic.webservice.core.DefaultMessage.implicitHe aderToJava(DefaultMessage.java:374)
at weblogic.webservice.core.DefaultMessage.toJava(Def aultMessage.java:436)
at weblogic.webservice.core.handler.InvokeHandler.han dleRequest(InvokeHandler.java:93)
at weblogic.webservice.core.HandlerChainImpl.handleRe quest(HandlerChainImpl.java:143)
at weblogic.webservice.core.DefaultOperation.process( DefaultOperation.java:535)
at weblogic.webservice.server.Dispatcher.process(Disp atcher.java:204)
at weblogic.webservice.server.Dispatcher.doDispatch(D ispatcher.java:176)
at weblogic.webservice.server.Dispatcher.dispatch(Dis patcher.java:96)
at weblogic.webservice.server.WebServiceManager.dispa tch(WebServiceManager.java:98)
at weblogic.webservice.server.servlet.WebServiceServl et.serverSideInvoke(WebServiceServlet.java:297)
at weblogic.webservice.server.servlet.ServletBase.doP ost(ServletBase.java:485)
at weblogic.webservice.server.servlet.WebServiceServl et.doPost(WebServiceServlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletI nvocationAction.run(ServletStubImpl.java:996)
at weblogic.servlet.internal.ServletStubImpl.invokeSe rvlet(ServletStubImpl.java:419)
at weblogic.servlet.internal.ServletStubImpl.invokeSe rvlet(ServletStubImpl.java:315)
at weblogic.servlet.internal.WebAppServletContext$Ser vletInvocationAction.run(WebAppServletContext.java :6452)
at weblogic.security.acl.internal.AuthenticatedSubjec t.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Se curityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.inv okeServlet(WebAppServletContext.java:3661)
at weblogic.servlet.internal.ServletRequestImpl.execu te(ServletRequestImpl.java:2630)
at weblogic.kernel.ExecuteThread.execute(ExecuteThrea d.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.ja va:178)


ERROR [10:48:08] (PhysicianSessionEJB.java:searchPatientsByLastName Wild:272) - SOAP Fault:javax.xml.rpc.soap.SOAPFaultException: Exception during processing: javax.xml.soap.SOAPException: Unable to ha
ndle mustUnderstand header: wsse:Security (see Fault Detail for stacktrace)
Detail:

javax.xml.soap.SOAPException: Unable to handle mustUnderstand header: wsse:Security
at weblogic.webservice.core.DefaultMessage.checkMustU nderstand(DefaultMessage.java:415)
at weblogic.webservice.core.DefaultMessage.implicitHe aderToJava(DefaultMessage.java:374)
at weblogic.webservice.core.DefaultMessage.toJava(Def aultMessage.java:436)
at weblogic.webservice.core.handler.InvokeHandler.han dleRequest(InvokeHandler.java:93)
at weblogic.webservice.core.HandlerChainImpl.handleRe quest(HandlerChainImpl.java:143)
at weblogic.webservice.core.DefaultOperation.process( DefaultOperation.java:535)
at weblogic.webservice.server.Dispatcher.process(Disp atcher.java:204)
at weblogic.webservice.server.Dispatcher.doDispatch(D ispatcher.java:176)
at weblogic.webservice.server.Dispatcher.dispatch(Dis patcher.java:96)
at weblogic.webservice.server.WebServiceManager.dispa tch(WebServiceManager.java:98)
at weblogic.webservice.server.servlet.WebServiceServl et.serverSideInvoke(WebServiceServlet.java:297)
at weblogic.webservice.server.servlet.ServletBase.doP ost(ServletBase.java:485)
at weblogic.webservice.server.servlet.WebServiceServl et.doPost(WebServiceServlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletI nvocationAction.run(ServletStubImpl.java:996)
at weblogic.servlet.internal.ServletStubImpl.invokeSe rvlet(ServletStubImpl.java:419)
at weblogic.servlet.internal.ServletStubImpl.invokeSe rvlet(ServletStubImpl.java:315)
at weblogic.servlet.internal.WebAppServletContext$Ser vletInvocationAction.run(WebAppServletContext.java :6452)
at weblogic.security.acl.internal.AuthenticatedSubjec t.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Se curityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.inv okeServlet(WebAppServletContext.java:3661)
at weblogic.servlet.internal.ServletRequestImpl.execu te(ServletRequestImpl.java:2630)
at weblogic.kernel.ExecuteThread.execute(ExecuteThrea d.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.ja va:178)

; nested exception is:
javax.xml.rpc.soap.SOAPFaultException: Exception during processing: javax.xml.soap.SOAPException: Unable to handle mustUnderstand header: wsse:Security (see Fault Detail for stacktrace)
java.rmi.RemoteException: SOAP Fault:javax.xml.rpc.soap.SOAPFaultException: Exception during processing: javax.xml.soap.SOAPException: Unable to handle mustUnderstand header: wsse:Security (see Fault
Detail for stacktrace)
Detail:

javax.xml.soap.SOAPException: Unable to handle mustUnderstand header: wsse:Security
at weblogic.webservice.core.DefaultMessage.checkMustU nderstand(DefaultMessage.java:415)
at weblogic.webservice.core.DefaultMessage.implicitHe aderToJava(DefaultMessage.java:374)
at weblogic.webservice.core.DefaultMessage.toJava(Def aultMessage.java:436)
at weblogic.webservice.core.handler.InvokeHandler.han dleRequest(InvokeHandler.java:93)
at weblogic.webservice.core.HandlerChainImpl.handleRe quest(HandlerChainImpl.java:143)
at weblogic.webservice.core.DefaultOperation.process( DefaultOperation.java:535)
at weblogic.webservice.server.Dispatcher.process(Disp atcher.java:204)
at weblogic.webservice.server.Dispatcher.doDispatch(D ispatcher.java:176)
at weblogic.webservice.server.Dispatcher.dispatch(Dis patcher.java:96)
at weblogic.webservice.server.WebServiceManager.dispa tch(WebServiceManager.java:98)
at weblogic.webservice.server.servlet.WebServiceServl et.serverSideInvoke(WebServiceServlet.java:297)
at weblogic.webservice.server.servlet.ServletBase.doP ost(ServletBase.java:485)
at weblogic.webservice.server.servlet.WebServiceServl et.doPost(WebServiceServlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletI nvocationAction.run(ServletStubImpl.java:996)
at weblogic.servlet.internal.ServletStubImpl.invokeSe rvlet(ServletStubImpl.java:419)
at weblogic.servlet.internal.ServletStubImpl.invokeSe rvlet(ServletStubImpl.java:315)
at weblogic.servlet.internal.WebAppServletContext$Ser vletInvocationAction.run(WebAppServletContext.java :6452)
at weblogic.security.acl.internal.AuthenticatedSubjec t.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Se curityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.inv okeServlet(WebAppServletContext.java:3661)
at weblogic.servlet.internal.ServletRequestImpl.execu te(ServletRequestImpl.java:2630)
at weblogic.kernel.ExecuteThread.execute(ExecuteThrea d.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.ja va:178)

; nested exception is:
javax.xml.rpc.soap.SOAPFaultException: Exception during processing: javax.xml.soap.SOAPException: Unable to handle mustUnderstand header: wsse:Security (see Fault Detail for stacktrace)
at com.bea.medrec.webservices.MedRecWebServicesPort_S tub.findPatientByLastNameWild(MedRecWebServicesPor t_Stub.java:87)
at com.bea.medrec.controller.PhysicianSessionEJB.sear chPatientsByLastNameWild(PhysicianSessionEJB.java: 260)
at com.bea.medrec.controller.PhysicianSessionEJB.sear chPatients(PhysicianSessionEJB.java:225)
at com.bea.medrec.controller.PhysicianSessionEJB_n7en xc_EOImpl.searchPatients(PhysicianSessionEJB_n7enx c_EOImpl.java:254)
at com.bea.medrec.actions.SearchResultsAction.process Search(SearchResultsAction.java:117)
at com.bea.medrec.actions.SearchResultsAction.search( SearchResultsAction.java:88)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.struts.actions.DispatchAction.dispatchM ethod(DispatchAction.java:280)

at org.apache.struts.actions.LookupDispatchAction.exe cute(LookupDispatchAction.java:252)
at com.bea.medrec.actions.BaseLookupDispatchAction.ex ecute(BaseLookupDispatchAction.java:59)
at com.bea.medrec.actions.PhysBaseLookupDispatchActio n.execute(PhysBaseLookupDispatchAction.java:50)
at org.apache.struts.action.RequestProcessor.processA ctionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process( RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(Act ionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(Acti onServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletI nvocationAction.run(ServletStubImpl.java:996)
at weblogic.servlet.internal.ServletStubImpl.invokeSe rvlet(ServletStubImpl.java:419)
at weblogic.servlet.internal.TailFilter.doFilter(Tail Filter.java:28)
at weblogic.servlet.internal.FilterChainImpl.doFilter (FilterChainImpl.java:27)
at com.bea.medrec.filters.RequestEncodingFilter.doFil ter(RequestEncodingFilter.java:44)
at weblogic.servlet.internal.FilterChainImpl.doFilter (FilterChainImpl.java:27)
at weblogic.servlet.internal.WebAppServletContext$Ser vletInvocationAction.run(WebAppServletContext.java :6458)
at weblogic.security.acl.internal.AuthenticatedSubjec t.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Se curityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.inv okeServlet(WebAppServletContext.java:3661)
at weblogic.servlet.internal.ServletRequestImpl.execu te(ServletRequestImpl.java:2630)
at weblogic.kernel.ExecuteThread.execute(ExecuteThrea d.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.ja va:178)
Caused by: javax.xml.rpc.soap.SOAPFaultException: Exception during processing: javax.xml.soap.SOAPException: Unable to handle mustUnderstand header: wsse:Security (see Fault Detail for stacktrace)
at weblogic.webservice.core.ClientDispatcher.receive( ClientDispatcher.java:313)
at weblogic.webservice.core.ClientDispatcher.dispatch (ClientDispatcher.java:144)
at weblogic.webservice.core.DefaultOperation.invoke(D efaultOperation.java:457)
at weblogic.webservice.core.DefaultOperation.invoke(D efaultOperation.java:443)
at weblogic.webservice.core.rpc.StubImpl._invoke(Stub Impl.java:290)
at com.bea.medrec.webservices.MedRecWebServicesPort_S tub.findPatientByLastNameWild(MedRecWebServicesPor t_Stub.java:82)
... 32 more
ERROR [10:48:08] (BaseLookupDispatchAction.java:throwClientExceptio n:199) - EJB Exception: ; nested exception is:
javax.ejb.EJBException: nested exception is: java.rmi.RemoteException: SOAP Fault:javax.xml.rpc.soap.SOAPFaultException: Exception during processing: javax.xml.soap.SOAPException: Unable to ha
ndle mustUnderstand header: wsse:Security (see Fault Detail for stacktrace)
Detail:

javax.xml.soap.SOAPException: Unable to handle mustUnderstand header: wsse:Security
at weblogic.webservice.core.DefaultMessage.checkMustU nderstand(DefaultMessage.java:415)
at weblogic.webservice.core.DefaultMessage.implicitHe aderToJava(DefaultMessage.java:374)
at weblogic.webservice.core.DefaultMessage.toJava(Def aultMessage.java:436)
at weblogic.webservice.core.handler.InvokeHandler.han dleRequest(InvokeHandler.java:93)
at weblogic.webservice.core.HandlerChainImpl.handleRe quest(HandlerChainImpl.java:143)
at weblogic.webservice.core.DefaultOperation.process( DefaultOperation.java:535)
at weblogic.webservice.server.Dispatcher.process(Disp atcher.java:204)
at weblogic.webservice.server.Dispatcher.doDispatch(D ispatcher.java:176)
at weblogic.webservice.server.Dispatcher.dispatch(Dis patcher.java:96)
at weblogic.webservice.server.WebServiceManager.dispa tch(WebServiceManager.java:98)
at weblogic.webservice.server.servlet.WebServiceServl et.serverSideInvoke(WebServiceServlet.java:297)
at weblogic.webservice.server.servlet.ServletBase.doP ost(ServletBase.java:485)
at weblogic.webservice.server.servlet.WebServiceServl et.doPost(WebServiceServlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletI nvocationAction.run(ServletStubImpl.java:996)
at weblogic.servlet.internal.ServletStubImpl.invokeSe rvlet(ServletStubImpl.java:419)
at weblogic.servlet.internal.ServletStubImpl.invokeSe rvlet(ServletStubImpl.java:315)
at weblogic.servlet.internal.WebAppServletContext$Ser vletInvocationAction.run(WebAppServletContext.java :6452)
at weblogic.security.acl.internal.AuthenticatedSubjec t.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Se curityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.inv okeServlet(WebAppServletContext.java:3661)
at weblogic.servlet.internal.ServletRequestImpl.execu te(ServletRequestImpl.java:2630)
at weblogic.kernel.ExecuteThread.execute(ExecuteThrea d.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.ja va:178)

; nested exception is:
javax.xml.rpc.soap.SOAPFaultException: Exception during processing: javax.xml.soap.SOAPException: Unable to handle mustUnderstand header: wsse:Security (see Fault Detail for stacktrace)
ERROR [10:48:08] (BaseLookupDispatchAction.java:handleException:219 ) - java.rmi.RemoteException: EJB Exception: ; nested exception is:
javax.ejb.EJBException: nested exception is: java.rmi.RemoteException: SOAP Fault:javax.xml.rpc.soap.SOAPFaultException: Exception during processing: javax.xml.soap.SOAPException: Unable to ha
ndle mustUnderstand header: wsse:Security (see Fault Detail for stacktrace)
Detail:

javax.xml.soap.SOAPException: Unable to handle mustUnderstand header: wsse:Security
at weblogic.webservice.core.DefaultMessage.checkMustU nderstand(DefaultMessage.java:415)
at weblogic.webservice.core.DefaultMessage.implicitHe aderToJava(DefaultMessage.java:374)
at weblogic.webservice.core.DefaultMessage.toJava(Def aultMessage.java:436)
at weblogic.webservice.core.handler.InvokeHandler.han dleRequest(InvokeHandler.java:93)
at weblogic.webservice.core.HandlerChainImpl.handleRe quest(HandlerChainImpl.java:143)
at weblogic.webservice.core.DefaultOperation.process( DefaultOperation.java:535)
at weblogic.webservice.server.Dispatcher.process(Disp atcher.java:204)
at weblogic.webservice.server.Dispatcher.doDispatch(D ispatcher.java:176)
at weblogic.webservice.server.Dispatcher.dispatch(Dis patcher.java:96)
at weblogic.webservice.server.WebServiceManager.dispa tch(WebServiceManager.java:98)
at weblogic.webservice.server.servlet.WebServiceServl et.serverSideInvoke(WebServiceServlet.java:297)
at weblogic.webservice.server.servlet.ServletBase.doP ost(ServletBase.java:485)
at weblogic.webservice.server.servlet.WebServiceServl et.doPost(WebServiceServlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletI nvocationAction.run(ServletStubImpl.java:996)
at weblogic.servlet.internal.ServletStubImpl.invokeSe rvlet(ServletStubImpl.java:419)
at weblogic.servlet.internal.ServletStubImpl.invokeSe rvlet(ServletStubImpl.java:315)
at weblogic.servlet.internal.WebAppServletContext$Ser vletInvocationAction.run(WebAppServletContext.java :6452)
at weblogic.security.acl.internal.AuthenticatedSubjec t.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Se curityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.inv okeServlet(WebAppServletContext.java:3661)
at weblogic.servlet.internal.ServletRequestImpl.execu te(ServletRequestImpl.java:2630)
at weblogic.kernel.ExecuteThread.execute(ExecuteThrea d.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.ja va:178)

; nested exception is:
javax.xml.rpc.soap.SOAPFaultException: Exception during processing: javax.xml.soap.SOAPException: Unable to handle mustUnderstand header: wsse:Security (see Fault Detail for stacktrace)
INFO [10:48:08] (BaseLookupDispatchAction.java:handleException:221 ) - Redirect link: search.do


---------------------------------
RESULTS 2

If I DO have the following minimal branch in my web-services.xml, here is the exception I get:




---------------------------------

Got a Web Service Request at URL: '/ws_medrec/MedRecWebServices' for web service 'null'
Got a Web Service Request at URL: '/MedRecWebServices' for web service 'MedRecWebServices'
INFO [11:53:35] (PhysicianSessionEJB.java:setSessionContext:68) - Client W.S. - Active BUP used to login to remote WebService: larry@celtics.com
INFO [11:53:35] (PhysicianSessionEJB.java:searchPatientsByLastName Wild:250) - By wildcard last name.

URL : http://localhost:7001/ws_medrec/MedRecWebServices
Headers :

"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Id-bnFSHAnkYUKUr4i8BsQbAx0s">larry@celtics.comCouples

Got a Web Service Request at URL: '/ws_medrec/MedRecWebServices' for web service 'null'
Got a Web Service Request at URL: '/MedRecWebServices' for web service 'MedRecWebServices'

URL : http://localhost:7001/ws_medrec/MedRecWebServices
Response Code :500
Headers :
Date=Thu, 07 Oct 2004 15:53:35 GMT
Server=WebLogic Server 8.1 SP3 Tue Jun 29 23:11:19 PDT 2004 404973
Content-Length=491
Content-Type=text/xml
Connection=Keep-Alive
Set-Cookie=JSESSIONID=Blm1Ncy2gmJKwhQm1Zn5x7zdn7xFRgYy 12Jv1Y6p2l4FDxXkv0wL!407980274; path=/
Envelope :
fault:InvalidSecurityU
sernameToken did not contain a password


ERROR [11:53:35] (PhysicianSessionEJB.java:searchPatientsByLastName Wild:272) - SOAP Fault:javax.xml.rpc.soap.SOAPFaultException: UsernameToken did not contain a password
Detail:
null; nested exception is:
javax.xml.rpc.soap.SOAPFaultException: UsernameToken did not contain a password
java.rmi.RemoteException: SOAP Fault:javax.xml.rpc.soap.SOAPFaultException: UsernameToken did not contain a password
Detail:
null; nested exception is:
javax.xml.rpc.soap.SOAPFaultException: UsernameToken did not contain a password
at com.bea.medrec.webservices.MedRecWebServicesPort_S tub.findPatientByLastNameWild(MedRecWebServicesPor t_Stub.java:87)
at com.bea.medrec.controller.PhysicianSessionEJB.sear chPatientsByLastNameWild(PhysicianSessionEJB.java: 260)
at com.bea.medrec.controller.PhysicianSessionEJB.sear chPatients(PhysicianSessionEJB.java:225)
at com.bea.medrec.controller.PhysicianSessionEJB_n7en xc_EOImpl.searchPatients(PhysicianSessionEJB_n7enx c_EOImpl.java:254)
at com.bea.medrec.actions.SearchResultsAction.process Search(SearchResultsAction.java:117)
at com.bea.medrec.actions.SearchResultsAction.search( SearchResultsAction.java:88)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.struts.actions.DispatchAction.dispatchM ethod(DispatchAction.java:280)
at org.apache.struts.actions.LookupDispatchAction.exe cute(LookupDispatchAction.java:252)
at com.bea.medrec.actions.BaseLookupDispatchAction.ex ecute(BaseLookupDispatchAction.java:59)
at com.bea.medrec.actions.PhysBaseLookupDispatchActio n.execute(PhysBaseLookupDispatchAction.java:50)
at org.apache.struts.action.RequestProcessor.processA ctionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process( RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(Act ionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(Acti onServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletI nvocationAction.run(ServletStubImpl.java:996)
at weblogic.servlet.internal.ServletStubImpl.invokeSe rvlet(ServletStubImpl.java:419)
at weblogic.servlet.internal.TailFilter.doFilter(Tail Filter.java:28)
at weblogic.servlet.internal.FilterChainImpl.doFilter (FilterChainImpl.java:27)
at com.bea.medrec.filters.RequestEncodingFilter.doFil ter(RequestEncodingFilter.java:44)
at weblogic.servlet.internal.FilterChainImpl.doFilter (FilterChainImpl.java:27)
at weblogic.servlet.internal.WebAppServletContext$Ser vletInvocationAction.run(WebAppServletContext.java :6458)
at weblogic.security.acl.internal.AuthenticatedSubjec t.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Se curityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.inv okeServlet(WebAppServletContext.java:3661)
at weblogic.servlet.internal.ServletRequestImpl.execu te(ServletRequestImpl.java:2630)
at weblogic.kernel.ExecuteThread.execute(ExecuteThrea d.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.ja va:178)
Caused by: javax.xml.rpc.soap.SOAPFaultException: UsernameToken did not contain a password
at weblogic.webservice.core.ClientDispatcher.receive( ClientDispatcher.java:313)
at weblogic.webservice.core.ClientDispatcher.dispatch (ClientDispatcher.java:144)
at weblogic.webservice.core.DefaultOperation.invoke(D efaultOperation.java:457)
at weblogic.webservice.core.DefaultOperation.invoke(D efaultOperation.java:443)
at weblogic.webservice.core.rpc.StubImpl._invoke(Stub Impl.java:290)
at com.bea.medrec.webservices.MedRecWebServicesPort_S tub.findPatientByLastNameWild(MedRecWebServicesPor t_Stub.java:82)
... 32 more
ERROR [11:53:35] (BaseLookupDispatchAction.java:throwClientExceptio n:199) - EJB Exception: ; nested exception is:
javax.ejb.EJBException: nested exception is: java.rmi.RemoteException: SOAP Fault:javax.xml.rpc.soap.SOAPFaultException: UsernameToken did not contain a password
Detail:
null; nested exception is:
javax.xml.rpc.soap.SOAPFaultException: UsernameToken did not contain a password
ERROR [11:53:35] (BaseLookupDispatchAction.java:handleException:219 ) - java.rmi.RemoteException: EJB Exception: ; nested exception is:
javax.ejb.EJBException: nested exception is: java.rmi.RemoteException: SOAP Fault:javax.xml.rpc.soap.SOAPFaultException: UsernameToken did not contain a password
Detail:
null; nested exception is:
javax.xml.rpc.soap.SOAPFaultException: UsernameToken did not contain a password
INFO [11:53:35] (BaseLookupDispatchAction.java:handleException:221 ) - Redirect link: search.do