[JBossWS] - Re: WSSE UsernameToken without HTTP basic auth?
by mikaeljl
Continuing this little discussion between me myself and I...
Found the following logs:
2008-01-15 09:19:36,480 DEBUG [org.jboss.wsf.framework.DefaultSPIProvider] class org.jboss.wsf.spi.invocation.SecurityAdaptorFactory Implementation: org.jboss.wsf.container.jboss42.SecurityAdapterFactoryImpl@c774f0
2008-01-15 09:19:36,482 TRACE [org.jboss.security.SecurityAssociation] setPrincipal, p=kermit, server=true
2008-01-15 09:19:36,483 TRACE [org.jboss.security.SecurityAssociation] setPrincipal, sc=org.jboss.security.SecurityAssociation$SubjectContext@103c25f{principal=kermit,subject=null}
2008-01-15 09:19:36,483 TRACE [org.jboss.security.SecurityAssociation] setCredential, sc=org.jboss.security.SecurityAssociation$SubjectContext@103c25f{principal=kermit,subject=null}
Looks like the principal information is set but subject is not, why?
When adding:
System.out.println("Getting principal from SecurityAssociation: " + org.jboss.security.SecurityAssociation.getPrincipal());
|
to the server side implementation of my WS I do get the following log:
2008-01-15 09:19:37,135 INFO [STDOUT] Getting principal from SecurityAssociation: kermit
I would much rather use the standard mechanisms to obtain the principal info.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4119947#4119947
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4119947
18 years, 2 months
[JBossWS] - Re: Writing a client - no examples for BindingProvider based
by mjhammel
You can override the hard coded path set in this class. I'm assuming you're writing a remote client, re: one that doesn't live on the same host as the Web Services server. In that case, you're packaging of the remote client just installs the WSDL file under a directory relative to the application file. At runtime of the client you find out where you're installed and generate the runtime location of the WSDL file from that. That way you don't have to ask the server for the WSDL information at startup time.
anonymous wrote : As for getting the QName, do you have an @WebService annotation in your generated client service class (e.g. SubscriberServicesService)? If you do, it should have name and targetNamespace parameters.
Oh sure, they're there. But how do I reference parameters in an annotation directly from my java code? The reference is in SubscriberServicesService.java and looks like this:
@WebServiceClient(name = "SubscriberServicesService", targetNamespace = "http://SubscriberServices.ws.server.crunch.cei.com/",
| wsdlLocation = "file:/home/mjhammel/src/cei/crunch/build/server/resources/SubscriberServicesService.wsdl")
|
or if you prefer, in the SubscriberServicesEndpoint.java:
@WebService(name = "SubscriberServicesEndpoint", targetNamespace = "http://SubscriberServices.ws.server.crunch.cei.com/")
| public interface SubscriberServicesEndpoint {
But how do I reference these parameters from my client code that instantiates the SubscriberServicesService class? Something like the following doesn't appear to work and there are not getters for these values either:
SubscriberServicesService service = new SubscriberServicesService();
| System.out.println(ss.targetNamespace);
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4119815#4119815
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4119815
18 years, 2 months
[JBossWS] - Re: Writing a client - no examples for BindingProvider based
by jeff norton
Aha. I see from your example that I need to supply the target endpoint address explicitly (arg! these things need to be documented). That was what I was missing. Now I can get the case where I supply the WSDL as a file to work. However that doesn't do me a lot of good as I cannot use a hard-coded path. I would really like to put it in the WAR but I don't know how to create a URL that references things in the WAR (is there a way?). I could explicitly deploy the WSDL file into somewhere like $JBOSS_DIR/server/default/deploy/foo.wsdl but I don't really have a $JBOSS_DIR variable available at runtime. I guess I could set a property that would point to it.
As for getting the QName, do you have an @WebService annotation in your generated client service class (e.g. SubscriberServicesService)? If you do, it should have name and targetNamespace parameters. You should be able to form a QName using the values of those parameters as:new QName(targetNamespace, name)
The no arg public constructor should also have an example of it. Hope that helps.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4119769#4119769
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4119769
18 years, 2 months