[JBossWS] - WS-Security trouble: {http://www.w3.org/2005/08/addressing}A
by timeagentess
Hello all,
I am trying to use WS-Security and have a client and web service exchange signed messages.
However, I have run into some trouble -- can't get rid of this error (seen on both server and client consoles):
anonymous wrote : ERROR [SOAPFaultHelperJAXWS] SOAP request exception
| javax.xml.ws.addressing.AddressingException: Required element {http://www.w3.org/2005/08/addressing}Action is missing
|
| at org.jboss.ws.extensions.addressing.soap.SOAPAddressingPropertiesImpl.getRequiredHeaderContent(SOAPAddressingPropertiesImpl.java:71)
| at org.jboss.ws.extensions.addressing.soap.SOAPAddressingPropertiesImpl.readHeaders(SOAPAddressingPropertiesImpl.java:141)
| at org.jboss.ws.extensions.addressing.jaxws.WSAddressingServerHandler.handleInbound(WSAddressingServerHandler.java:82)
| [...]
|
My configuration is JBoss 4.0.5 & JBossWS 2.0.0, and the files as described below.
I. Web service, deployed as SLSB in ear archive:
|-ejb.jar (contains Endpoint implementation WSTwoServiceBean.java)
|-META-INF
|---server.keystore
|---server.truststore
|---application.xml
|---jboss-wsse-server.xml
|---standard-jaxws-endpoint-config.xml
Service endpoint implementation: WSTwoServiceBean.java
//EJB3 annotations
| @javax.ejb.Stateless
| @org.jboss.annotation.ejb.RemoteBinding(jndiBinding = "WebServices/WSTwoServiceBeanInterface")
| @javax.ejb.Remote({com.atb.webservices.wstwo.WSTwoServiceBeanInterface.class})
|
| // WS annotations
| @javax.jws.WebService(endpointInterface = "com.atb.webservices.wstwo.WSTwoRemoteInterface", targetNamespace = "http://localhost:8080/atb")
| @org.jboss.wsf.spi.annotation.WebContext(contextRoot = "/webservices-ws", urlPattern="/services/WSTwo/*")
| @javax.jws.soap.SOAPBinding(style = javax.jws.soap.SOAPBinding.Style.DOCUMENT, use = javax.jws.soap.SOAPBinding.Use.LITERAL, parameterStyle = javax.jws.soap.SOAPBinding.ParameterStyle.WRAPPED)
| @HandlerChain(file="resource://META-INF/standard-jaxws-endpoint-config.xml")
| @EndpointConfig(configName = "Standard WSSecurity Endpoint")
| @SecurityDomain("JBossWS")
| public class WSTwoServiceBean implements WSTwoServiceBeanInterface {
| @WebMethod
| public String hello(String s){
| return "Hello, " + s + "!";
| }
| }
|
jboss-wsse-server.xml:
<jboss-ws-security xmlns="http://www.jboss.com/ws-security/config"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://www.jboss.com/ws-security/config
| http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
| <key-store-file>META-INF/server.keystore</key-store-file>
| <key-store-password>server</key-store-password>
| <trust-store-file>META-INF/server.truststore</trust-store-file>
| <trust-store-password>server</trust-store-password>
| <config>
| <sign type="jks" alias="server"/>
| <requires>
| <signature/>
| </requires>
| </config>
| </jboss-ws-security>
standard-jaxws-endpoint-config.xml:
<jaxws-config xmlns="urn:jboss:jaxws-config:2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:javaee="http://java.sun.com/xml/ns/javaee"
| xsi:schemaLocation="urn:jboss:jaxws-config:2.0 jaxws-config_2_0.xsd">
|
| <endpoint-config>
| <config-name>Standard WSSecurity Endpoint</config-name>
| <post-handler-chains>
| <javaee:handler-chain>
| <javaee:protocol-bindings>##SOAP11_HTTP</javaee:protocol-bindings>
| <javaee:handler>
| <javaee:handler-name>WSSecurity Handler</javaee:handler-name>
| <javaee:handler-class>org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerServer</javaee:handler-class>
| </javaee:handler>
| </javaee:handler-chain>
| </post-handler-chains>
| </endpoint-config>
|
| </jaxws-config>
|
II. Client, standalone application:
|-TestWS.java
|-META-INF
|---jboss-wsse-client.xml
|---standard-jaxws-client-config.xml
|---client.keystore
|---client.truststore
(Even though, being a standalone client, I suspect placing the files in a folder other than META-INF wouldn't make any difference)
TestWS.java:
| WSTwoServiceBeanService wstwoService = new WSTwoServiceBeanService();
| WSTwo wstwo = wstwoService.getPort(WSTwo.class);
|
| URL securityURL = null;
| URL securityConfig = null;
| try {
| securityURL = new File("META-INF/jboss-wsse-client.xml").toURL();
| securityConfig = new File("META-INF/standard-jaxws-client-config.xml").toURL();
| } catch (MalformedURLException e) {
| System.out.println(e);
| }
| ((StubExt)wstwo).setSecurityConfig(securityURL.toExternalForm());
| ((StubExt)wstwo).setConfigName("Standard WSSecurity Client", securityConfig.toExternalForm());
|
| String response = wstwo.hello("world");
| System.out.println("Web service answered with: " + response);
|
jboss-wsse-client.xml:
<jboss-ws-security xmlns="http://www.jboss.com/ws-security/config"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://www.jboss.com/ws-security/config
| http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
| <key-store-file>d:/workspace/wsclient/META-INF/client.keystore</key-store-file>
| <key-store-password>client</key-store-password>
| <key-store-type>jks</key-store-type>
| <trust-store-file>d:/workspace/wsclient/META-INF/client.truststore</trust-store-file>
| <trust-store-password>client</trust-store-password>
| <trust-store-type>jks</trust-store-type>
| <config>
| <sign type="jks" alias="client"/>
| <requires>
| <signature/>
| </requires>
| </config>
| </jboss-ws-security>
standard-jaxws-client-config.xml:
<jaxws-config xmlns="urn:jboss:jaxws-config:2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:javaee="http://java.sun.com/xml/ns/javaee"
| xsi:schemaLocation="urn:jboss:jaxws-config:2.0 jaxws-config_2_0.xsd">
|
| <client-config>
| <config-name>Standard WSSecurity Client</config-name>
| <post-handler-chains>
| <javaee:handler-chain>
| <javaee:protocol-bindings>##SOAP11_HTTP</javaee:protocol-bindings>
| <javaee:handler>
| <javaee:handler-name>WSSecurityHandlerOutbound</javaee:handler-name>
| <javaee:handler-class>org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerClient</javaee:handler-class>
| </javaee:handler>
| </javaee:handler-chain>
| </post-handler-chains>
| </client-config>
|
| </jaxws-config>
|
Thank you!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4160786#4160786
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4160786
17 years, 9 months
[JBoss Cache: Core Edition] - Node in eviction queue not seen in printDetails
by jorgemoralespou_2
Hi,
I have this trace in my logs:
| 2008-06-26 11:31:41,601 TRACE [org.jboss.cache.eviction.BaseEvictionAlgorithm] Recycle queue is empty
| 2008-06-26 11:31:41,601 TRACE [org.jboss.cache.eviction.BaseEvictionAlgorithm] process(): region: /_default_/
| 2008-06-26 11:31:41,601 TRACE [org.jboss.cache.eviction.BaseEvictionAlgorithm] processed 0 node events in region: /_default_/
| 2008-06-26 11:31:41,601 TRACE [org.jboss.cache.eviction.BaseEvictionAlgorithm] Recycle queue is empty
| 2008-06-26 11:31:41,601 TRACE [org.jboss.cache.eviction.LRUAlgorithm] Node /THIRD_PARTY_DAILY_COUNTERS/25/32:-:1111 has been idle for 86213470ms
| 2008-06-26 11:31:41,601 TRACE [org.jboss.cache.eviction.LRUAlgorithm] Node /THIRD_PARTY_DAILY_COUNTERS/25/32:-:1111 should not be evicted
| 2008-06-26 11:31:41,601 TRACE [org.jboss.cache.eviction.LRUAlgorithm] Node /THIRD_PARTY_DAILY_COUNTERS/25/52:-:1111 has been idle for 86063447ms
| 2008-06-26 11:31:41,601 TRACE [org.jboss.cache.eviction.LRUAlgorithm] Node /THIRD_PARTY_DAILY_COUNTERS/25/52:-:1111 should not be evicted
| 2008-06-26 11:31:41,601 TRACE [org.jboss.cache.eviction.BaseEvictionAlgorithm] process(): region: /DELIVERY_STATUS_RETRIES/
| 2008-06-26 11:31:41,601 TRACE [org.jboss.cache.eviction.BaseEvictionAlgorithm] processed 0 node events in region: /DELIVERY_STATUS_RETRIES/
|
Here it looks that there is objects in the eviction queue, and when I do a printDetails() from JMX console, I see:
| /DELIVERY_STATUS
|
| /THIRD_PARTY_MONTHLY_COUNTERS
| jboss:internal:uninitialized: null
|
| /6
| jboss:internal:uninitialized: null
|
| /THIRD_PARTY_DAILY_COUNTERS
|
|
I guess that when I have removed those nodes manually (with a schedulerr job) nodes have not been removed from the eviction queue.
I'm using 1.4.1.SP9
Thanks,
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4160783#4160783
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4160783
17 years, 9 months
[Tomcat, HTTPD, Servlets & JSP] - Serving Static Content (ROOT.war, context root, virtual host
by rcherchi
I folks,
I use jboss 4.0.5GA and seam 1.2.1.GA.
I would like to serve static content in ROOT.war (images, javascript libraries... etc) for my app. Howerver, it is not reachable when my context root is / When I change the context root to myapp it's fine, I can load files in ROOT.war.
But now, my application is available at http://localhost:8080/myapp (before it was http://localhost:8080 so I get many path and links)
I tried to create a virtual host to solve this problem. However, I can't figure out how to get http://myapp.mydomain.com mapping http://localhost:8080/myapp. My application is now available at http://myapp.mydomain.com/myapp !
Here is my configuration :
jboss-web.xml
<virtual-host>myapp.mydomain.com</virtual-host>
application.xml
<module>
| <web>
| <web-uri>myapp.war</web-uri>
| <context-root>/myapp</context-root>
| </web>
| </module>
|
server.xml
| <Host name="myapp"
| autoDeploy="false"
| deployOnStartup="false"
| deployXML="false">
|
| <!-- Aliases -->
| <Alias>myapp.mydomain.com</Alias>
|
| <!-- Set up loggin -->
| <Valve className="org.apache.catalina.valves.AccessLogValve"
| prefix="myapp-" suffix=".log" pattern="common"
| directory="${jboss.server.home.dir}/log"/>
|
| <DefaultContext cookies="true" crossContext="true" override="true"/>
| </Host>
|
|
Any idea ?
Thank you !
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4160780#4160780
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4160780
17 years, 9 months
[JBoss Tools (users)] - Thi first impressions whith Ganimade - ERROR
by krasig
I just installed new Ganymede (Eclipse IDE for Java EE Developers)
and put new clean JBoss Tools.
After starting IDE first that i see is in Tools Palette:
http://screencast.com/t/wiIAiea2ze
Could not create the view: org/eclipse/gef/internal/ui/palette/editparts/PaletteEditPart
java.lang.NoClassDefFoundError: org/eclipse/gef/internal/ui/palette/editparts/PaletteEditPart
at org.jboss.tools.vpe.ui.palette.CustomPaletteEditPartFactory.createDrawerEditPart(CustomPaletteEditPartFactory.java:27)
at org.eclipse.gef.ui.palette.PaletteEditPartFactory.createEditPart(PaletteEditPartFactory.java:66)
at org.eclipse.gef.editparts.AbstractEditPart.createChild(AbstractEditPart.java:249)
at org.eclipse.gef.editparts.AbstractEditPart.refreshChildren(AbstractEditPart.java:726)
at org.eclipse.gef.editparts.AbstractEditPart.refresh(AbstractEditPart.java:677)
at org.eclipse.gef.editparts.AbstractGraphicalEditPart.refresh(AbstractGraphicalEditPart.java:571)
at org.eclipse.gef.editparts.AbstractEditPart.addNotify(AbstractEditPart.java:235)
at org.eclipse.gef.editparts.AbstractGraphicalEditPart.addNotify(AbstractGraphicalEditPart.java:219)
at org.eclipse.gef.editparts.AbstractEditPart.addChild(AbstractEditPart.java:198)
at org.eclipse.gef.editparts.SimpleRootEditPart.setContents(SimpleRootEditPart.java:101)
at org.eclipse.gef.ui.palette.PaletteViewer.setPaletteRoot(PaletteViewer.java:397)
at org.jboss.tools.vpe.ui.palette.PaletteAdapter.createControl(PaletteAdapter.java:59)
at org.jboss.tools.common.model.ui.views.palette.PaletteViewPart.createPartControlImpl(PaletteViewPart.java:63)
at org.jboss.tools.common.model.ui.views.palette.PaletteViewPart.createPartControl(PaletteViewPart.java:50)
at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:371)
at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:230)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:594)
at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:306)
at org.eclipse.ui.internal.ViewPane.setVisible(ViewPane.java:531)
at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180)
at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270)
at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473)
at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1256)
at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1209)
at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1608)
at org.eclipse.ui.internal.PartStack.createControl(PartStack.java:649)
at org.eclipse.ui.internal.PartStack.createControl(PartStack.java:576)
at org.eclipse.ui.internal.PartSashContainer.createControl(PartSashContainer.java:568)
at org.eclipse.ui.internal.PerspectiveHelper.activate(PerspectiveHelper.java:271)
at org.eclipse.ui.internal.Perspective.onActivate(Perspective.java:964)
at org.eclipse.ui.internal.WorkbenchPage.setPerspective(WorkbenchPage.java:3568)
at org.eclipse.ui.internal.WorkbenchPage.busySetPerspective(WorkbenchPage.java:1032)
at org.eclipse.ui.internal.WorkbenchPage.access$16(WorkbenchPage.java:1016)
at org.eclipse.ui.internal.WorkbenchPage$18.run(WorkbenchPage.java:3667)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPage.setPerspective(WorkbenchPage.java:3665)
at org.eclipse.ui.handlers.ShowPerspectiveHandler.openPerspective(ShowPerspectiveHandler.java:152)
at org.eclipse.ui.handlers.ShowPerspectiveHandler.openOther(ShowPerspectiveHandler.java:124)
at org.eclipse.ui.handlers.ShowPerspectiveHandler.execute(ShowPerspectiveHandler.java:63)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:281)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:178)
at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:253)
at org.eclipse.ui.actions.PerspectiveMenu.runOther(PerspectiveMenu.java:369)
at org.eclipse.ui.actions.PerspectiveMenu$3.runWithEvent(PerspectiveMenu.java:125)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:583)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:500)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:382)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
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.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4160775#4160775
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4160775
17 years, 9 months