JBossWS SVN: r5814 - in stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm: server and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2008-02-26 12:17:06 -0500 (Tue, 26 Feb 2008)
New Revision: 5814
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/server/RMStore.java
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/RMHelper.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/server/RMDeploymentAspect.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/server/RMInvocationHandler.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/server/RMServerSequence.java
Log:
[JBWS-1828] [JBWS-1830] first round
Modified: stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/RMHelper.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/RMHelper.java 2008-02-26 17:09:46 UTC (rev 5813)
+++ stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/common/RMHelper.java 2008-02-26 17:17:06 UTC (rev 5814)
@@ -37,7 +37,6 @@
import org.jboss.ws.extensions.wsrm.RMConstant;
import org.jboss.ws.extensions.wsrm.RMClientSequence;
import org.jboss.ws.extensions.wsrm.api.RMException;
-import org.jboss.ws.extensions.wsrm.server.RMServerSequence;
import org.jboss.ws.extensions.wsrm.spi.RMConstants;
import org.jboss.ws.extensions.wsrm.spi.RMProvider;
import org.jboss.ws.extensions.wsrm.spi.protocol.RMAckRequested;
@@ -78,32 +77,6 @@
}
}
- public static RMServerSequence getServerSequenceByInboundId(String seqId, List<RMServerSequence> sequences)
- {
- for (RMServerSequence seq : sequences)
- {
- if (seq.getInboundId().equals(seqId))
- {
- return seq;
- }
- }
-
- return null;
- }
-
- public static RMServerSequence getServerSequenceByOutboundId(String seqId, List<RMServerSequence> sequences)
- {
- for (RMServerSequence seq : sequences)
- {
- if (seq.getOutboundId().equals(seqId))
- {
- return seq;
- }
- }
-
- return null;
- }
-
public static boolean isCreateSequence(Map<String, Object> rmMsgContext)
{
List<QName> protocolMessages = (List<QName>)rmMsgContext.get(RMConstant.PROTOCOL_MESSAGES);
Modified: stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/server/RMDeploymentAspect.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/server/RMDeploymentAspect.java 2008-02-26 17:09:46 UTC (rev 5813)
+++ stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/server/RMDeploymentAspect.java 2008-02-26 17:17:06 UTC (rev 5814)
@@ -21,10 +21,9 @@
*/
package org.jboss.ws.extensions.wsrm.server;
-import java.util.LinkedList;
-
import org.jboss.ws.extensions.wsrm.common.RMHelper;
import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
+import org.jboss.wsf.spi.deployment.ArchiveDeployment;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
import org.jboss.wsf.spi.deployment.Endpoint;
@@ -52,9 +51,9 @@
if (sepMetaData.getConfig().getRMMetaData() != null)
{
InvocationHandler origInvHandler = ep.getInvocationHandler();
- InvocationHandler wsrmInvHandler = new RMInvocationHandler(origInvHandler);
+ InvocationHandler wsrmInvHandler = new RMInvocationHandler(origInvHandler, (ArchiveDeployment)dep);
+ // TODO: implement wsrm data dir clean up here
ep.setInvocationHandler(wsrmInvHandler);
- ep.addAttachment(RMServerSequence.class, new LinkedList<RMServerSequence>());
RMHelper.setupRMOperations(sepMetaData);
log.info("WS-RM invocation handler associated with endpoint " + ep.getAddress());
}
@@ -71,7 +70,6 @@
{
RMInvocationHandler rmInvHandler = (RMInvocationHandler)invHandler;
ep.setInvocationHandler(rmInvHandler.getDelegate());
- ep.removeAttachment(RMServerSequence.class);
log.info("WS-RM invocation handler removed from endpoint " + ep.getAddress());
}
}
Modified: stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/server/RMInvocationHandler.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/server/RMInvocationHandler.java 2008-02-26 17:09:46 UTC (rev 5813)
+++ stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/server/RMInvocationHandler.java 2008-02-26 17:17:06 UTC (rev 5814)
@@ -21,6 +21,7 @@
*/
package org.jboss.ws.extensions.wsrm.server;
+import java.io.IOException;
import java.net.URISyntaxException;
import java.util.HashMap;
import java.util.LinkedList;
@@ -47,9 +48,14 @@
import org.jboss.ws.extensions.wsrm.spi.protocol.RMSequenceAcknowledgement;
import org.jboss.ws.extensions.wsrm.spi.protocol.RMSerializable;
import org.jboss.ws.extensions.wsrm.spi.protocol.RMTerminateSequence;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.deployment.ArchiveDeployment;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.invocation.Invocation;
import org.jboss.wsf.spi.invocation.InvocationHandler;
+import org.jboss.wsf.spi.management.ServerConfig;
+import org.jboss.wsf.spi.management.ServerConfigFactory;
/**
* RM Invocation Handler
@@ -63,14 +69,33 @@
private static final Logger logger = Logger.getLogger(RMInvocationHandler.class);
private static final RMConstants rmConstants = RMProvider.get().getConstants();
-
+ private ServerConfig serverConfig;
private final InvocationHandler delegate;
+ private final ArchiveDeployment dep;
+ private final String dataDir;
- RMInvocationHandler(InvocationHandler delegate)
+ RMInvocationHandler(InvocationHandler delegate, ArchiveDeployment dep)
{
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ this.serverConfig = spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
this.delegate = delegate;
+ this.dep = dep;
+ this.dataDir = getPersistLocation();
}
+ private String getPersistLocation()
+ {
+ try
+ {
+ String deploymentDir = (dep.getParent() != null ? dep.getParent().getSimpleName() : dep.getSimpleName());
+ return serverConfig.getServerDataDir().getCanonicalPath() + "/wsrm/" + deploymentDir;
+ }
+ catch (IOException ioe)
+ {
+ throw new IllegalStateException();
+ }
+ }
+
@Override
public final Invocation createInvocation()
{
@@ -96,7 +121,7 @@
* @param inv invocation
* @return RM response context to be set after target endpoint invocation
*/
- private Map<String, Object> prepareResponseContext(Endpoint ep, Invocation inv)
+ private synchronized Map<String, Object> prepareResponseContext(Endpoint ep, Invocation inv)
{
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
AddressingProperties addrProps = (AddressingProperties)msgContext.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
@@ -110,7 +135,6 @@
List<QName> protocolMessages = new LinkedList<QName>();
Map<String, Object> rmResponseContext = new HashMap<String, Object>();
- List<RMServerSequence> sequences = (List<RMServerSequence>)ep.getAttachment(RMServerSequence.class);
rmResponseContext.put(RMConstant.PROTOCOL_MESSAGES, protocolMessages);
msgContext.remove(RMConstant.RESPONSE_CONTEXT);
RMServerSequence sequence = null;
@@ -119,7 +143,7 @@
if (RMHelper.isCreateSequence(rmReqProps))
{
sequence = new RMServerSequence();
- sequences.add(sequence);
+ RMStore.serialize(dataDir, sequence);
protocolMessages.add(rmConstants.getCreateSequenceResponseQName());
rmResponseContext.put(RMConstant.SEQUENCE_REFERENCE, sequence);
isOneWayOperation = false;
@@ -130,13 +154,15 @@
Map<QName, RMSerializable> data = (Map<QName, RMSerializable>)rmReqProps.get(RMConstant.PROTOCOL_MESSAGES_MAPPING);
RMCloseSequence payload = (RMCloseSequence)data.get(rmConstants.getCloseSequenceQName());
String seqIdentifier = payload.getIdentifier();
- sequence = RMHelper.getServerSequenceByInboundId(seqIdentifier, sequences);
+ sequence = RMStore.deserialize(dataDir, seqIdentifier, true);
+ //sequence = RMHelper.getServerSequenceByInboundId(seqIdentifier, sequences);
if (sequence == null)
{
throw new NotImplementedException("TODO: implement unknown sequence fault" + seqIdentifier);
}
sequence.close();
+ RMStore.serialize(dataDir, sequence);
protocolMessages.add(rmConstants.getCloseSequenceResponseQName());
protocolMessages.add(rmConstants.getSequenceAcknowledgementQName());
rmResponseContext.put(RMConstant.SEQUENCE_REFERENCE, sequence);
@@ -148,7 +174,8 @@
Map<QName, RMSerializable> data = (Map<QName, RMSerializable>)rmReqProps.get(RMConstant.PROTOCOL_MESSAGES_MAPPING);
RMSequenceAcknowledgement payload = (RMSequenceAcknowledgement)data.get(rmConstants.getSequenceAcknowledgementQName());
String seqIdentifier = payload.getIdentifier();
- sequence = RMHelper.getServerSequenceByOutboundId(seqIdentifier, sequences);
+ sequence = RMStore.deserialize(dataDir, seqIdentifier, false);
+ //sequence = RMHelper.getServerSequenceByOutboundId(seqIdentifier, sequences);
if (sequence == null)
{
throw new NotImplementedException("TODO: implement unknown sequence fault" + seqIdentifier);
@@ -161,6 +188,8 @@
sequence.addReceivedOutboundMessage(i);
}
}
+
+ RMStore.serialize(dataDir, sequence);
}
if (RMHelper.isTerminateSequence(rmReqProps))
@@ -168,13 +197,15 @@
Map<QName, RMSerializable> data = (Map<QName, RMSerializable>)rmReqProps.get(RMConstant.PROTOCOL_MESSAGES_MAPPING);
RMTerminateSequence payload = (RMTerminateSequence)data.get(rmConstants.getTerminateSequenceQName());
String seqIdentifier = payload.getIdentifier();
- sequence = RMHelper.getServerSequenceByInboundId(seqIdentifier, sequences);
+ sequence = RMStore.deserialize(dataDir, seqIdentifier, true);
+ //sequence = RMHelper.getServerSequenceByInboundId(seqIdentifier, sequences);
if (sequence == null)
{
throw new NotImplementedException("TODO: implement unknown sequence fault" + seqIdentifier);
}
- sequences.remove(sequence);
+ RMStore.serialize(dataDir, sequence); // TODO: serialization of terminated sequence results in no file
+ //sequences.remove(sequence);
if (RMProvider.get().getMessageFactory().newTerminateSequenceResponse() != null)
{
protocolMessages.add(rmConstants.getTerminateSequenceResponseQName());
@@ -184,7 +215,7 @@
}
else
{
- return null; // no WS-RM context propagated
+ return null; // no WS-RM context propagated - WS-RM 1.0
}
}
@@ -193,13 +224,15 @@
Map<QName, RMSerializable> data = (Map<QName, RMSerializable>)rmReqProps.get(RMConstant.PROTOCOL_MESSAGES_MAPPING);
RMSequence payload = (RMSequence)data.get(rmConstants.getSequenceQName());
String seqIdentifier = payload.getIdentifier();
- sequence = RMHelper.getServerSequenceByInboundId(seqIdentifier, sequences);
+ sequence = RMStore.deserialize(dataDir, seqIdentifier, true);
+ //sequence = RMHelper.getServerSequenceByInboundId(seqIdentifier, sequences);
if (sequence == null)
{
throw new NotImplementedException("TODO: implement unknown sequence fault" + seqIdentifier);
}
sequence.addReceivedInboundMessage(payload.getMessageNumber());
+ RMStore.serialize(dataDir, sequence);
protocolMessages.add(rmConstants.getSequenceAcknowledgementQName());
rmResponseContext.put(RMConstant.SEQUENCE_REFERENCE, sequence);
Modified: stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/server/RMServerSequence.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/server/RMServerSequence.java 2008-02-26 17:09:46 UTC (rev 5813)
+++ stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/server/RMServerSequence.java 2008-02-26 17:17:06 UTC (rev 5814)
@@ -21,12 +21,18 @@
*/
package org.jboss.ws.extensions.wsrm.server;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.util.Iterator;
import java.util.Set;
import java.util.TreeSet;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicLong;
import org.jboss.logging.Logger;
+import org.jboss.util.NotImplementedException;
import org.jboss.ws.extensions.addressing.AddressingClientUtil;
import org.jboss.ws.extensions.wsrm.RMSequence;
@@ -41,15 +47,63 @@
{
private static final Logger logger = Logger.getLogger(RMServerSequence.class);
- private final String inboundId = AddressingClientUtil.generateMessageID().toString();
- private final String outboundId = AddressingClientUtil.generateMessageID().toString();
- private final long duration = 10 * 60 * 1000L; // 10 minutes duration
- private final Set<Long> acknowledgedOutboundMessages = new TreeSet<Long>();
- private final Set<Long> receivedInboundMessages = new TreeSet<Long>();
+ private String sequenceId;
+ private String inboundId;
+ private String outboundId;
+ private long creationTime;
+ private long duration;
+ private Set<Long> acknowledgedOutboundMessages = new TreeSet<Long>();
+ private Set<Long> receivedInboundMessages = new TreeSet<Long>();
private boolean closed;
- private AtomicBoolean inboundMessageAckRequested = new AtomicBoolean();
- private AtomicLong messageNumber = new AtomicLong();
+ private boolean terminated;
+ private boolean inboundMessageAckRequested;
+ private long messageNumber;
+ public RMServerSequence(File serializedSequence) throws IOException
+ {
+ ObjectInputStream ois = null;
+ try
+ {
+ ois = new ObjectInputStream(new FileInputStream(serializedSequence));
+ this.sequenceId = serializedSequence.getName();
+ this.inboundId = ois.readUTF();
+ this.outboundId = ois.readUTF();
+ this.closed = ois.readBoolean();
+ this.terminated = ois.readBoolean();
+ this.creationTime = ois.readLong();
+ this.duration = ois.readLong();
+ this.messageNumber = ois.readLong();
+ int countOfOutboundMessages = ois.readInt();
+ for (int i = 0; i < countOfOutboundMessages; i++)
+ {
+ this.acknowledgedOutboundMessages.add(ois.readLong());
+ }
+ int countOfInboundMessages = ois.readInt();
+ for (int i = 0; i < countOfInboundMessages; i++)
+ {
+ this.receivedInboundMessages.add(ois.readLong());
+ }
+ }
+ finally
+ {
+ ois.close();
+ }
+ }
+
+ public RMServerSequence()
+ {
+ this.sequenceId = "seq-" + System.currentTimeMillis() + "-" + System.identityHashCode(this);
+ this.inboundId = AddressingClientUtil.generateMessageID().toString();
+ this.outboundId = AddressingClientUtil.generateMessageID().toString();
+ this.creationTime = System.currentTimeMillis();
+ this.duration = 10 * 60 * 1000L; // 10 minutes duration
+ }
+
+ public String getId()
+ {
+ return this.sequenceId;
+ }
+
public String getInboundId()
{
return this.inboundId;
@@ -69,6 +123,16 @@
{
return this.outboundId;
}
+
+ public void serialize()
+ {
+ throw new NotImplementedException();
+ }
+
+ public void deserialize()
+ {
+ throw new NotImplementedException();
+ }
public final void addReceivedInboundMessage(long messageId)
{
@@ -84,25 +148,25 @@
public final void ackRequested(boolean requested)
{
- this.inboundMessageAckRequested.set(requested);
+ this.inboundMessageAckRequested = requested;
logger.debug("Inbound Sequence: " + this.inboundId + ", ack requested. Messages in the queue: " + this.receivedInboundMessages);
}
public final long newMessageNumber()
{
// no need for synchronization
- return this.messageNumber.incrementAndGet();
+ return ++this.messageNumber;
}
public final long getLastMessageNumber()
{
// no need for synchronization
- return this.messageNumber.get();
+ return this.messageNumber;
}
public final boolean isAckRequested()
{
- return this.inboundMessageAckRequested.get();
+ return this.inboundMessageAckRequested;
}
public Set<Long> getReceivedInboundMessages()
@@ -115,6 +179,36 @@
this.closed = true;
}
+ public void terminate()
+ {
+ this.terminated = true;
+ }
+
+ public byte[] toByteArray() throws IOException
+ {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ ObjectOutputStream oos = new ObjectOutputStream(baos);
+ oos.writeUTF(this.inboundId);
+ oos.writeUTF(this.outboundId);
+ oos.writeBoolean(this.closed);
+ oos.writeBoolean(this.terminated);
+ oos.writeLong(this.creationTime);
+ oos.writeLong(this.duration);
+ oos.writeLong(this.messageNumber);
+ oos.writeInt(this.acknowledgedOutboundMessages.size());
+ for (Iterator<Long> i = this.acknowledgedOutboundMessages.iterator(); i.hasNext(); )
+ {
+ oos.writeLong(i.next());
+ }
+ oos.writeInt(this.receivedInboundMessages.size());
+ for (Iterator<Long> i = this.receivedInboundMessages.iterator(); i.hasNext(); )
+ {
+ oos.writeLong(i.next());
+ }
+ oos.close();
+ return baos.toByteArray();
+ }
+
public String toString()
{
return this.inboundId + " - " + this.outboundId;
Added: stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/server/RMStore.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/server/RMStore.java (rev 0)
+++ stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/server/RMStore.java 2008-02-26 17:17:06 UTC (rev 5814)
@@ -0,0 +1,94 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.extensions.wsrm.server;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+
+import org.jboss.logging.Logger;
+
+/**
+ * Server side RM store that de/serializes sequences
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+public final class RMStore
+{
+
+ private static final Logger logger = Logger.getLogger(RMStore.class);
+
+ public static final void serialize(String dataDir, RMServerSequence seq)
+ {
+ File dir = new File(dataDir);
+ dir.mkdirs();
+ File file = new File(dir, seq.getId());
+ FileOutputStream fos = null;
+ try
+ {
+ fos = new FileOutputStream(file);
+ fos.write(seq.toByteArray());
+ }
+ catch (IOException ioe)
+ {
+ logger.error(ioe.getMessage(), ioe);
+ }
+ finally
+ {
+ if (fos != null)
+ {
+ try
+ {
+ fos.close();
+ }
+ catch (IOException ignore)
+ {
+ // do nothing
+ }
+ }
+ }
+ }
+
+ public static final RMServerSequence deserialize(String dataDir, String seqId, boolean inbound)
+ {
+ File[] sequences = new File(dataDir).listFiles();
+ for (int i = 0; i < sequences.length; i++)
+ {
+ try
+ {
+ RMServerSequence sequence = new RMServerSequence(sequences[i]);
+ boolean matches = inbound ? sequence.getInboundId().equals(seqId) : sequence.getOutboundId().equals(seqId);
+ if (matches)
+ {
+ return sequence;
+ }
+ }
+ catch (IOException ioe)
+ {
+ logger.error(ioe.getMessage(), ioe);
+ }
+ }
+
+ return null;
+ }
+
+}
Property changes on: stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/server/RMStore.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
16 years, 10 months
JBossWS SVN: r5813 - stack/native/trunk/src/test/resources/jaxws/wsrm/META-INF.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2008-02-26 12:09:46 -0500 (Tue, 26 Feb 2008)
New Revision: 5813
Modified:
stack/native/trunk/src/test/resources/jaxws/wsrm/META-INF/wsrm-jaxws-client-config.xml
Log:
increase timeout
Modified: stack/native/trunk/src/test/resources/jaxws/wsrm/META-INF/wsrm-jaxws-client-config.xml
===================================================================
--- stack/native/trunk/src/test/resources/jaxws/wsrm/META-INF/wsrm-jaxws-client-config.xml 2008-02-26 15:04:20 UTC (rev 5812)
+++ stack/native/trunk/src/test/resources/jaxws/wsrm/META-INF/wsrm-jaxws-client-config.xml 2008-02-26 17:09:46 UTC (rev 5813)
@@ -9,7 +9,7 @@
<client-config>
<config-name>Standard Anonymous WSRM Client</config-name>
<reliable-messaging>
- <message-retransmission attempts="50" interval="10" timeout="3"/>
+ <message-retransmission attempts="50" interval="10" timeout="10"/>
</reliable-messaging>
<post-handler-chains>
<javaee:handler-chain>
@@ -30,7 +30,7 @@
<config-name>Standard Addressable WSRM Client</config-name>
<reliable-messaging>
<backports-server port="7777"/>
- <message-retransmission attempts="50" interval="10" timeout="3"/>
+ <message-retransmission attempts="50" interval="10" timeout="10"/>
</reliable-messaging>
<post-handler-chains>
<javaee:handler-chain>
@@ -50,7 +50,7 @@
<client-config>
<config-name>Secured Anonymous WSRM Client</config-name>
<reliable-messaging>
- <message-retransmission attempts="50" interval="10" timeout="3"/>
+ <message-retransmission attempts="50" interval="10" timeout="10"/>
</reliable-messaging>
<post-handler-chains>
<javaee:handler-chain>
@@ -75,7 +75,7 @@
<config-name>Secured Addressable WSRM Client</config-name>
<reliable-messaging>
<backports-server port="7777"/>
- <message-retransmission attempts="50" interval="10" timeout="3"/>
+ <message-retransmission attempts="50" interval="10" timeout="10"/>
</reliable-messaging>
<post-handler-chains>
<javaee:handler-chain>
16 years, 10 months
JBossWS SVN: r5812 - framework/trunk/src/main/java/org/jboss/wsf/framework/deployment.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-02-26 10:04:20 -0500 (Tue, 26 Feb 2008)
New Revision: 5812
Modified:
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/DeploymentAspectInstaller.java
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/DeploymentAspectManagerImpl.java
Log:
DeploymentAspectInstaller removes aspects on destroy
Modified: framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/DeploymentAspectInstaller.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/DeploymentAspectInstaller.java 2008-02-26 14:48:36 UTC (rev 5811)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/DeploymentAspectInstaller.java 2008-02-26 15:04:20 UTC (rev 5812)
@@ -137,6 +137,19 @@
manager.setDeploymentAspects(sortedAspects);
}
+ public void destroy()
+ {
+ List<DeploymentAspect> managerAspects = new ArrayList<DeploymentAspect>();
+ managerAspects.addAll(manager.getDeploymentAspects());
+ Iterator<DeploymentAspect> it = aspects.iterator();
+ while (it.hasNext())
+ {
+ DeploymentAspect aspect = it.next();
+ managerAspects.remove(aspect);
+ }
+ manager.setDeploymentAspects(managerAspects);
+ }
+
private void throwSortException(List<DeploymentAspect> sortedAspects, List<DeploymentAspect> allAspects)
{
Set<String> providedConditions = new HashSet<String>();
Modified: framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/DeploymentAspectManagerImpl.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/DeploymentAspectManagerImpl.java 2008-02-26 14:48:36 UTC (rev 5811)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/DeploymentAspectManagerImpl.java 2008-02-26 15:04:20 UTC (rev 5812)
@@ -49,8 +49,7 @@
private String name;
private DeploymentAspectManager parent;
- private List<DeploymentAspect> sortedAspects = new ArrayList<DeploymentAspect>();
- private long deploymentCount;
+ private List<DeploymentAspect> depAspects = new ArrayList<DeploymentAspect>();
public String getName()
{
@@ -74,16 +73,20 @@
public List<DeploymentAspect> getDeploymentAspects()
{
- return Collections.unmodifiableList(sortedAspects);
+ return Collections.unmodifiableList(depAspects);
}
public void setDeploymentAspects(List<DeploymentAspect> aspects)
{
- if (deploymentCount > 0)
- throw new IllegalStateException("Cannot add deployment aspects");
-
- sortedAspects.clear();
- sortedAspects.addAll(aspects);
+ depAspects.clear();
+ depAspects.addAll(aspects);
+
+ // Debug the aspect list
+ StringBuilder builder = new StringBuilder("setDeploymentAspects on " + name);
+ for (DeploymentAspect aspect : aspects)
+ builder.append("\n " + aspect.getClass().getName());
+
+ log.debug(builder);
}
/**
@@ -140,8 +143,6 @@
}
dep.setState(DeploymentState.STARTED);
-
- deploymentCount++;
}
public void undeploy(Deployment dep)
16 years, 10 months
JBossWS SVN: r5811 - in stack/native/trunk: src/test/java/org/jboss/test/ws/jaxrpc/jbws1124 and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2008-02-26 09:48:36 -0500 (Tue, 26 Feb 2008)
New Revision: 5811
Modified:
stack/native/trunk/ant-import-tests/build-jars-jaxrpc.xml
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1124/TestEndpointImpl.java
Log:
Fix JBWS-1124: Load resources from WEB-INF/classes
Modified: stack/native/trunk/ant-import-tests/build-jars-jaxrpc.xml
===================================================================
--- stack/native/trunk/ant-import-tests/build-jars-jaxrpc.xml 2008-02-26 14:46:32 UTC (rev 5810)
+++ stack/native/trunk/ant-import-tests/build-jars-jaxrpc.xml 2008-02-26 14:48:36 UTC (rev 5811)
@@ -2150,17 +2150,26 @@
<copy todir="${tests.output.dir}/resources" overwrite="true">
<fileset dir="${tests.resources.dir}">
<include name="jaxrpc/jbws1124/META-INF/jboss-client.xml"/>
- <include name="jaxrpc/jbws1124/WEB-INF/test-resource.txt"/>
<include name="jaxrpc/jbws1124/WEB-INF/jboss-web.xml"/>
</fileset>
<filterset>
<filter token="jbws1124.domain" value="jbws1124one"/>
</filterset>
</copy>
- <war warfile="${tests.output.dir}/libs/jaxrpc-jbws1124one.war" webxml="${tests.output.dir}/resources/jaxrpc/jbws1124/WEB-INF/web.xml">
+ <copy todir="${tests.output.dir}/classes/org/jboss/test/ws/jaxrpc/jbws1124/" overwrite="true">
+ <fileset dir="${tests.resources.dir}/jaxrpc/jbws1124/WEB-INF/">
+ <include name="test-resource.txt"/>
+ </fileset>
+ <filterset>
+ <filter token="jbws1124.domain" value="jbws1124one"/>
+ </filterset>
+ </copy>
+
+ <war warfile="${tests.output.dir}/libs/jaxrpc-jbws1124one.war" webxml="${tests.output.dir}/resources/jaxrpc/jbws1124/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/classes">
<include name="org/jboss/test/ws/jaxrpc/jbws1124/TestEndpoint.class"/>
<include name="org/jboss/test/ws/jaxrpc/jbws1124/TestEndpointImpl.class"/>
+ <include name="org/jboss/test/ws/jaxrpc/jbws1124/test-resource.txt"/>
</classes>
<webinf dir="${tests.output.dir}/resources/jaxrpc/jbws1124/WEB-INF">
<include name="webservices.xml"/>
@@ -2174,17 +2183,26 @@
<copy todir="${tests.output.dir}/resources" overwrite="true">
<fileset dir="${tests.resources.dir}">
<include name="jaxrpc/jbws1124/META-INF/jboss-client.xml"/>
- <include name="jaxrpc/jbws1124/WEB-INF/test-resource.txt"/>
<include name="jaxrpc/jbws1124/WEB-INF/jboss-web.xml"/>
</fileset>
<filterset>
<filter token="jbws1124.domain" value="jbws1124two"/>
</filterset>
</copy>
- <war warfile="${tests.output.dir}/libs/jaxrpc-jbws1124two.war" webxml="${tests.output.dir}/resources/jaxrpc/jbws1124/WEB-INF/web.xml">
+ <copy todir="${tests.output.dir}/classes/org/jboss/test/ws/jaxrpc/jbws1124/" overwrite="true">
+ <fileset dir="${tests.resources.dir}/jaxrpc/jbws1124/WEB-INF/">
+ <include name="test-resource.txt"/>
+ </fileset>
+ <filterset>
+ <filter token="jbws1124.domain" value="jbws1124two"/>
+ </filterset>
+ </copy>
+
+ <war warfile="${tests.output.dir}/libs/jaxrpc-jbws1124two.war" webxml="${tests.output.dir}/resources/jaxrpc/jbws1124/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/classes">
<include name="org/jboss/test/ws/jaxrpc/jbws1124/TestEndpoint.class"/>
<include name="org/jboss/test/ws/jaxrpc/jbws1124/TestEndpointImpl.class"/>
+ <include name="org/jboss/test/ws/jaxrpc/jbws1124/test-resource.txt"/>
</classes>
<webinf dir="${tests.output.dir}/resources/jaxrpc/jbws1124/WEB-INF">
<include name="webservices.xml"/>
Modified: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1124/TestEndpointImpl.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1124/TestEndpointImpl.java 2008-02-26 14:46:32 UTC (rev 5810)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1124/TestEndpointImpl.java 2008-02-26 14:48:36 UTC (rev 5811)
@@ -36,7 +36,7 @@
public class TestEndpointImpl implements TestEndpoint
{
private Logger log = Logger.getLogger(TestEndpointImpl.class);
- private static final String WEB_INF_TEST_RESOURCE_TXT = "WEB-INF/test-resource.txt";
+ private static final String WEB_INF_TEST_RESOURCE_TXT = "org/jboss/test/ws/jaxrpc/jbws1124/test-resource.txt";
public String getResourceString() throws RemoteException
{
16 years, 10 months
JBossWS SVN: r5810 - spi/trunk/src/main/java/org/jboss/wsf/spi/deployment.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-02-26 09:46:32 -0500 (Tue, 26 Feb 2008)
New Revision: 5810
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectManager.java
Log:
clarify javadoc
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectManager.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectManager.java 2008-02-26 14:09:09 UTC (rev 5809)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectManager.java 2008-02-26 14:46:32 UTC (rev 5810)
@@ -42,10 +42,10 @@
/** Set the optional parent for this manager */
void setParent(DeploymentAspectManager dam);
- /** Get the ordered list of registered deployment aspects */
+ /** Get the list of registered deployment aspects */
List<DeploymentAspect> getDeploymentAspects();
- /** Set the ordered list of registered deployment aspects */
+ /** Set the list of registered deployment aspects */
void setDeploymentAspects(List<DeploymentAspect> aspects);
/** Deploy a web service */
16 years, 10 months
JBossWS SVN: r5809 - stack/native/trunk/src/main/java/org/jboss/ws/core/jaxrpc/client.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2008-02-26 09:09:09 -0500 (Tue, 26 Feb 2008)
New Revision: 5809
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceReferenceable.java
Log:
Use VFS to pull WSSE resources from ServiceRef bindings
Modified: stack/native/trunk/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceReferenceable.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceReferenceable.java 2008-02-26 11:43:42 UTC (rev 5808)
+++ stack/native/trunk/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceReferenceable.java 2008-02-26 14:09:09 UTC (rev 5809)
@@ -39,6 +39,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.metadata.wsse.WSSecurityConfiguration;
import org.jboss.ws.metadata.wsse.WSSecurityOMFactory;
+import org.jboss.ws.metadata.wsse.WSSecurityConfigFactory;
import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
import org.jboss.wsf.spi.management.ServerConfig;
import org.jboss.wsf.spi.management.ServerConfigFactory;
@@ -148,9 +149,11 @@
ByteArrayOutputStream baos = new ByteArrayOutputStream(512);
try
{
+ WSSecurityConfiguration securityConfig = WSSecurityConfigFactory.newInstance().createConfiguration(
+ refMetaData.getVfsRoot(), WSSecurityOMFactory.CLIENT_RESOURCE_NAME
+ );
+
ObjectOutputStream oos = new ObjectOutputStream(baos);
- WSSecurityOMFactory factory = WSSecurityOMFactory.newInstance();
- WSSecurityConfiguration securityConfig = factory.parse(getSecurityConfig());
oos.writeObject(securityConfig);
oos.close();
}
16 years, 10 months
JBossWS SVN: r5808 - in stack/native/trunk: src/test/java/org/jboss/test/ws/jaxws and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2008-02-26 06:43:42 -0500 (Tue, 26 Feb 2008)
New Revision: 5808
Added:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1991/
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1991/Hello.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1991/HelloJavaBean.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1991/UsernameAuthTestCase.java
stack/native/trunk/src/test/resources/jaxws/jbws1991/
stack/native/trunk/src/test/resources/jaxws/jbws1991/META-INF/
stack/native/trunk/src/test/resources/jaxws/jbws1991/META-INF/jboss-wsse-client.xml
stack/native/trunk/src/test/resources/jaxws/jbws1991/META-INF/jboss-wsse-server.xml
Modified:
stack/native/trunk/ant-import-tests/build-jars-jaxws.xml
Log:
[JBWS-1991] Test case
Modified: stack/native/trunk/ant-import-tests/build-jars-jaxws.xml
===================================================================
--- stack/native/trunk/ant-import-tests/build-jars-jaxws.xml 2008-02-26 10:47:26 UTC (rev 5807)
+++ stack/native/trunk/ant-import-tests/build-jars-jaxws.xml 2008-02-26 11:43:42 UTC (rev 5808)
@@ -643,6 +643,17 @@
<include name="wsdl/**"/>
</metainf>
</jar>
+
+ <!-- jaxws-jbws1991 -->
+ <jar destfile="${tests.output.dir}/libs/jaxws-jbws1991.jar">
+ <fileset dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/jbws1991/*.class"/>
+ <exclude name="org/jboss/test/ws/jaxws/jbws1991/*TestCase.class"/>
+ </fileset>
+ <metainf dir="${tests.output.dir}/resources/jaxws/jbws1991/META-INF">
+ <include name="jboss-wsse-server.xml"/>
+ </metainf>
+ </jar>
<!-- jaxws-jbws2000 -->
<jar destfile="${tests.output.dir}/libs/jaxws-jbws2000.jar">
Added: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1991/Hello.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1991/Hello.java (rev 0)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1991/Hello.java 2008-02-26 11:43:42 UTC (rev 5808)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws1991;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+@WebService(name = "Hello", targetNamespace = "http://org.jboss.ws/jbws1991")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public interface Hello
+{
+ @WebMethod
+ public String echo(String par);
+}
Property changes on: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1991/Hello.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1991/HelloJavaBean.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1991/HelloJavaBean.java (rev 0)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1991/HelloJavaBean.java 2008-02-26 11:43:42 UTC (rev 5808)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws1991;
+
+import javax.annotation.Resource;
+import javax.annotation.security.RolesAllowed;
+import javax.ejb.Stateless;
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.xml.ws.WebServiceContext;
+
+import org.jboss.annotation.security.SecurityDomain;
+import org.jboss.logging.Logger;
+import org.jboss.ws.annotation.EndpointConfig;
+import org.jboss.wsf.spi.annotation.WebContext;
+
+
+@Stateless
+@WebService(name = "Hello", serviceName = "HelloService", targetNamespace = "http://org.jboss.ws/jbws1991")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+@WebContext(contextRoot = "/jaxws-jbws1991", urlPattern = "/*")
+@EndpointConfig(configName = "Standard WSSecurity Endpoint")
+@SecurityDomain("JBossWS")
+@RolesAllowed({"friend"})
+public class HelloJavaBean
+{
+ private Logger log = Logger.getLogger(HelloJavaBean.class);
+ @Resource
+ private WebServiceContext ctx;
+
+ @WebMethod
+ public String echo(String par)
+ {
+ log.info("User principal: " + ctx.getUserPrincipal());
+ return par;
+ }
+}
Property changes on: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1991/HelloJavaBean.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1991/UsernameAuthTestCase.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1991/UsernameAuthTestCase.java (rev 0)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1991/UsernameAuthTestCase.java 2008-02-26 11:43:42 UTC (rev 5808)
@@ -0,0 +1,80 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws1991;
+
+import java.io.File;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.ws.core.StubExt;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * http://jira.jboss.org/jira/browse/JBWS-1991
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 26-02-2008
+ */
+public class UsernameAuthTestCase extends JBossWSTest
+{
+ private String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-jbws1991";
+
+ public static Test suite() throws Exception
+ {
+ return new JBossWSTestSetup(UsernameAuthTestCase.class, "jaxws-jbws1991.jar");
+ }
+
+ public void testAuth() throws Exception
+ {
+ Hello port = getPort();
+ ((BindingProvider)port).getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "kermit");
+ ((BindingProvider)port).getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "thefrog");
+ String msg = "Hi!";
+ try
+ {
+ String result = port.echo(msg);
+ assertEquals(msg, result);
+ }
+ catch (Exception e)
+ {
+ fail();
+ }
+ }
+
+ private Hello getPort() throws Exception
+ {
+ URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
+ QName serviceName = new QName("http://org.jboss.ws/jbws1991", "HelloService");
+ Hello port = Service.create(wsdlURL, serviceName).getPort(Hello.class);
+ URL securityURL = new File("resources/jaxws/jbws1991/META-INF/jboss-wsse-client.xml").toURL();
+ ((StubExt)port).setSecurityConfig(securityURL.toExternalForm());
+ ((StubExt)port).setConfigName("Standard WSSecurity Client");
+ ((BindingProvider)port).getRequestContext().put(StubExt.PROPERTY_AUTH_TYPE, StubExt.PROPERTY_AUTH_TYPE_WSSE);
+ return port;
+ }
+}
\ No newline at end of file
Property changes on: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1991/UsernameAuthTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/trunk/src/test/resources/jaxws/jbws1991/META-INF/jboss-wsse-client.xml
===================================================================
--- stack/native/trunk/src/test/resources/jaxws/jbws1991/META-INF/jboss-wsse-client.xml (rev 0)
+++ stack/native/trunk/src/test/resources/jaxws/jbws1991/META-INF/jboss-wsse-client.xml 2008-02-26 11:43:42 UTC (rev 5808)
@@ -0,0 +1,10 @@
+<?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">
+
+ <config>
+ <username/>
+ <timestamp ttl="300"/>
+ </config>
+</jboss-ws-security>
\ No newline at end of file
Property changes on: stack/native/trunk/src/test/resources/jaxws/jbws1991/META-INF/jboss-wsse-client.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/trunk/src/test/resources/jaxws/jbws1991/META-INF/jboss-wsse-server.xml
===================================================================
--- stack/native/trunk/src/test/resources/jaxws/jbws1991/META-INF/jboss-wsse-server.xml (rev 0)
+++ stack/native/trunk/src/test/resources/jaxws/jbws1991/META-INF/jboss-wsse-server.xml 2008-02-26 11:43:42 UTC (rev 5808)
@@ -0,0 +1,10 @@
+<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">
+ <config>
+ <timestamp ttl="300"/>
+ <requires/>
+ </config>
+
+</jboss-ws-security>
Property changes on: stack/native/trunk/src/test/resources/jaxws/jbws1991/META-INF/jboss-wsse-server.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
16 years, 10 months
JBossWS SVN: r5807 - stack/native/trunk/src/test/resources/jaxws/jbws771.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2008-02-26 05:47:26 -0500 (Tue, 26 Feb 2008)
New Revision: 5807
Modified:
stack/native/trunk/src/test/resources/jaxws/jbws771/binding.xml
Log:
JBWS-771: Different package name to avoid compilation errors
Modified: stack/native/trunk/src/test/resources/jaxws/jbws771/binding.xml
===================================================================
--- stack/native/trunk/src/test/resources/jaxws/jbws771/binding.xml 2008-02-26 10:46:38 UTC (rev 5806)
+++ stack/native/trunk/src/test/resources/jaxws/jbws771/binding.xml 2008-02-26 10:47:26 UTC (rev 5807)
@@ -5,6 +5,7 @@
<jaxws:bindings
node="wsdl:definitions/wsdl:portType[@name='IWebsvc']/wsdl:operation[@name='cancel']">
+ <jaxws:package name="foo.bar.com"/>
<jaxws:parameter
part="wsdl:definitions/wsdl:message[@name='IWebsvc_cancel']/wsdl:part[@name='parameters']"
element="tns:cancel" name="cancelMessage"/>
16 years, 10 months
JBossWS SVN: r5806 - stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2008-02-26 05:46:38 -0500 (Tue, 26 Feb 2008)
New Revision: 5806
Modified:
stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws/JAXBIntroDeploymentAspect.java
Log:
JAXBIntros: Pick resources through VFS instead of classloader
Modified: stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws/JAXBIntroDeploymentAspect.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws/JAXBIntroDeploymentAspect.java 2008-02-26 10:29:53 UTC (rev 5805)
+++ stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws/JAXBIntroDeploymentAspect.java 2008-02-26 10:46:38 UTC (rev 5806)
@@ -28,9 +28,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.core.jaxws.JAXBBindingCustomization;
import org.jboss.wsf.spi.binding.BindingCustomization;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.DeploymentAspect;
-import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.*;
import java.io.IOException;
import java.io.InputStream;
@@ -42,30 +40,46 @@
public class JAXBIntroDeploymentAspect extends DeploymentAspect
{
private static Logger logger = Logger.getLogger(JAXBIntroDeploymentAspect.class);
+ private static final String META_INF_JAXB_INTROS_XML = "META-INF/jaxb-intros.xml";
+ private static final String WEB_INF_JAXB_INTROS_XML = "WEB-INF/jaxb-intros.xml";
public void create(Deployment deployment)
{
+ // assert ArchiveDeployment
+ if(! (deployment instanceof ArchiveDeployment) )
+ {
+ log.debug("JAXBIntroDeploymentAspect doesn't work on " + deployment.getClass());
+ return;
+ }
+
+ ArchiveDeployment archive = (ArchiveDeployment)deployment;
InputStream introsConfigStream = null;
- try { // META-INF first
- ClassLoader classLoader = deployment.getRuntimeClassLoader();
- introsConfigStream = classLoader.getResource("META-INF/jaxb-intros.xml").openStream();
+ try
+ {
+ // META-INF first
+ UnifiedVirtualFile vfs = archive.getRootFile().findChild(META_INF_JAXB_INTROS_XML);
+ introsConfigStream = vfs.toURL().openStream();
} catch (Exception e) {}
if(null == introsConfigStream)
{
- try { // WEB-INF second
-
- ClassLoader classLoader = deployment.getRuntimeClassLoader();
- introsConfigStream = classLoader.getResource("WEB-INF/jaxb-intros.xml").openStream();
+ try
+ {
+ // WEB-INF second
+ UnifiedVirtualFile vfs = archive.getRootFile().findChild(WEB_INF_JAXB_INTROS_XML);
+ introsConfigStream = vfs.toURL().openStream();
} catch (Exception e) {
return;
}
}
- try {
- if(introsConfigStream != null) {
+ try
+ {
+
+ if(introsConfigStream != null)
+ {
JaxbIntros jaxbIntros = IntroductionsConfigParser.parseConfig(introsConfigStream);
IntroductionsAnnotationReader annotationReader = new IntroductionsAnnotationReader(jaxbIntros);
String defaultNamespace = jaxbIntros.getDefaultNamespace();
@@ -83,8 +97,12 @@
}
}
- } finally {
- if(introsConfigStream != null) {
+
+ }
+ finally
+ {
+ if(introsConfigStream != null)
+ {
try {
introsConfigStream.close();
} catch (IOException e) {
16 years, 10 months
JBossWS SVN: r5805 - stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1124.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2008-02-26 05:29:53 -0500 (Tue, 26 Feb 2008)
New Revision: 5805
Modified:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1124/TestEndpointImpl.java
Log:
Remove NPE from test case. It hides the actual assertion
Modified: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1124/TestEndpointImpl.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1124/TestEndpointImpl.java 2008-02-25 20:32:13 UTC (rev 5804)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1124/TestEndpointImpl.java 2008-02-26 10:29:53 UTC (rev 5805)
@@ -36,23 +36,32 @@
public class TestEndpointImpl implements TestEndpoint
{
private Logger log = Logger.getLogger(TestEndpointImpl.class);
+ private static final String WEB_INF_TEST_RESOURCE_TXT = "WEB-INF/test-resource.txt";
-
public String getResourceString() throws RemoteException
{
- try
- {
- InputStream ins = getClass().getClassLoader().getResourceAsStream("WEB-INF/test-resource.txt");
- String line = new BufferedReader(new InputStreamReader(ins)).readLine();
-
- log.info(line);
-
- return line;
- }
- catch (IOException ex)
- {
- throw new WSException(ex);
- }
+
+ ClassLoader loader = getClass().getClassLoader();
+ InputStream ins = loader.getResourceAsStream(WEB_INF_TEST_RESOURCE_TXT);
+
+ if(ins!=null)
+ {
+ try
+ {
+ String line = new BufferedReader(new InputStreamReader(ins)).readLine();
+ log.info(line);
+ return line;
+ }
+ catch (IOException ex)
+ {
+ throw new WSException(ex);
+ }
+ }
+ else
+ {
+ throw new WSException("Failed to load '"+WEB_INF_TEST_RESOURCE_TXT+"' with loader " + loader);
+ }
+
}
}
16 years, 10 months