Skip to content

Commit

Permalink
Merge SpecificationLoader changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dluebke committed Dec 20, 2013
2 parents 1e8a909 + 8ef7167 commit d047b0e
Show file tree
Hide file tree
Showing 14 changed files with 49 additions and 74 deletions.
2 changes: 1 addition & 1 deletion eclipse-deps/org.apache.velocity/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Apache Velocity
Bundle-SymbolicName: org.apache.velocity
Bundle-Version: 1.7.0
Bundle-Version: 1.7.0.qualifier
Bundle-Vendor: Apache Software Foundation
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Export-Package: org.apache.velocity,
Expand Down
12 changes: 6 additions & 6 deletions net.bpelunit.dist/src/main/resources/bpelunit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@
# Licensed under the terms of BPELUnit itself.

if [ -z "${JAVA_HOME}" ]; then
echo \
printf \
"You should set the JAVA_HOME environment variable to the absolute\n" \
"\rpath of the root directory of your Java Virtual Machine. Look for\n" \
"\rlib/tools.jar on your system if you do not know where it is." 1>&2
"\rlib/tools.jar on your system if you do not know where it is.\n" 1>&2
exit 1
fi

if [ -z "${BPELUNIT_HOME}" ]; then
echo \
printf \
"You should set the BPELUNIT_HOME environment variable to the BPELUnit\n" \
"\rinstallation directory. This should be where you unpacked the\n" \
"\rstandalone distribution." 1>&2
"\rstandalone distribution.\n" 1>&2
exit 2
fi

Expand All @@ -28,9 +28,9 @@ MAIN_CLASS=net.bpelunit.framework.ui.command.BPELUnitCommandLineRunner
## UTILITIES ##########################

echo_classpath() {
echo "$CLASSPATH"
printf "$CLASSPATH"
find "$BPELUNIT_HOME/lib" -name '*.jar' -print | \
(while read i; do echo -n ":$i"; done)
(while read i; do printf ":$i"; done)
}

## MAIN BODY ##########################
Expand Down
1 change: 1 addition & 0 deletions net.bpelunit.dist/src/main/resources/doc/CHANGES.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Staged for next version
* _Fix_: Add defined WS-HT Tracks to a test case when creating a new one
* _Fix_: Place RPC wrapper in the empty namespace when the soap:body binding element does not use the 'namespace' attribute
* _Fix_: Validate on loading a Test Suite whether condition groups that are used in normal SOAP activities are declared in the test suite (Issue BPELUnit-9)
* _Fix_: Read ID from CompleteHumanTask activities so that dependsOn works also when target activity is triggered by a complete human task

Version 1.6.1
-----------------------
Expand Down
12 changes: 6 additions & 6 deletions net.bpelunit.dist/src/main/resources/dsexpand.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@
# Licensed under the terms of BPELUnit itself.

if [ -z "${JAVA_HOME}" ]; then
echo \
printf \
"You should set the JAVA_HOME environment variable to the absolute\n" \
"\rpath of the root directory of your Java Virtual Machine. Look for\n" \
"\rlib/tools.jar on your system if you do not know where it is." 1>&2
"\rlib/tools.jar on your system if you do not know where it is.\n" 1>&2
exit 1
fi

if [ -z "${BPELUNIT_HOME}" ]; then
echo \
printf \
"You should set the BPELUNIT_HOME environment variable to the BPELUnit\n" \
"\rinstallation directory. This should be where you unpacked the\n" \
"\rstandalone distribution." 1>&2
"\rstandalone distribution.\n" 1>&2
exit 2
fi

Expand All @@ -28,9 +28,9 @@ MAIN_CLASS=net.bpelunit.utils.datasourceinliner.CLIRunner
## UTILITIES ##########################

echo_classpath() {
echo "$CLASSPATH"
printf "$CLASSPATH"
find "$BPELUNIT_HOME/lib" -name '*.jar' -print | \
(while read i; do echo -n ":$i"; done)
(while read i; do printf ":$i"; done)
}

## MAIN BODY ##########################
Expand Down
2 changes: 2 additions & 0 deletions net.bpelunit.framework.client.ant/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,7 @@
</classpathentry>
<classpathentry kind="lib" path="target/dependency/ant-1.8.1.jar"/>
<classpathentry kind="lib" path="target/dependency/ant-launcher-1.8.1.jar"/>
<classpathentry kind="lib" path="target/dependency/log4j-1.2.15.jar"/>
<classpathentry kind="lib" path="target/dependency/commons-lang-2.4.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
2 changes: 2 additions & 0 deletions net.bpelunit.framework.client.command/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,7 @@
<classpathentry kind="lib" path="target/dependency/commons-io-1.3.2.jar"/>
<classpathentry kind="lib" path="target/dependency/jdom-1.1.3.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry kind="lib" path="target/dependency/log4j-1.2.15.jar"/>
<classpathentry kind="lib" path="target/dependency/commons-lang-2.4.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
2 changes: 0 additions & 2 deletions net.bpelunit.framework/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,9 @@
</classpathentry>
<classpathentry kind="src" path="target/generated-classes/xmlbeans"/>
<classpathentry exported="true" kind="lib" path="target/dependency/commons-codec-1.3.jar"/>
<classpathentry exported="true" kind="lib" path="target/dependency/commons-lang-2.4.jar"/>
<classpathentry exported="true" kind="lib" path="target/dependency/commons-logging-1.1.1.jar"/>
<classpathentry exported="true" kind="lib" path="target/dependency/truezip-6.8.2.jar"/>
<classpathentry exported="true" kind="lib" path="target/dependency/xmlbeans-2.4.0.jar"/>
<classpathentry exported="true" kind="lib" path="target/dependency/log4j-1.2.15.jar"/>
<classpathentry kind="lib" path="target/dependency/jetty-server-8.1.9.v20130131.jar" sourcepath="/home/antonio/.m2/repository/org/eclipse/jetty/jetty-server/8.1.9.v20130131/jetty-server-8.1.9.v20130131-sources.jar"/>
<classpathentry kind="lib" path="target/dependency/javax.servlet-3.0.0.v201112011016.jar" sourcepath="/home/antonio/.m2/repository/org/eclipse/jetty/orbit/javax.servlet/3.0.0.v201112011016/javax.servlet-3.0.0.v201112011016-sources.jar"/>
<classpathentry exported="true" kind="lib" path="target/dependency/jetty-continuation-8.1.9.v20130131.jar"/>
Expand Down
46 changes: 0 additions & 46 deletions net.bpelunit.framework/build.properties

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,13 @@ public SOAPMessage construct(SOAPOperationCallIdentifier operation,
final String bodyNamespace = operation.getBodyNamespace();
final String operationName = operation.getName();
final Element firstElement = getFirstElementChild(literalData);
final SOAPElement newWrapper = sFactory.createElement(
operation.getDirection() == SOAPOperationDirectionIdentifier.INPUT ? operationName : operationName + "Response",
RPC_WRAPPER_NAMESPACE_PREFIX, bodyNamespace);
final String wrapperLocalPart = operation.getDirection() == SOAPOperationDirectionIdentifier.INPUT ? operationName : operationName + "Response";
final SOAPElement newWrapper = bodyNamespace == null ? sFactory.createElement(wrapperLocalPart) : sFactory.createElement(wrapperLocalPart, RPC_WRAPPER_NAMESPACE_PREFIX, bodyNamespace);

NodeList partNodes;
final String firstElementName = firstElement != null ? firstElement.getLocalName() : null;
final String firstElementNS = firstElement != null ? firstElement.getNamespaceURI() : null;
if (bodyNamespace.equals(firstElementNS) && (operationName.equals(firstElementName) || (operationName + "Response").equals(firstElementName))) {
if (equals(bodyNamespace, firstElementNS) && (operationName.equals(firstElementName) || (operationName + "Response").equals(firstElementName))) {
// already wrapped according to WS-I BP 1.1 S4.7.10: the parts are the children of the wrapper
partNodes = firstElement.getChildNodes();
} else {
Expand Down Expand Up @@ -205,6 +204,14 @@ public Element deconstruct(SOAPOperationCallIdentifier operation, SOAPMessage me
}
}

/**
* Compares two values for equality. Unlike {@link Object#equals(Object)}, it
* can handle the case in which the left one is <code>null</code>.
*/
private boolean equals(final String a, final String b) {
return a == null && b == null || a != null && a.equals(b);
}

private Element getFirstElementChild(Node literalData) {
Node firstElement = literalData.getFirstChild();
while (firstElement != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import java.io.IOException;

import javax.xml.XMLConstants;
import javax.xml.soap.MessageFactory;
import javax.xml.soap.SOAPBody;
import javax.xml.soap.SOAPException;
Expand Down Expand Up @@ -99,9 +100,10 @@ public void testEncodeRPCLiteResponseUnwrapped() throws Exception {
SOAPMessage message= encoder.construct(operation, literal,
BPELUnitConstants.SOAP_FAULT_CODE_CLIENT,
BPELUnitConstants.SOAP_FAULT_DESCRIPTION);

assertEquals(0, message.getSOAPBody().getElementsByTagNameNS(operation.getBodyNamespace(), operation.getName()).getLength());
assertEquals(1, message.getSOAPBody().getElementsByTagNameNS(operation.getBodyNamespace(), operation.getName() + "Response").getLength());

final Node firstChild = message.getSOAPBody().getFirstChild();
assertEquals(XMLConstants.NULL_NS_URI, firstChild.getNamespaceURI());
assertEquals(operation.getName() + "Response", firstChild.getLocalName());
}

@Test
Expand Down
4 changes: 2 additions & 2 deletions net.bpelunit.model.bpel/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<classpathentry excluding="**/*.java" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="target/generated-sources/xmlbeans"/>
<classpathentry including="**/*.java" kind="src" path="src/main/resources"/>
<classpathentry excluding="**/*.java" kind="src" path="src/main/resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry kind="lib" path="target/generated-classes/xmlbeans"/>
<classpathentry kind="lib" path="target/dependency/commons-io-1.3.2.jar"/>
Expand Down
1 change: 1 addition & 0 deletions net.bpelunit.utils.testdataexternalizer/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
<classpathentry combineaccessrules="false" kind="src" path="/net.bpelunit.model.bpel"/>
<classpathentry combineaccessrules="false" kind="src" path="/net.bpelunit.util"/>
<classpathentry kind="lib" path="target/dependency/commons-cli-1.2.jar"/>
<classpathentry kind="lib" path="target/dependency/commons-lang-2.4.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
8 changes: 8 additions & 0 deletions tycho/net.bpelunit.eclipse.feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -185,4 +185,12 @@ This Agreement is governed by the laws of the State of New York and the intellec
install-size="0"
version="0.0.0"
unpack="false"/>

<plugin
id="net.bpelunit.util"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

</feature>
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ Require-Bundle: net.bpelunit.framework,
org.eclipse.ui.console,
org.eclipse.ui.workbench.texteditor,
org.eclipse.help,
org.eclipse.help.ui
org.eclipse.help.ui,
org.apache.velocity;bundle-version="1.7.0",
org.apache.commons.lang;bundle-version="2.4.0",
org.apache.log4j;bundle-version="1.2.15"
Bundle-ActivationPolicy: lazy
Export-Package: net.bpelunit.framework.client.eclipse,
net.bpelunit.framework.client.eclipse.dialog,
Expand All @@ -28,6 +31,3 @@ Export-Package: net.bpelunit.framework.client.eclipse,
net.bpelunit.framework.client.model
Bundle-Vendor: Leibniz Universität Hannover
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: org.apache.commons.lang,
org.apache.log4j;version="1.2.17",
org.apache.xmlbeans

0 comments on commit d047b0e

Please sign in to comment.