[JBossWS] - Re: How could see the endpoint the SOAP headers built by a o
by camateusno
Thanks alessio,
but perhaps that step, simple and intuitive,
I still do not understand.
I show you my strategy, and maybe you can give me another hand:
perhaps quite usual:
I have
- a SEI class: QMWISeSoap
- a class that extend of class javax.xml.ws.Service, and provide the getter (public QMWISeSoap getQMWISeSoap()) for QMWISeSoap: QMWISe
- a class that provide a instance of QMWISeSoap named endPoint, in its constructor call QMWISe.getQMWISeSoap() and assign it to endPoint : QMWISeWebService
- a package that contain classes that extend of QMWISeWebService, each class of this package has a methods that call a corresponding method in the SEI class, using the attribute endPoint inherited from QMWISeWebService.
I begin using this classes, really wrappers of SEI, and operate perfectly.
A new requirement consist in aggregate security data in SOAP headers.
After that consume the webservice, i see other class that i dont know how fits in what was already running. This class is named ObjectFactory.
This class i suppose after of study it, is a factory of objects that represent the requests. Also provide two attributes (securityHeader and trustHeader) and its getters methods and setters methods. These attributes are precisely the data that would need for SOAP headers.
in this way:
private final static QName _Trust_QNAME = new QName("http://questionmark.com/QMWISe/", "Trust");
private final static QName _Security_QNAME = new QName("http://questionmark.com/QMWISe/", "Security");
methods:
/**
* Create an instance of {@link JAXBElement }{@code <}{@link SecurityHeader }{@code >}}
*
*/
@XmlElementDecl(namespace = "http://questionmark.com/QMWISe/", name = "Security")
public JAXBElement createSecurity(SecurityHeader value) {
return new JAXBElement(_Security_QNAME, SecurityHeader.class, null, value);
}
My confusion is that i dont understand how relate this facility of ObjectFactory with the work that had operated.
First i do this:
By example
ParticipantData.createParticipant(Participant participant)
where ParticipantData is a wrapper of part of SEI.
then, i created a object participant without using the objectfactory facility, since the Participant class has its constructor and work.
thinking in integrate the ObjectFactory, then now i created the instance of Participant using the ObjectFactory, in this way:
participant = factory.createParticipant(), and i setting the securityheader with ObjectFactory. And i call the method of ParticipantData named createParticipant passing it the object Participant builded with the ObjectFactory.
Lastly i discovered that in the objectfactory there are similar methods to the methods of my wrapper classes. Then i prove calling this methods and not the methods of wrappers.
Any clarification is greatly appreciated, thank you.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108980#4108980
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108980
17 years, 1 month
[JBossWS] - Re: Java Client Application using Stub with WS-Security
by method_ben
I did not find an exception in my server log file and my code (web service)doesnt contain an try/catch(WSSecurityException e) clause like you said.
I think that the exception is thrown by a referenced lib. In my classpath of my Eclipse projects (my client project and my web service project), I include all libs of jboss_folder/client and jboss_folder/lib/endorsed.
My web service class :
| import javax.jws.WebMethod;
| import javax.jws.WebParam;
| import javax.jws.WebResult;
| import javax.jws.WebService;
| import javax.jws.soap.SOAPBinding;
| import org.jboss.ws.annotation.EndpointConfig;
|
| @WebService(targetNamespace = "rrr",serviceName = "TestService", wsdlLocation="WEB-INF/wsdl/TestService.wsdl")
| @SOAPBinding(parameterStyle=SOAPBinding.ParameterStyle.WRAPPED, use=SOAPBinding.Use.LITERAL, style=SOAPBinding.Style.DOCUMENT)
| @EndpointConfig(configName = "Standard WSSecurity Endpoint")
| public class Test
| {
| @WebMethod
| @WebResult(name="result",targetNamespace="rrr")
| public String allo(@WebParam(name="name", targetNamespace="rrr")String name)
| {
| System.out.println("Allo " + name);
| return name;
| }
|
| @WebMethod
| @WebResult(name="result",targetNamespace="rrr")
| public String hello(@WebParam(name="name", targetNamespace="rrr")String name)
| {
| System.out.println("Hello " + name);
| return name;
| }
| }
|
Contains of my war file :
META-INF\MANIFEST.MF
WEB-INF\jboss-wsse-client.xml
WEB-INF\jboss-wsse-server.xml
WEB-INF\web.xml
WEB-INF\wsse.keystore
WEB-INF\wsse.truststore
WEB-INF\classes\com\Test.Class
WEB-INF\wsdl\TestService.wsdl
I have no idea where the exception is logged !
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108954#4108954
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108954
17 years, 1 month
[JBossWS] - Re: Java Client Application using Stub with WS-Security
by alessio.soldano@jboss.com
"method_ben" wrote :
| server.log (jboss_folder/server/default/log):
|
| 2007-11-29 09:20:58,342 DEBUG [org.jboss.wsf.stack.jbws.RequestHandlerImpl] handleWSDLRequest: jboss.ws:context=test,endpoint=Test
| 2007-11-29 09:20:58,342 DEBUG [org.jboss.wsf.stack.jbws.RequestHandlerImpl] WSDL request, using host: 127.0.0.1
| 2007-11-29 09:20:58,451 DEBUG [org.jboss.wsf.stack.jbws.RequestHandlerImpl] handleWSDLRequest: jboss.ws:context=test,endpoint=Test
| 2007-11-29 09:20:58,451 DEBUG [org.jboss.wsf.stack.jbws.RequestHandlerImpl] WSDL request, using host: 127.0.0.1
| 2007-11-29 09:20:58,545 DEBUG [org.jboss.wsf.stack.jbws.RequestHandlerImpl] handleWSDLRequest: jboss.ws:context=test,endpoint=Test
| 2007-11-29 09:20:58,545 DEBUG [org.jboss.wsf.stack.jbws.RequestHandlerImpl] WSDL request, using host: 127.0.0.1
|
You're supposed to find an exception in your log, since the code you're running is something like
| try {
| //some stuff generating the exception
| }
| catch (WSSecurityException e)
| {
| if (e.isInternalError())
| log.error("Internal error occured handling outbound message:", e); //this is the interesting log we need
| else if(log.isDebugEnabled()) log.debug("Returning error to sender: " + e.getMessage());
|
| throw convertToFault(e); //this creates the message you get on the client
| }
|
Please use the preview button before submitting messages on the forum; also wrap code snippets into [ code ] [ /code ] tags.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108924#4108924
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108924
17 years, 1 month
[JBossWS] - JBossWS 2.0.2, com.sun.management.jmxremote and Java 6
by bidd
I'm running JBoss 4.2.2-GA and am having trouble getting JConsole working under Java 6.
I saw this JIRA http://jira.jboss.com/jira/browse/JBWS-1800?page=all which indicates there was a problem and it's fixed in JBossWS 4.0.2.
I downloaded 2.0.2, deployed it into my JBoss 4.2.2 and from the console output it appears to have been successful.
29-11-07 14:43:52,860 INFO main [org.jboss.wsf.stack.jbws.NativeServerConfig] JBoss Web Services - Native
| 29-11-07 14:43:52,860 INFO main [org.jboss.wsf.stack.jbws.NativeServerConfig] jbossws-native-2.0.2.GA (build=200711261155)
|
In my run.bat I set the following
set JAVA_OPTS=%JAVA_OPTS% -Djavax.management.builder.initial=org.jboss.system.server.jmx.MBeanServerBuilderImpl
| set JAVA_OPTS=%$JAVA_OPTS% -Djboss.platform.mbeanserver
| set JAVA_OPTS=%$JAVA_OPTS% -Dcom.sun.management.jmxremote
|
Unfortunately I get the exception shown below. I don't get it if I remove the entries from run.bat.
Have I missed something in upgrading to 2.0.2 or have I found another problem?
java.lang.NullPointerException
| at org.jboss.wsf.framework.deployment.WebAppGeneratorDeploymentAspect.generatWebDeployment(WebAppGeneratorDeploymentAspect.java:105)
| at org.jboss.wsf.framework.deployment.WebAppGeneratorDeploymentAspect.create(WebAppGeneratorDeploymentAspect.java:84)
| at org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl.deploy(DeploymentAspectManagerImpl.java:115)
| at org.jboss.wsf.container.jboss42.ArchiveDeployerHook.deploy(ArchiveDeployerHook.java:97)
| at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:90)
| at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
| at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy33.start(Unknown Source)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy10.deploy(Unknown Source)
| at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
| at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:417)
| at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy4.start(Unknown Source)
| at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
| 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:597)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy5.deploy(Unknown Source)
| at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
| at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
| at org.jboss.Main.boot(Main.java:200)
| at org.jboss.Main$1.run(Main.java:508)
| at java.lang.Thread.run(Thread.java:619)
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108923#4108923
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108923
17 years, 1 month