[JBossWS] - Re: web services samples
by rayymlai
wrt your hostname / node0 issues, in order to make the jbossws samples work on my laptop (which runs WinXP), in fact I change
1. change the source code to replace the hostname by "localhost"
2. change the node0 to localhost in the common/imported-build.xml
Previously I changed the node0 alone in the imported-build.xml, I still have the same run-time exception.
I make such changes because my laptop may not have wireless network (depending whether I work in the office or when I'm commuting on public transport), and sometimes my laptop resumes from standby mode. Not sure if Jboss/JBoss has any issue with the IP address when running the WSS samples. Setting the hostname to localhost is always safe to my dev environment.
Any one shed some light to see if there is a better or cleaner way to address the problem.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981858#3981858
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981858
18 years, 1 month
[JBossWS] - Re: web services samples
by zurchman
"rayymlai" wrote :
| 2. From the output/log, it seems that something is wrong with the hostname...
|
| ...I replaced the hostname in the codes (just to make the WSS sample works)
|
|
I noticed that the ant script run from JBossWS 1.0.3 on Unix did not pick up the value of "node0" from the HOSTNAME environment variable.
I'm guessing this has something to do with quirky behavior of ant properties.
To try to get the samples to run I modified samples/common/imported-build.xml setting the node0 property value to the host name.
I'm still not there yet.
It seems to me that the samples exist more for the benefit of the developers, who have carefully configured their environments for junit, than for the users.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981854#3981854
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981854
18 years, 1 month
[JBossWS] - Re: implementing wsse:UserNameToken
by rayymlai
_Revisiting username token profile_
=======================
I try to understand and use JBossws 1.0.3 with username token profile. The objective is to use WSS 1.0 username token for an existing Web services, since we are not ready with key management infrastructure (for X.509v3 cert) yet.
Approach - using simpleSignTestCase:
========================
1. Use jbossws wss example
Replace the existing x.509v3 cert profile with username token profile
in both jboss-wsse-server.xml and jboss-wsse-client.xml
e.g. jboss-wsse-server.xml
<jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
<key-store-file>WEB-INF/wsse.keystore</key-store-file>
<key-store-password>jbossws</key-store-password>
<trust-store-file>WEB-INF/wsse.truststore</trust-store-file>
<trust-store-password>jbossws</trust-store-password>
</jboss-ws-security>
e.g. jboss-wsse-client.xml
<?xml version="1.0" encoding="UTF-8"?>
<jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
</jboss-ws-security>
2. Verify if the SOAP header contains username and password
e.g. under output/samples, we can't see any SOAP header containing WSS 1.0 username token profile
<result xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>Kermit
But if we use X.509v3 cert profile, I can find WSS 1.0 cert profile in the SOAP header.
3. add user and password in the client stub, since I read that
JBossWS does not support with user and password attributes, and that JBossWS username token profile still requires using keystore password (an implementation constraint) as per this email thread.
Issues Encountered
=============
1. wss example running with username profile is OK without error, but I couldn't find the username/password in the SOAP header (as in output/log)
2. add user and password in WS stub
but I can't see any user and password in the SOAP header
e.g. in SimpleSignTestCase.java:
Hello port = (Hello)service.getPort(Hello.class);
Stub stub = (Stub)port;
stub._setProperty(Stub.USERNAME_PROPERTY, "manager");
stub._setProperty(Stub.PASSWORD_PROPERTY, "manager");
((Stub)port)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, "http://localhost:8080/jbossws-samples-wssecurity-sign");
return port;
3. jboss server log/console does not show any helpful /debugging information
e.g. jboss console shows:
M0346:8080/jbossws-samples-wssecurity-sign
10:16:15,937 INFO [ClientDeployer] Client ENC bound under: jbossws-client
10:16:16,797 INFO [ClientDeployer] Removing client ENC from: jbossws-client
10:16:16,812 INFO [ServiceEndpointManager] WebService stopped: http://MTVL04AL3
M0346:8080/jbossws-samples-wssecurity-sign
10:16:16,812 WARN [WSDLFilePublisher] Cannot delete published wsdl document: fi
le:/C:/tools/jboss/server/default/data/wsdl/jbossws-samples-wssecurity-sign.war/
HelloService.wsdl
10:16:16,812 INFO [TomcatDeployer] undeploy, ctxPath=/jbossws-samples-wssecurit
y-sign, warUrl=.../tmp/deploy/tmp3642jbossws-samples-wssecurity-sign-exp.war/
10:16:17,703 INFO [TomcatDeployer] deploy, ctxPath=/jbossws-samples-store-pass-
encrypt, warUrl=.../tmp/deploy/tmp3646jbossws-samples-store-pass-encrypt-exp.war
/
10:16:17,812 INFO [WSDLFilePublisher] WSDL published to: file:/C:/tools/jboss/s
erver/default/data/wsdl/jbossws-samples-store-pass-encrypt.war/HelloService.wsdl
10:16:17,906 INFO [ServiceEndpointManager] WebService started: http://MTVL04AL3
Need help:
=======
1. How could I use WSS 1.0 username token in the JBossWS example?
- I use and the WSS example runs without error, but I can't find the username token profile in the header
- I snoop the SOAP traffic using TCPSpy, but still couldn't find the username token in the SOAP header
2. could anyone verify whether I miss any step in the configuration?
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981852#3981852
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981852
18 years, 1 month
[JBossWS] - JBossWS Stack and Polymorphic SEI
by kalvin
Hello all,
I am trying out the JBossWS stack with the bottom-up approach. In my case, the service implementation class has a single method that takes abstract parameter and returns abstract return value as follow:
public WSAbstractReturnValue getValueBy(WSAbstractParameter paramter);
And, I have two subclasses for each of the abstract types:
public class WSReturnImplOne extends WSAbstractReturnValue {}
public class WSReturnImplTwo extends WSAbstractReturnValue {}
public class WSParameterImplOne extends WSAbstractParameter {}
public class WSParameterImplTwo extends WSAbstractParameter {}
I want that the service client may call the service method with a parameter of arbitrary subtype, and the service method may also return arbitrary subtype.
Does JBossWS stack support polymorphism in this scenario? If yes, according to [JBWS-1091], how would I specify the subclasses in the configuration file when running wtools?
Thanks,
Kalvin
P.S. My environment is JBossIDE 2.0.0.Beta2, JBossAS 4.0.5.GA, JDK 1.5.0_06 and Windows XP Professional.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981803#3981803
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981803
18 years, 1 month
[JBossWS] - Re: Return value for Java bean always empty
by lowecg2004
Hi Jason,
Here is the code that I had for StockData:
package org.test;
|
| import java.io.Serializable;
|
| public class StockData
| implements Serializable
| {
| /**
| *
| */
| private static final long serialVersionUID = 1L;
|
| private String title;
| private int issue;
| private int value;
| private boolean hasStock;
|
| public StockData() {
| }
|
| public StockData(String title,
| int issue,
| int value,
| boolean hasStock) {
| this.title = title;
| this.issue = issue;
| this.value = value;
| this.hasStock = hasStock;
| }
|
| void setTitle(String title) {
| this.title = title;
| }
| String getTitle() {
| return title;
| }
| void setIssue(int issue) {
| this.issue = issue;
| }
| int getIssue() {
| return issue;
| }
| void setValue(int value) {
| this.value = value;
| }
| int getValue() {
| return value;
| }
| void setHasStock(boolean hasStock) {
| this.hasStock = hasStock;
| }
| boolean isHasStock() {
| return hasStock;
| }
| }
Thanks for taking the time to help me with this,
Chris.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981731#3981731
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981731
18 years, 1 month