[JBossWS] - Username token Profile and JAAS Authentication
by kdeboer
I finally managed to get the username token profile stuff working.
It ends up in the endpoint. But for Servlet Based Endpoints (perhaps also for ejb based endpoints) it seems that noting happens with the username and password. I had expected the JAAS Module associated with the webapp to be called but it is not. So the Principal is also not created.
I am overlooking something?
Even if only using the username token profile option of WS-Security (no message encryption or signing) still a Jboss-wsse-server.xml is needed. The current handelInbound method of WSSecurityDispatcher does not take the username into account it seems.
It would be a good idea to user / develop a suitable CallBackHandler / LoginModule to create the principle. Is any work done on this?
Thnx
Karl
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973559#3973559
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973559
19 years, 7 months
[JBossWS] - Re: Consuming .net Web Service using JBOSSWS
by vimalm
Ok. I tried with a different service and I am getting the same error. Could somebody please help?
Service is located at
http://www.xmlme.com/WSAmazonBox.asmx?WSDL
Here is the client code:
| URL wsdlURL = new URL("http://www.xmlme.com/WSAmazonBox.asmx?WSDL");
| ServiceFactoryImpl servFactory = new ServiceFactoryImpl();
| URL mappingURL = new File("jaxrpc-mapping.xml").toURL();
| QName qname = new QName("http://xmlme.com/WebServices", "AmazonBox");
| ServiceImpl service = (ServiceImpl)servFactory.createService(wsdlURL, qname, mappingURL);
| Call call = service.createCall();
| call.setOperationName(new QName("http://xmlme.com/WebServices", "DvdBox"));
| call.setProperty(Call.SOAPACTION_USE_PROPERTY, Boolean.TRUE);
| call.setProperty(Call.SOAPACTION_URI_PROPERTY, "http://xmlme.com/WebServices/DvdBox");
| call.setTargetEndpointAddress("http://www.xmlme.com/WSAmazonBox.asmx");
| DvdBox req = new DvdBox("Disney");
| Object response = call.invoke(new Object[] {req});
| if(response instanceof DvdBoxResponse) {
| DvdBoxResponse result = (DvdBoxResponse)response;
| System.out.println("Finished" + result.getDvdBoxResult());
| }
|
Here is the exception stack trace I am getting:
| javax.xml.rpc.JAXRPCException: Cannot obtain operation meta data for: {http://xmlme.com/WebServices}DvdBox
| at org.jboss.ws.jaxrpc.CallImpl.getOperationMetaData(CallImpl.java:840)
| at org.jboss.ws.jaxrpc.CallImpl.getOperationMetaData(CallImpl.java:820)
| at org.jboss.ws.jaxrpc.CallImpl.invokeInternal(CallImpl.java:618)
| at org.jboss.ws.jaxrpc.CallImpl.invoke(CallImpl.java:404)
| at xmlme.client.Test.call(Test.java:50)
| at xmlme.client.Test.main(Test.java:21)
|
I have generated the required artifacts from wstools. Set the proxy server settings on the command line.
What I am doing wrong??
Any help is appreciated.
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973557#3973557
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973557
19 years, 7 months
[JBoss Seam] - Re: Using Seam for porlet communication
by jarkko@jab.fi
Yes, it can be dangerous but as i said this is the very naive approach ;)
However, i'm currently (once again) trying to get Facelets work in Seam+Portlet and i'm getting these nice exceptions:
This could help me with the exception i'm currently facing:
anonymous wrote :
|
| java.lang.ClassCastException: com.liferay.portlet.RenderResponseImpl
| at com.sun.facelets.FaceletViewHandler.createResponseWriter(FaceletViewHandler.java:371)
| at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:557)
| at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
| at org.apache.myfaces.portlet.MyFacesGenericPortlet.nonFacesRequest(MyFacesGenericPortlet.java:322)
| at org.apache.myfaces.portlet.MyFacesGenericPortlet.nonFacesRequest(MyFacesGenericPortlet.java:297)
| at org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:379)
| at org.apache.myfaces.portlet.MyFacesGenericPortlet.doView(MyFacesGenericPortlet.java:265)
| at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:235)
| at javax.portlet.GenericPortlet.render(GenericPortlet.java:163)
| at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:89)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
| at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
| at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
| at com.liferay.portlet.CachePortlet._invoke(CachePortlet.java:295)
| at com.liferay.portlet.CachePortlet.render(CachePortlet.java:155)
| at org.apache.jsp.html.portal.render_005fportlet_jsp._jspService(render_005fportlet_jsp.java:708)
| at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
| at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
| at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
| at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
| at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
| at com.liferay.portal.util.PortalUtil.renderPortlet(PortalUtil.java:948)
| at com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processPortlet(RuntimePortletUtil.java:123)
| at com.liferay.portlet.layoutconfiguration.util.velocity.PortletColumnLogic.processContent(PortletColumnLogic.java:76)
| at com.liferay.portlet.layoutconfiguration.util.velocity.TemplateProcessor.processColumn(TemplateProcessor.java:58)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:267)
| at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:197)
| at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:175)
| at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:220)
| at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:230)
| at org.apache.velocity.app.Velocity.evaluate(Velocity.java:316)
| at org.apache.velocity.app.Velocity.evaluate(Velocity.java:210)
| at com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processTemplate(RuntimePortletUtil.java:165)
| at com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processTemplate(RuntimePortletUtil.java:146)
| at org.apache.jsp.html.portal.layout.view.portlet_jsp._jspService(portlet_jsp.java:414)
| at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
| at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
| at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
| at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
| at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
| at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:63)
| at org.apache.jsp.html.portal.layout_jsp._jspService(layout_jsp.java:417)
| at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
| at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
| at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
| at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
| at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
| at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:63)
| at org.apache.jsp.html.themes.classic.templates.portal_005fnormal_jsp._jspService(portal_005fnormal_jsp.java:1024)
| at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
| at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
| at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
| at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
| at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
| at com.liferay.taglib.util.ThemeUtil.includeJSP(ThemeUtil.java:139)
| at com.liferay.taglib.util.ThemeUtil.include(ThemeUtil.java:93)
| at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:58)
| at org.apache.jsp.html.common.themes.portal_jsp._jspx_meth_liferay$1theme_include_1(portal_jsp.java:555)
| at org.apache.jsp.html.common.themes.portal_jsp._jspx_meth_c_otherwise_0(portal_jsp.java:527)
| at org.apache.jsp.html.common.themes.portal_jsp._jspService(portal_jsp.java:433)
| at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
| at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
| at org.apache.jasper.servlet.JspServlet.service(J
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973553#3973553
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973553
19 years, 7 months
[JBoss Seam] - Re: Drop Down Menu Using Seam and Facelets
by yj4jboss
Hello Denis,
I am trying to get your example of implementing SelectItems without custom annotations. I have included the the following code in my SFSB.
|
|
|
| @Stateful
| @Name("companySearch")
| @Scope(ScopeType.SESSION)
| @Interceptors(SeamInterceptor.class)
|
| public class CompanySearchBean implements CompanySearch, Serializable {
|
|
| <! -- Bean Specific Code goes here -->
|
| public Map<String,Object> model;
|
|
| private void fillMaps(){
| model = new TreeMap<String,Object>();
| model.put("(Empty)","-1"); // Add EMPTY element if needed
| for (Object o: yearList) {
| String label = o.toString();
| model.put(label, o );
| }
| }
|
|
| public Map<String,Object> getModel(){ // f:selectItems value
| log.debug("Initializing Model");
| log.debug("Model Size = "+model.size());
| return model;
| }
|
|
|
|
| public Converter getConverter() {
| return new ReferenceConverter(yearList);
| }
|
This is my code in the my search.xhtml file
|
| <h:selectOneMenu converter="#{companySearch.converter}">
| <f:selectItems value="#{companySearch.model}" />
| </h:selectOneMenu>
|
Is this the right approach ??
I am getting a "Cannot get property model" error
Plz help....and thnx in advance....
Yogesh
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973547#3973547
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973547
19 years, 7 months