Fixing build on windows, requires Xalan on the classpath for some reason.

This commit is contained in:
Arjen Poutsma
2007-02-16 12:40:11 +00:00
parent 7953f45e6a
commit 1fa56b03e6
2 changed files with 22 additions and 15 deletions

View File

@@ -28,6 +28,12 @@
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
</dependency>
<!-- XML handling dependencies -->
<dependency>
<groupId>xalan</groupId>
<artifactId>xalan</artifactId>
<scope>test</scope>
</dependency>
<!-- SOAP dependencies -->
<dependency>
<groupId>com.sun.xml.messaging.saaj</groupId>

View File

@@ -16,22 +16,24 @@
package org.springframework.ws.soap.security.xwss;
import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;
import javax.xml.soap.MessageFactory;
import javax.xml.soap.MimeHeaders;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPMessage;
import junit.framework.TestCase;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.ws.soap.saaj.SaajSoapMessage;
import org.springframework.xml.xpath.XPathExpression;
import org.springframework.xml.xpath.XPathExpressionFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import javax.xml.soap.MessageFactory;
import javax.xml.soap.MimeHeaders;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPMessage;
import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;
public abstract class XwssMessageInterceptorTestCase extends TestCase {
protected XwsSecurityInterceptor interceptor;
@@ -78,16 +80,15 @@ public abstract class XwssMessageInterceptorTestCase extends TestCase {
protected SaajSoapMessage loadSaajMessage(String fileName) throws SOAPException, IOException {
MimeHeaders mimeHeaders = new MimeHeaders();
mimeHeaders.addHeader("Content-Type", "text/xml");
InputStream is = null;
Resource resource = new ClassPathResource(fileName, getClass());
InputStream is = resource.getInputStream();
try {
is = getClass().getResourceAsStream(fileName);
assertNotNull("Could not load SAAJ message with name [" + fileName + "]", is);
assertTrue("Could not load SAAJ message [" + resource + "]", resource.exists());
is = resource.getInputStream();
return new SaajSoapMessage(messageFactory.createMessage(mimeHeaders, is));
}
finally {
if (is != null) {
is.close();
}
is.close();
}
}