[JBossWS] - Basic authentication for WS fails to authenticate from clien
by don@inpowersoft.com
I have a bean that is annotated with @Webservice and @SecurityDomain
@Stateless()
@WebService()
@SecurityDomain("MyDomain")
@TransactionAttribute(TransactionAttributeType.REQUIRED)
public class DownPartBean implements DownPartLocal, DownPartRemote {
...
}
MyDomain is setup appropriately in the login-config.xml and is proven to be working from other context.
However, if I connect from a ws client even with the user and password set, the authentication always fails.
I've also edit the META-INF/jboss.xml file such that it looks like below but it never works. The documentation relating to how to secure an end point does not work for me and I suspect I probably did something wrong.
Appreciate any help..
-don
jboss.xml
<security-domain>MyDomain</security-domain>
<enterprise-beans>
<ejb-name>DownPartBean</ejb-name>
<port-component>
<port-component-name>
DownPartBean
</port-component-name>
<port-component-uri>
/lsaplEjbServer/DownPartBean
</port-component-uri>
<auth-method>BASIC</auth-method>
</port-component>
</enterprise-beans>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4051872#4051872
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4051872
17 years, 7 months
[JBossWS] - Error Deploying documentliteral Web Service created in Netbe
by cowsudders
Hi all
I'm attempting to create a simple document literal web-service in JBoss 4.0.5 by using Netbeans 5.5. All is fine in Netbeans, but I receive the following error when deploying into JBoss:
org.jboss.ws.WSException: Cannot load java type: company.name.lsp.security.interfaces.SecurityServiceSEI_InitialiseSession_RequestStruct
Can someone please provide some help/guidance as to the commands/tools I need to use in order to create these server artefacts? I assume I need to use wstools - but what command do I need to use?
Can I amend the Netbeans build.xml file to run the command automatically?
Here is the SEI file:
public interface SecurityServiceSEI extends Remote {
/**
* Web service operation
*/
public SessionMsg InitialiseSession(SessionMsg msg) throws java.rmi.RemoteException;
}
Here is the Impl file:
public SessionMsg InitialiseSession(SessionMsg msg) throws java.rmi.RemoteException {
System.out.println("We are in Initialise Session");
return msg;
}
If anyone requires more information, please ask and I will provide.
Any help that can be provided will be much appreciated - thanks!
Dave
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4051682#4051682
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4051682
17 years, 7 months
[JBossWS] - problem calling webservice from client
by sashaxiv
when i try to run the client it raises next exception. I use jboss 4.2 and jbossws 1.2.
My aplication code is like this:
public interface SesionSession {
public com.satdatatelecom.satdataweb.model.session.vo.LoginVO login .......}
--------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------- @WebService(endpointInterface="com.satdatatelecom.satdataweb.model.session.session.SesionEndPointInterface", targetNamespace = "http://localhost:8080/jbossws/services/Sesion", serviceName = "loginUsuario")
@Remote(SesionSession.class)
@RemoteBinding(jndiBinding = "/ejb3/EJB3SesionEndPointInterface")
@Stateless
public class SesionSessionBean implements SesionSession {
@PersistenceContext(unitName = GlobalNames.PERSISTENCE_UNIT)
private EntityManager entityManager;
@WebMethod(action = "urn:Sesion")
public LoginVO loginUsuario...........................
..............................................
...........................................
}
-
-------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
@WebService(targetNamespace = "http://net.jboss.org/satdataweb")
@WebContext(urlPattern="/*")
@SOAPBinding(style = Style.RPC)
public interface SesionEndPointInterface extends Remote{
public LoginVO loginUsuario....................
...............................................
............................................
-----------------------------------------------------------------------------------
----------------------------------------------------------------------------------
In the client sidfe i do the following. I think the problem is here but i don´t know why
public SessionFacadeWSImpl()
throws InternalErrorException {
try {
System.out.println(" -0000001 SFWSI - Kike --->Creando LoginServiceLocator");
LoginUsuarioLocator locator = new LoginUsuarioLocator();
sesionSession = (SesionEndPointInterface) locator.getSesionSessionBeanPort(new URL("http://localhost:8080/jbossws/services/Sesion"));
// DataConexion.getUrl(webService);
System.out.println("0000002 SFWSI Kike --->Creado LoginServiceLocator , sessionSession ->" + sesionSession.toString() );
}
catch (Exception ex) {
ex.printStackTrace();
throw new InternalErrorException(ex);
}
}
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
and finally this is the stub generated by axis in the client
.....................
........................
public com.satdatatelecom.satdataweb.services.beans.LoginVO loginUsuario(java.lang.String arg0, java.lang.String arg1, java.lang.String arg2, java.lang.String arg3) throws java.rmi.RemoteException, com.satdatatelecom.satdataweb.services.beans.EmpresaNotFoundException, com.satdatatelecom.satdataweb.services.beans.PasswordException, com.satdatatelecom.satdataweb.services.beans.SessionException, com.satdatatelecom.satdataweb.services.beans.UsuarioNotFoundException, com.satdatatelecom.satdataweb.services.beans.ConcesionException, com.satdatatelecom.satdataweb.services.beans.ConcesionEmpresaException {
if (super.cachedEndpoint == null) {
throw new org.apache.axis.NoEndPointException();
}
System.out.println("---------------- estoy dentro del Stub ---------------");
org.apache.axis.client.Call _call = createCall();
_call.setOperation(_operations[0]);
_call.setUseSOAPAction(true);
_call.setSOAPActionURI("Sesion");
System.out.println("---------------- estoy dentro del Stub METIACTION URI---------------");
_call.setEncodingStyle(null);
_call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
_call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
_call.setOperationName(new javax.xml.namespace.QName("http://session.session.model.satdataweb.satdatatelecom.com", "loginUsuario"));
setRequestHeaders(_call);
setAttachments(_call);
try { java.lang.Object _resp = _call.invoke(new java.lang.Object[] {arg0, arg1, arg2, arg3});
This is the exception executiong the client
(400)HTTP method POST is not supported by this URL
at com.satdatatelecom.satdataweb.model.session.facade.webservice.SessionFacadeWSImpl.loginUsuario(SessionFacadeWSImpl.java:74)
at com.satdatatelecom.satdataweb.gui.login.DoLogin.doLogin(DoLogin.java:189)
at com.satdatatelecom.satdataweb.gui.login.thread.LoginThread.run(LoginThread.java:90)
***Information about encapsulated exception***
AxisFault
faultCode: {http://xml.apache.org/axis/}HTTP
faultSubcode:
faultString: (400)HTTP method POST is not supported by this URL
faultActor:
faultNode:
faultDetail:
{}:return code: 400
JBossWeb/2.0.0.GA - Informe de Error<!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--> <h1>Estado HTTP 400 - HTTP method POST is not supported by this URL</h1>type Informe de estadomensaje HTTP method POST is not supported by this URLdescripción El requerimiento enviado por el cliente era sintácticamente incorrecto (HTTP method POST is not supported by this URL).<h3>JBossWeb/2.0.0.GA</h3>
{http://xml.apache.org/axis/}HttpErrorCode:400
(400)HTTP method POST is not supported by this URL
at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.satdatatelecom.satdataweb.services.beans.SesionEndPointInterfaceBindingStub.loginUsuario(SesionEndPointInterfaceBindingStub.java:243)
at com.satdatatelecom.satdataweb.model.session.facade.webservice.SessionFacadeWSImpl.loginUsuario(SessionFacadeWSImpl.java:51)
at com.satdatatelecom.satdataweb.gui.login.DoLogin.doLogin(DoLogin.java:189)
at com.satdatatelecom.satdataweb.gui.login.thread.LoginThread.run(LoginThread.java:90)
#### [06/06/2007, 10:30:10] ---> Error al conectar. No se puede conectar con el servidor 127.0.0.1: 8080
[06/06/2007, 10:30:10] ---> Error al conectar. No se puede conectar con el servidor 127.0.0.1: 8080
I need some help because i don´t know what to do.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4051629#4051629
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4051629
17 years, 7 months
[JBossWS] - Problem with inheritance and JBossWS
by fambad
I have a problem with the new JBossWS-1.2.1.GA in JBoss 4.2.0.GA and inheritance.
To describe this problem first I have to describe my code structure:
For an example I have three classes (ClassA, ClassB and ClassC). ClassC inherits of ClassB and ClassB inherits of ClassA (ClassA --> ClassB --> ClassC). Now I have a webservice method that returns ClassB. In this method an instance of ClassC is being created and returned. This was not a problem in the former JBossWS version (and also in the other J2EE 4 styled webservices) but now in JBossWS 1.2 I only get returned an object of ClassB but I supposed to get an obejct of ClassC.
| public class ClassA {
| private String propA;
|
| // here setter and getter for propA
| ......
| }
|
| public class ClassB extends ClassA {
|
| private String propB;
| // here setter and getter for propB
| ......
| }
|
| public class ClassC extends ClassC {
| private String propC;
| // here setter and getter for propC
| ......
| }
|
| @WebService
| @SOAPBinding( style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED )
| public class MyWebService {
|
| @WebMethod()
| public ClassB getClassB() {
| ClassC classC = new ClassC();
| classC.setPropA("propA");
| return classC;
| }
|
| /**
| * --> this method is only used to publish ClassC otherwise it is not known
| * in this webservice
| */
| @WebMethod()
| public ClassC getClassC() {
| ClassC classC = new ClassC();
| classC.setPropA("propA");
| return classC;
| }
|
| }
|
| }
Now I call getClassB() and the result that I got is an object of ClassB and not of ClassC.
What can I do to get an object of ClassC. I also looked at the returned SOAP message and there you can see that only informations about the ClassB instance are submitted. In JBoss 4.0.5 (JBossWS1.0.3) the SOAP message contains the type of the returned object and all data are being submitted correctly.
I also tried the SOAP parameter style BARE but nothing changed. And whenI use RPC/Literal then I get an error in the .NET Client that an instance of ClassB was expected but got an instance of ClassC. I also tried it with a JAVA client but there was the same occurance.
Any help would be appreciated!
Marco.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4051611#4051611
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4051611
17 years, 7 months