[Beginners Corner] - Re: Why I can't start JBOSS 4.2.2GA?
by jaikiran
"jackhexy" wrote : If I only executed ""%JAVA%" -version 2>&1 | findstr /I hotspot > nul" that in run.bat ,DOS prompted "system can't find the specified file" as above.
| So,I think that there are problems in this place.
| What about you?
Thats right. Its evident that the problem happens on this specific line. In the past week, there have been a couple of posts where similar issue was observed which resulted in the run.bat file terminating without any messages. The cause for that behaviour was turned out to be JAVA_HOME value not being properly set. In your case though the JAVA_HOME value and the output of %JAVA% -version look good. So that does not seem to be the issue.
The second reason why this line might fail is related to 'findstr' not being in the PATH env variable (the link that i posted in my first reply http://wiki.jboss.org/wiki/Wiki.jsp?page=FindstrCommandNotFound ). Are you sure the 'findstr' is be on the PATH. You can find it under windows\system32 folder on your system. If you dont have it in the PATH then you will have to add it as follows(just an example):
set PATH=%PATH%;C:\windows\system32
Other than this at this point, i dont see any other reason why this should fail. I havent yet installed JBoss4.2.2 (i have 4.2.1) nor do i have JDK1.6, but i dont see anything that might have changed in 4.2.2 which might be causing this issue.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4104619#4104619
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4104619
18 years, 8 months
[JBossWS] - Re: JAX-WS Basic authorization?
by rukus
If you need authentication with JAX-WS:
1. Web-service
@WebService(name="ServerService")
| @SOAPBinding(style = SOAPBinding.Style.RPC)
| public interface IServerService {
| @WebMethod
| String status();
| }
@WebService(name = "ServerService", serviceName = "ServerService")
| @SOAPBinding(style = SOAPBinding.Style.RPC)
| public class ServerService implements IServerService {
| @WebMethod
| @RolesAllowed ("testuser")
| public String status() {
| return "It works";
| }
| }
2. web.xml
<?xml version="1.0" encoding="UTF-8"?>
| <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
| version="2.4">
| <security-constraint>
| <web-resource-collection>
| <web-resource-name>Server service</web-resource-name>
| <url-pattern>/*</url-pattern>
| <http-method>POST</http-method>
| </web-resource-collection>
| <auth-constraint>
| <role-name>testuser</role-name>
| </auth-constraint>
| </security-constraint>
| <login-config>
| <auth-method>BASIC</auth-method>
| </login-config>
| <security-role>
| <description>Known users of the Server service</description>
| <role-name>testuser</role-name>
| </security-role>
| <!-- Web Services -->
| <servlet>
| <servlet-name>ServerService</servlet-name>
| <servlet-class>my.ServerService</servlet-class>
| </servlet>
|
| <!-- Web Services Mapping -->
|
| <servlet-mapping>
| <servlet-name>ServerService</servlet-name>
| <url-pattern>/ServerService</url-pattern>
| </servlet-mapping>
| </web-app>
|
3. jboss-web.xml
<jboss-web>
| <security-domain>java:/jaas/test_project</security-domain>
| </jboss-web>
- I don't exactly understand what is it means - but i think it should be
4. add users.properties and role.properties to project:
users.properties
anonymous wrote : test=test
roles.properties
anonymous wrote : test=testuser
5. Client
| URL wsdlLocation = new URL("http://127.0.0.1:8080/test_project/ServerService?wsdl");
| QName serviceName = new QName("http://my/", "ServerService");
| Service service = Service.create(wsdlLocation, serviceName);
| IServerService port = service.getPort(IServerService.class);
| BindingProvider bp = (BindingProvider) port;
| Map<String, Object> map = bp.getRequestContext();
| map.put(BindingProvider.USERNAME_PROPERTY, "test");
| map.put(BindingProvider.PASSWORD_PROPERTY, "test");
| String status = port.status();
| System.out.println(status);
I haven't test it but looks like i did't forget anything
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4104606#4104606
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4104606
18 years, 8 months
[JBossWS] - JbossWS throws
by sashicse
We are trying to transfer large byte arrays (file stream) across the jboss web services. We are using the byte arrayas approach to transfer the files through web services. JBoss is throwing OutofMemory exception while transferring the large bvte array. As of now we do not want to change the current implementation of transferring the files to MTOM, SOAP with attachments etc. Could you please provide us some insight on why JBoss is throwing the exception even after providing the sufficient JVM memory?
Environment Setup Details-
Jboss version: 4.0.4 GA
JWS version: version that ships with JBoss 4.0.4GA version
JVM heap size settings-
Min and Max- 1024MB
Also, tried with min and max- 1546
File size- problem while transferring the file size greater than 38 MB.
Thanks,
-Sashi
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4104605#4104605
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4104605
18 years, 8 months