[JBoss Web Services] New message: "Unable to verify SOAP packet encryption"
by Keshav Savant
User development,
A new message was posted in the thread "Unable to verify SOAP packet encryption":
http://community.jboss.org/message/528961#528961
Author : Keshav Savant
Profile : http://community.jboss.org/people/kcsavant
Message:
--------------------------------------------------------------
Hi,
I am trying to create a secured web service with SOAP encryption, I am following JBOSS IN ACTION by Manning, chapter 9. My setup is jboss-5.1.0.GA & jbossws-native-3.2.2.GA.
My service interface is like below
SalesTax.java
@EndpointConfig(configName="Standard WSSecurity Endpoint")
@SOAPBinding(style=SOAPBinding.Style.RPC)
@WebService(name = "SalesTax", targetNamespace = "http://ws.abc.com/")
public interface SalesTax {
@WebMethod
@WebResult(targetNamespace = "")
@RequestWrapper(localName = "getRate", targetNamespace = "http://ws.abc.com/", className = "com.abc.ws.GetRate")
@ResponseWrapper(localName = "getRateResponse", targetNamespace = "http://ws.abc.com/", className = "com.abc.ws.GetRateResponse")
public double getRate(
@WebParam(name = "arg0", targetNamespace = "")
String arg0);
}
My WS Implementation is
SalesTaxImpl.java
@WebService(name = "SalesTaxImpl", serviceName = "SalesTax", endpointInterface = "com.abc.ws.SalesTax", portName="SalesTaxPort")
public class SalesTaxImpl implements SalesTax {
private Map<String, Double> tax = new HashMap<String, Double>();
public void init() {
tax.put("UP", 5.5);
tax.put("AP", 8.25);
tax.put("PU", 4.95);
}
public double getRate(String arg0) {
init();
return tax.get(arg0) != null ? tax.get(arg0) : 0.0;
}
}
My WAR setup My Client Setup
http://community.jboss.org/servlet/JiveServlet/showImage/2189/ws-server-s...
I can deploy the web service successfully, now on client side I have below code.
My Client Implementation is as below
Client.java
public class Client {
public static void main(String[] arg) {
System.setProperty("org.jboss.ws.wsse.keyStore", "C://certificates//client.keystore");
System.setProperty("org.jboss.ws.wsse.keyStorePassword", "{CLASS}org.jboss.security.plugins.FilePassword:C://certificates//client.keystore.password");
System.setProperty("org.jboss.ws.wsse.keyStoreType", "jks" );
System.setProperty("org.jboss.ws.wsse.trustStore", "C://certificates//client.truststore");
System.setProperty("org.jboss.ws.wsse.trustStorePassword", "{CLASS}org.jboss.security.plugins.FilePassword:C://certificates//client.truststore.password");
System.setProperty("org.jboss.ws.wsse.trustStoreType", "jks");
String[] args = {"UP","AP","PU"};
if (args.length > 0) {
SalesTax_Service svc = new SalesTax_Service();
SalesTax tax = svc.getSalesTaxPort();
BindingProvider bp = (BindingProvider)tax;
Map<String, Object> rc = bp.getRequestContext();
rc.put(BindingProvider.USERNAME_PROPERTY, "keshav");
rc.put(BindingProvider.PASSWORD_PROPERTY, "Pass1@34");
for (int i = 0; i < args.length; i++) {
double rate = tax.getRate(args[i]);
System.out.println("Sales tax for " + args[i] + " is " + rate);
}
}
}
}
I can hit the web service using this client.I also uncommented the message trace for org.jboss.ws.core.MessageTrace class in jboo-log4j.xml file to analyse the SOAP packets.
BUT the problem is,
1. I dont know whether my service has been secured or not, because the SOAP packets(after each hit) in server.log does not show encrypted packet, it shows simply (non encrypted) packets.
Please let me know if I am missing out something. If required I can provide additional code files also.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/528961#528961
14 years, 11 months
[Beginner's Corner] New message: "Re: Port already in use: 1098 - URGENT"
by damon weinstein
User development,
A new message was posted in the thread "Port already in use: 1098 - URGENT":
http://community.jboss.org/message/528954#528954
Author : damon weinstein
Profile : http://community.jboss.org/people/damonweinstein
Message:
--------------------------------------------------------------
Hi Sashi,
I ran into a similar problem: The port which was supposed to have been in use never showed up in netstat -a -o and if I changed the port to another port - the new port would show up as already in use.
My problem turned out to be: the wrong value to -b of the startup script.
I was using my external IP address instead of my internal (to the lan) IP address so for example:
BAD:
run.bat -b 66.30.204.225 <--- the ip address of my router from the outside
GOOD:
run.bat -b -b 192.168.1.107 <--- the ip address of the machine running jboss within the lan
I can't explain why this problem manifested the way that it did - but using the internal ip address fixed it.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/528954#528954
14 years, 11 months
[Performance Tuning] New message: "Re: Problems with concurrency"
by Peter Johnson
User development,
A new message was posted in the thread "Problems with concurrency":
http://community.jboss.org/message/528949#528949
Author : Peter Johnson
Profile : http://community.jboss.org/people/peterj
Message:
--------------------------------------------------------------
You have hit on a performance anti-pattern. Throwing more threads at an an application does not necessarily mean that it will perform better. Eventually, the contention for common resources will work against you. For every application there is a sweet-spot for the optimal number of threads it can handle (and that includes the optimal number of database connections). One of the purposes of performance tuning is to find that sweet spot. From what you wrote, I suspect that somewhere around 350 connections is the sweet-spot for your app.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/528949#528949
14 years, 11 months
[Performance Tuning] New message: "Problems with concurrency"
by Jorge Ruiz
User development,
A new message was posted in the thread "Problems with concurrency":
http://community.jboss.org/message/528946#528946
Author : Jorge Ruiz
Profile : http://community.jboss.org/people/xourge
Message:
--------------------------------------------------------------
Hello, I have a seam 2.1.2 app running on Jboss AS 4.2.3 with MySQL 5.0 on a HP Blade Server with 22G RAM and Intel Xeon 2.66GHz x4 cpu
I have set max connections for mysql y app config to 3000
i have set max threads for jboss to 3000 too
I am monitoring my app using web-console, this shows that the value currentThreadsBusy may vary between 100 and 900
but, still, app runs really slow on when current threds are above 350 (when there's hight concurrency). In these cases mysql uses 1 core, and jboss uses 2.5 cores from the Intel Xeon (according to top command on linux)
am i missing something? why is it still slow?
any help would be really appreciated
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/528946#528946
14 years, 11 months