Working on JAXP 1.4 support.
This commit is contained in:
24
core/pom.xml
24
core/pom.xml
@@ -1,4 +1,5 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<parent>
|
||||
<artifactId>spring-ws-parent</artifactId>
|
||||
<groupId>org.springframework.ws</groupId>
|
||||
@@ -109,11 +110,6 @@
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<!-- XML handling dependencies -->
|
||||
<dependency>
|
||||
<groupId>xml-apis</groupId>
|
||||
<artifactId>xml-apis</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jdom</groupId>
|
||||
<artifactId>jdom</artifactId>
|
||||
@@ -129,24 +125,10 @@
|
||||
<artifactId>xom</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>stax</groupId>
|
||||
<artifactId>stax-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>xalan</groupId>
|
||||
<artifactId>xalan</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>xerces</groupId>
|
||||
<artifactId>xercesImpl</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.woodstox</groupId>
|
||||
<artifactId>wstx-asl</artifactId>
|
||||
<scope>provided</scope>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<!-- SOAP dependencies -->
|
||||
<dependency>
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<html>
|
||||
<body>
|
||||
Provides an namespace handler for the Spring Web Services namespace.
|
||||
</body>
|
||||
</html>
|
||||
@@ -17,12 +17,8 @@
|
||||
package org.springframework.ws.server.endpoint;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
import javax.xml.transform.Result;
|
||||
import javax.xml.transform.Source;
|
||||
import javax.xml.transform.dom.DOMSource;
|
||||
import javax.xml.transform.sax.SAXSource;
|
||||
@@ -31,26 +27,19 @@ import javax.xml.transform.stream.StreamSource;
|
||||
import nu.xom.Builder;
|
||||
import nu.xom.Document;
|
||||
import nu.xom.Element;
|
||||
import nu.xom.NodeFactory;
|
||||
import nu.xom.Nodes;
|
||||
import nu.xom.ParsingException;
|
||||
import nu.xom.converters.DOMConverter;
|
||||
import org.springframework.util.ClassUtils;
|
||||
import org.springframework.xml.transform.TransformerObjectSupport;
|
||||
import org.w3c.dom.Node;
|
||||
import org.xml.sax.InputSource;
|
||||
|
||||
import org.springframework.xml.transform.TransformerObjectSupport;
|
||||
|
||||
/**
|
||||
* Abstract base class for endpoints that handle the message payload as XOM elements. Offers the message payload as a
|
||||
* XOM <code>Element</code>, and allows subclasses to create a response by returning an <code>Element</code>.
|
||||
* <p/>
|
||||
* An <code>AbstractXomPayloadEndpoint</code> only accept one payload element. Multiple payload elements are not in
|
||||
* accordance with WS-I.
|
||||
* <p/>
|
||||
* This class tries to use Java reflection to access some of the non-public classes of XOM
|
||||
* (<code>nu.xom.xslt.XOMResult</code> and <code>nu.xom.xslt.XOMSource</code>). If these classes cannot be accessed
|
||||
* because of security restrictions, a slower approach is used. You can specify whether you want to use the faster, but
|
||||
* non-public reflection-based approach by calling {@link #AbstractXomPayloadEndpoint(boolean)}.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @see Element
|
||||
@@ -58,95 +47,19 @@ import org.xml.sax.InputSource;
|
||||
*/
|
||||
public abstract class AbstractXomPayloadEndpoint extends TransformerObjectSupport implements PayloadEndpoint {
|
||||
|
||||
private Constructor xomResultConstructor;
|
||||
|
||||
private Method xomResultGetResultMethod;
|
||||
|
||||
private Constructor xomSourceConstructor;
|
||||
|
||||
private boolean useReflection = true;
|
||||
|
||||
private DocumentBuilderFactory documentBuilderFactory;
|
||||
|
||||
/**
|
||||
* Creates a new instance of <code>AbstractXomPayloadEndpoint</code> using reflection to access faster, but
|
||||
* non-public XOM classes.
|
||||
*/
|
||||
protected AbstractXomPayloadEndpoint() {
|
||||
this(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new instance of <code>AbstractXomPayloadEndpoint</code>.
|
||||
*
|
||||
* @param useReflection specifies whether to use faster, but non-public XOM classes (<code>true</code>); or to use a
|
||||
* converting approach (<code>false</code>)
|
||||
*/
|
||||
protected AbstractXomPayloadEndpoint(boolean useReflection) {
|
||||
this.useReflection = useReflection;
|
||||
if (useReflection) {
|
||||
try {
|
||||
Class xomResultClass = ClassUtils.forName("nu.xom.xslt.XOMResult");
|
||||
xomResultConstructor = xomResultClass.getDeclaredConstructor(new Class[]{NodeFactory.class});
|
||||
xomResultConstructor.setAccessible(true);
|
||||
xomResultGetResultMethod = xomResultClass.getDeclaredMethod("getResult", new Class[0]);
|
||||
xomResultGetResultMethod.setAccessible(true);
|
||||
Class xomSourceClass = ClassUtils.forName("nu.xom.xslt.XOMSource");
|
||||
xomSourceConstructor = xomSourceClass.getDeclaredConstructor(new Class[]{Nodes.class});
|
||||
xomSourceConstructor.setAccessible(true);
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.useReflection = false;
|
||||
createDocumentBuilderFactory();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public final Source invoke(Source request) throws Exception {
|
||||
if (useReflection) {
|
||||
return invokeUsingReflection(request);
|
||||
}
|
||||
else {
|
||||
return invokeUsingTransformation(request);
|
||||
}
|
||||
}
|
||||
|
||||
private Source invokeUsingReflection(Source request) throws Exception {
|
||||
try {
|
||||
Element requestElement = null;
|
||||
if (request != null) {
|
||||
Result xomResult = createXomResult();
|
||||
transform(request, xomResult);
|
||||
requestElement = getRequestElement(xomResult);
|
||||
}
|
||||
Element responseElement = invokeInternal(requestElement);
|
||||
return responseElement != null ? createXomSource(responseElement) : null;
|
||||
}
|
||||
catch (IllegalAccessException ex) {
|
||||
useReflection = false;
|
||||
throw ex;
|
||||
}
|
||||
catch (InvocationTargetException ex) {
|
||||
useReflection = false;
|
||||
throw ex;
|
||||
}
|
||||
catch (InstantiationException ex) {
|
||||
useReflection = false;
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
private Source invokeUsingTransformation(Source request) throws Exception {
|
||||
Element requestElement = null;
|
||||
if (request != null) {
|
||||
if (request instanceof DOMSource) {
|
||||
requestElement = handleDomSource(request);
|
||||
requestElement = handleDomSource((DOMSource) request);
|
||||
}
|
||||
else if (request instanceof SAXSource) {
|
||||
requestElement = handleSaxSource(request);
|
||||
requestElement = handleSaxSource((SAXSource) request);
|
||||
}
|
||||
else if (request instanceof StreamSource) {
|
||||
requestElement = handleStreamSource(request);
|
||||
requestElement = handleStreamSource((StreamSource) request);
|
||||
}
|
||||
else {
|
||||
throw new IllegalArgumentException("Source [" + request.getClass().getName() +
|
||||
@@ -154,6 +67,7 @@ public abstract class AbstractXomPayloadEndpoint extends TransformerObjectSuppor
|
||||
}
|
||||
}
|
||||
Element responseElement = invokeInternal(requestElement);
|
||||
Source result;
|
||||
if (responseElement != null) {
|
||||
if (documentBuilderFactory == null) {
|
||||
createDocumentBuilderFactory();
|
||||
@@ -165,52 +79,28 @@ public abstract class AbstractXomPayloadEndpoint extends TransformerObjectSuppor
|
||||
return new DOMSource(w3cDocument);
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
result = null;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private Result createXomResult() throws IllegalAccessException, InvocationTargetException, InstantiationException {
|
||||
return (Result) xomResultConstructor.newInstance(new Object[]{new NodeFactory()});
|
||||
private Element handleDomSource(DOMSource request) {
|
||||
Node w3cNode = request.getNode();
|
||||
org.w3c.dom.Element w3cElement = null;
|
||||
if (w3cNode.getNodeType() == Node.ELEMENT_NODE) {
|
||||
w3cElement = (org.w3c.dom.Element) w3cNode;
|
||||
}
|
||||
else if (w3cNode.getNodeType() == Node.DOCUMENT_NODE) {
|
||||
org.w3c.dom.Document w3cDocument = (org.w3c.dom.Document) w3cNode;
|
||||
w3cElement = w3cDocument.getDocumentElement();
|
||||
}
|
||||
return DOMConverter.convert(w3cElement);
|
||||
}
|
||||
|
||||
private Element getRequestElement(Result xomResult) throws IllegalAccessException, InvocationTargetException {
|
||||
Nodes result = (Nodes) xomResultGetResultMethod.invoke(xomResult, new Object[0]);
|
||||
if (result.size() == 0) {
|
||||
return null;
|
||||
}
|
||||
else {
|
||||
return (Element) result.get(0);
|
||||
}
|
||||
}
|
||||
|
||||
private Source createXomSource(Element responseElement)
|
||||
throws IllegalAccessException, InvocationTargetException, InstantiationException {
|
||||
Nodes nodes = new Nodes(responseElement);
|
||||
return (Source) xomSourceConstructor.newInstance(new Object[]{nodes});
|
||||
}
|
||||
|
||||
private Element handleStreamSource(Source request) throws ParsingException, IOException {
|
||||
StreamSource streamSource = (StreamSource) request;
|
||||
Builder builder = new Builder();
|
||||
Document document = null;
|
||||
if (streamSource.getInputStream() != null) {
|
||||
document = builder.build(streamSource.getInputStream());
|
||||
}
|
||||
else if (streamSource.getReader() != null) {
|
||||
document = builder.build(streamSource.getReader());
|
||||
}
|
||||
else {
|
||||
throw new IllegalArgumentException("StreamSource contains neither byte stream nor character stream");
|
||||
}
|
||||
return document.getRootElement();
|
||||
}
|
||||
|
||||
private Element handleSaxSource(Source request) throws ParsingException, IOException {
|
||||
SAXSource saxSource = (SAXSource) request;
|
||||
Builder builder = new Builder(saxSource.getXMLReader());
|
||||
InputSource inputSource = saxSource.getInputSource();
|
||||
Document document = null;
|
||||
private Element handleSaxSource(SAXSource request) throws ParsingException, IOException {
|
||||
Builder builder = new Builder(request.getXMLReader());
|
||||
InputSource inputSource = request.getInputSource();
|
||||
Document document;
|
||||
if (inputSource.getByteStream() != null) {
|
||||
document = builder.build(inputSource.getByteStream());
|
||||
}
|
||||
@@ -224,17 +114,19 @@ public abstract class AbstractXomPayloadEndpoint extends TransformerObjectSuppor
|
||||
return document.getRootElement();
|
||||
}
|
||||
|
||||
private Element handleDomSource(Source request) {
|
||||
Node w3cNode = ((DOMSource) request).getNode();
|
||||
org.w3c.dom.Element w3cElement = null;
|
||||
if (w3cNode.getNodeType() == Node.ELEMENT_NODE) {
|
||||
w3cElement = (org.w3c.dom.Element) w3cNode;
|
||||
private Element handleStreamSource(StreamSource request) throws ParsingException, IOException {
|
||||
Builder builder = new Builder();
|
||||
Document document;
|
||||
if (request.getInputStream() != null) {
|
||||
document = builder.build(request.getInputStream());
|
||||
}
|
||||
else if (w3cNode.getNodeType() == Node.DOCUMENT_NODE) {
|
||||
org.w3c.dom.Document w3cDocument = (org.w3c.dom.Document) w3cNode;
|
||||
w3cElement = w3cDocument.getDocumentElement();
|
||||
else if (request.getReader() != null) {
|
||||
document = builder.build(request.getReader());
|
||||
}
|
||||
return DOMConverter.convert(w3cElement);
|
||||
else {
|
||||
throw new IllegalArgumentException("StreamSource contains neither byte stream nor character stream");
|
||||
}
|
||||
return document.getRootElement();
|
||||
}
|
||||
|
||||
private void createDocumentBuilderFactory() {
|
||||
|
||||
@@ -16,11 +16,26 @@
|
||||
|
||||
package org.springframework.ws.soap.axiom;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
import org.apache.axiom.om.OMAttribute;
|
||||
import org.apache.axiom.om.OMContainer;
|
||||
import org.apache.axiom.om.OMElement;
|
||||
import org.apache.axiom.om.impl.builder.SAXOMBuilder;
|
||||
import org.springframework.util.Assert;
|
||||
import org.apache.axiom.om.OMFactory;
|
||||
import org.apache.axiom.om.OMNamespace;
|
||||
import org.xml.sax.Attributes;
|
||||
import org.xml.sax.ContentHandler;
|
||||
import org.xml.sax.Locator;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.xml.namespace.QNameUtils;
|
||||
|
||||
/**
|
||||
* Specific SAX ContentHandler that adds the resulting AXIOM OMElement to a specified parent element when
|
||||
* <code>endDocument</code> is called. Used for returing <code>SAXResult</code>s from Axiom elements.
|
||||
@@ -28,17 +43,101 @@ import org.xml.sax.SAXException;
|
||||
* @author Arjen Poutsma
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class AxiomContentHandler extends SAXOMBuilder {
|
||||
class AxiomContentHandler implements ContentHandler {
|
||||
|
||||
private OMElement parentElement = null;
|
||||
private final OMFactory factory;
|
||||
|
||||
public AxiomContentHandler(OMElement parentElement) {
|
||||
Assert.notNull(parentElement, "No parentElement given");
|
||||
this.parentElement = parentElement;
|
||||
private final List elements = new ArrayList();
|
||||
|
||||
private Map namespaces = new HashMap();
|
||||
|
||||
private final OMContainer container;
|
||||
|
||||
AxiomContentHandler(OMContainer container, OMFactory factory) {
|
||||
Assert.notNull(container, "'container' must not be null");
|
||||
Assert.notNull(factory, "'factory' must not be null");
|
||||
this.factory = factory;
|
||||
this.container = container;
|
||||
}
|
||||
|
||||
private OMContainer getParent() {
|
||||
if (!elements.isEmpty()) {
|
||||
return (OMContainer) elements.get(elements.size() - 1);
|
||||
}
|
||||
else {
|
||||
return container;
|
||||
}
|
||||
}
|
||||
|
||||
public void startPrefixMapping(String prefix, String uri) throws SAXException {
|
||||
namespaces.put(prefix, uri);
|
||||
}
|
||||
|
||||
public void endPrefixMapping(String prefix) throws SAXException {
|
||||
namespaces.remove(prefix);
|
||||
}
|
||||
|
||||
public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {
|
||||
OMContainer parent = getParent();
|
||||
OMElement element = factory.createOMElement(localName, null, parent);
|
||||
for (Iterator iterator = namespaces.entrySet().iterator(); iterator.hasNext();) {
|
||||
Map.Entry entry = (Map.Entry) iterator.next();
|
||||
String prefix = (String) entry.getKey();
|
||||
if (prefix.length() == 0) {
|
||||
element.declareDefaultNamespace((String) entry.getValue());
|
||||
}
|
||||
else {
|
||||
element.declareNamespace((String) entry.getValue(), prefix);
|
||||
}
|
||||
}
|
||||
QName qname = QNameUtils.toQName(uri, qName);
|
||||
element.setLocalName(qname.getLocalPart());
|
||||
element.setNamespace(element.findNamespace(qname.getNamespaceURI(), qname.getPrefix()));
|
||||
for (int i = 0; i < atts.getLength(); i++) {
|
||||
QName attrName = QNameUtils.toQName(atts.getURI(i), atts.getQName(i));
|
||||
String value = atts.getValue(i);
|
||||
if (!atts.getQName(i).startsWith("xmlns")) {
|
||||
OMNamespace namespace = factory.createOMNamespace(attrName.getNamespaceURI(), attrName.getPrefix());
|
||||
OMAttribute attribute = factory.createOMAttribute(attrName.getLocalPart(), namespace, value);
|
||||
element.addAttribute(attribute);
|
||||
}
|
||||
}
|
||||
|
||||
elements.add(element);
|
||||
}
|
||||
|
||||
public void endElement(String uri, String localName, String qName) throws SAXException {
|
||||
elements.remove(elements.size() - 1);
|
||||
}
|
||||
|
||||
public void characters(char ch[], int start, int length) throws SAXException {
|
||||
String data = new String(ch, start, length);
|
||||
OMContainer parent = getParent();
|
||||
factory.createOMText(parent, data);
|
||||
}
|
||||
|
||||
public void processingInstruction(String target, String data) throws SAXException {
|
||||
OMContainer parent = getParent();
|
||||
factory.createOMProcessingInstruction(parent, target, data);
|
||||
}
|
||||
|
||||
/*
|
||||
* Unsupported
|
||||
*/
|
||||
|
||||
public void setDocumentLocator(Locator locator) {
|
||||
}
|
||||
|
||||
public void startDocument() throws SAXException {
|
||||
}
|
||||
|
||||
public void endDocument() throws SAXException {
|
||||
super.endDocument();
|
||||
parentElement.addChild(super.getRootElement());
|
||||
}
|
||||
|
||||
public void ignorableWhitespace(char ch[], int start, int length) throws SAXException {
|
||||
}
|
||||
|
||||
public void skippedEntity(String name) throws SAXException {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
package org.springframework.ws.soap.axiom;
|
||||
|
||||
import java.util.Iterator;
|
||||
import javax.xml.stream.XMLStreamReader;
|
||||
import javax.xml.transform.Result;
|
||||
import javax.xml.transform.Source;
|
||||
import javax.xml.transform.sax.SAXResult;
|
||||
@@ -26,6 +27,7 @@ import org.apache.axiom.om.OMException;
|
||||
import org.apache.axiom.soap.SOAPBody;
|
||||
import org.apache.axiom.soap.SOAPFactory;
|
||||
import org.apache.axiom.soap.SOAPFault;
|
||||
|
||||
import org.springframework.ws.soap.SoapBody;
|
||||
import org.springframework.ws.soap.SoapFault;
|
||||
import org.springframework.xml.transform.StaxSource;
|
||||
@@ -48,15 +50,17 @@ abstract class AxiomSoapBody extends AxiomSoapElement implements SoapBody {
|
||||
public Source getPayloadSource() {
|
||||
try {
|
||||
OMElement payloadElement = getPayloadElement();
|
||||
XMLStreamReader streamReader;
|
||||
if (payloadElement == null) {
|
||||
return null;
|
||||
}
|
||||
else if (payloadCaching) {
|
||||
return new StaxSource(payloadElement.getXMLStreamReader());
|
||||
streamReader = payloadElement.getXMLStreamReader();
|
||||
}
|
||||
else {
|
||||
return new StaxSource(payloadElement.getXMLStreamReaderWithoutCaching());
|
||||
streamReader = payloadElement.getXMLStreamReaderWithoutCaching();
|
||||
}
|
||||
return new StaxSource(streamReader);
|
||||
}
|
||||
catch (OMException ex) {
|
||||
throw new AxiomSoapBodyException(ex);
|
||||
@@ -64,7 +68,7 @@ abstract class AxiomSoapBody extends AxiomSoapElement implements SoapBody {
|
||||
}
|
||||
|
||||
public Result getPayloadResult() {
|
||||
return new SAXResult(new AxiomContentHandler(getAxiomBody()));
|
||||
return new SAXResult(new AxiomContentHandler(getAxiomBody(), getAxiomFactory()));
|
||||
}
|
||||
|
||||
public boolean hasFault() {
|
||||
|
||||
@@ -27,6 +27,7 @@ import org.apache.axiom.om.OMElement;
|
||||
import org.apache.axiom.om.OMException;
|
||||
import org.apache.axiom.om.OMNamespace;
|
||||
import org.apache.axiom.soap.SOAPFactory;
|
||||
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.ws.soap.SoapElement;
|
||||
import org.springframework.xml.transform.StaxSource;
|
||||
@@ -62,7 +63,6 @@ class AxiomSoapElement implements SoapElement {
|
||||
public final Source getSource() {
|
||||
try {
|
||||
return new StaxSource(axiomElement.getXMLStreamReader());
|
||||
|
||||
}
|
||||
catch (OMException ex) {
|
||||
throw new AxiomSoapElementException(ex);
|
||||
|
||||
@@ -25,6 +25,7 @@ import org.apache.axiom.om.OMElement;
|
||||
import org.apache.axiom.om.OMException;
|
||||
import org.apache.axiom.soap.SOAPFactory;
|
||||
import org.apache.axiom.soap.SOAPFaultDetail;
|
||||
|
||||
import org.springframework.ws.soap.SoapFaultDetail;
|
||||
import org.springframework.ws.soap.SoapFaultDetailElement;
|
||||
|
||||
@@ -56,7 +57,7 @@ class AxiomSoapFaultDetail extends AxiomSoapElement implements SoapFaultDetail {
|
||||
}
|
||||
|
||||
public Result getResult() {
|
||||
return new SAXResult(new AxiomContentHandler(getAxiomFaultDetail()));
|
||||
return new SAXResult(new AxiomContentHandler(getAxiomFaultDetail(), getAxiomFactory()));
|
||||
}
|
||||
|
||||
protected SOAPFaultDetail getAxiomFaultDetail() {
|
||||
|
||||
@@ -22,6 +22,7 @@ import javax.xml.transform.sax.SAXResult;
|
||||
import org.apache.axiom.om.OMElement;
|
||||
import org.apache.axiom.om.OMException;
|
||||
import org.apache.axiom.soap.SOAPFactory;
|
||||
|
||||
import org.springframework.ws.soap.SoapFaultDetailElement;
|
||||
|
||||
/**
|
||||
@@ -38,7 +39,7 @@ class AxiomSoapFaultDetailElement extends AxiomSoapElement implements SoapFaultD
|
||||
|
||||
public Result getResult() {
|
||||
try {
|
||||
return new SAXResult(new AxiomContentHandler(getAxiomElement()));
|
||||
return new SAXResult(new AxiomContentHandler(getAxiomElement(), getAxiomFactory()));
|
||||
}
|
||||
catch (OMException ex) {
|
||||
throw new AxiomSoapFaultException(ex);
|
||||
|
||||
@@ -26,6 +26,7 @@ import org.apache.axiom.om.OMNamespace;
|
||||
import org.apache.axiom.soap.SOAPFactory;
|
||||
import org.apache.axiom.soap.SOAPHeader;
|
||||
import org.apache.axiom.soap.SOAPHeaderBlock;
|
||||
|
||||
import org.springframework.ws.soap.SoapHeader;
|
||||
import org.springframework.ws.soap.SoapHeaderElement;
|
||||
import org.springframework.ws.soap.SoapHeaderException;
|
||||
@@ -44,7 +45,7 @@ abstract class AxiomSoapHeader extends AxiomSoapElement implements SoapHeader {
|
||||
}
|
||||
|
||||
public Result getResult() {
|
||||
return new SAXResult(new AxiomContentHandler(getAxiomHeader()));
|
||||
return new SAXResult(new AxiomContentHandler(getAxiomHeader(), getAxiomFactory()));
|
||||
}
|
||||
|
||||
public SoapHeaderElement addHeaderElement(QName name) {
|
||||
|
||||
@@ -22,6 +22,7 @@ import javax.xml.transform.sax.SAXResult;
|
||||
import org.apache.axiom.om.OMException;
|
||||
import org.apache.axiom.soap.SOAPFactory;
|
||||
import org.apache.axiom.soap.SOAPHeaderBlock;
|
||||
|
||||
import org.springframework.ws.soap.SoapHeaderElement;
|
||||
|
||||
/** Axiom-specific version of <code>org.springframework.ws.soap.SoapHeaderHeaderElement</code>. */
|
||||
@@ -49,7 +50,7 @@ class AxiomSoapHeaderElement extends AxiomSoapElement implements SoapHeaderEleme
|
||||
|
||||
public Result getResult() {
|
||||
try {
|
||||
return new SAXResult(new AxiomContentHandler(getAxiomHeaderBlock()));
|
||||
return new SAXResult(new AxiomContentHandler(getAxiomHeaderBlock(), getAxiomFactory()));
|
||||
}
|
||||
catch (OMException ex) {
|
||||
throw new AxiomSoapHeaderException(ex);
|
||||
|
||||
@@ -40,6 +40,12 @@ import javax.xml.transform.stream.StreamSource;
|
||||
|
||||
import org.custommonkey.xmlunit.XMLTestCase;
|
||||
import org.custommonkey.xmlunit.XMLUnit;
|
||||
import org.w3c.dom.Document;
|
||||
import org.xml.sax.InputSource;
|
||||
import org.xml.sax.XMLReader;
|
||||
import org.xml.sax.helpers.DefaultHandler;
|
||||
import org.xml.sax.helpers.XMLReaderFactory;
|
||||
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.util.FileCopyUtils;
|
||||
@@ -47,11 +53,6 @@ import org.springframework.xml.sax.SaxUtils;
|
||||
import org.springframework.xml.transform.StaxResult;
|
||||
import org.springframework.xml.transform.StaxSource;
|
||||
import org.springframework.xml.transform.StringResult;
|
||||
import org.w3c.dom.Document;
|
||||
import org.xml.sax.InputSource;
|
||||
import org.xml.sax.XMLReader;
|
||||
import org.xml.sax.helpers.DefaultHandler;
|
||||
import org.xml.sax.helpers.XMLReaderFactory;
|
||||
|
||||
public abstract class AbstractWebServiceMessageTestCase extends XMLTestCase {
|
||||
|
||||
|
||||
@@ -31,12 +31,13 @@ import javax.xml.transform.sax.SAXSource;
|
||||
import javax.xml.transform.stream.StreamSource;
|
||||
|
||||
import org.custommonkey.xmlunit.XMLTestCase;
|
||||
import org.springframework.xml.transform.StaxSource;
|
||||
import org.w3c.dom.Document;
|
||||
import org.xml.sax.InputSource;
|
||||
import org.xml.sax.XMLReader;
|
||||
import org.xml.sax.helpers.XMLReaderFactory;
|
||||
|
||||
import org.springframework.xml.transform.StaxSource;
|
||||
|
||||
public abstract class AbstractEndpointTestCase extends XMLTestCase {
|
||||
|
||||
protected static final String NAMESPACE_URI = "http://springframework.org/ws";
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
/*
|
||||
* Copyright 2006 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.ws.server.endpoint;
|
||||
|
||||
import nu.xom.Element;
|
||||
|
||||
public class ReflectiveXomPayloadEndpointTest extends AbstractPayloadEndpointTestCase {
|
||||
|
||||
protected PayloadEndpoint createNoResponseEndpoint() throws Exception {
|
||||
return new AbstractXomPayloadEndpoint(true) {
|
||||
|
||||
protected Element invokeInternal(Element requestElement) throws Exception {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
protected PayloadEndpoint createResponseEndpoint() throws Exception {
|
||||
return new AbstractXomPayloadEndpoint(true) {
|
||||
|
||||
protected Element invokeInternal(Element requestElement) throws Exception {
|
||||
assertNotNull("No requestElement passed", requestElement);
|
||||
assertEquals("Invalid request element", REQUEST_ELEMENT, requestElement.getLocalName());
|
||||
assertEquals("Invalid request element", NAMESPACE_URI, requestElement.getNamespaceURI());
|
||||
return new Element(RESPONSE_ELEMENT, NAMESPACE_URI);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
protected PayloadEndpoint createNoRequestEndpoint() throws Exception {
|
||||
return new AbstractXomPayloadEndpoint(true) {
|
||||
|
||||
protected Element invokeInternal(Element requestElement) throws Exception {
|
||||
assertNull("RequestElement passed", requestElement);
|
||||
return null;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -18,10 +18,10 @@ package org.springframework.ws.server.endpoint;
|
||||
|
||||
import nu.xom.Element;
|
||||
|
||||
public class NonReflectiveXomPayloadEndpointTest extends AbstractPayloadEndpointTestCase {
|
||||
public class XomPayloadEndpointTest extends AbstractPayloadEndpointTestCase {
|
||||
|
||||
protected PayloadEndpoint createNoResponseEndpoint() throws Exception {
|
||||
return new AbstractXomPayloadEndpoint(false) {
|
||||
return new AbstractXomPayloadEndpoint() {
|
||||
|
||||
protected Element invokeInternal(Element requestElement) throws Exception {
|
||||
return null;
|
||||
@@ -30,7 +30,7 @@ public class NonReflectiveXomPayloadEndpointTest extends AbstractPayloadEndpoint
|
||||
}
|
||||
|
||||
protected PayloadEndpoint createResponseEndpoint() throws Exception {
|
||||
return new AbstractXomPayloadEndpoint(false) {
|
||||
return new AbstractXomPayloadEndpoint() {
|
||||
|
||||
protected Element invokeInternal(Element requestElement) throws Exception {
|
||||
assertNotNull("No requestElement passed", requestElement);
|
||||
@@ -42,7 +42,7 @@ public class NonReflectiveXomPayloadEndpointTest extends AbstractPayloadEndpoint
|
||||
}
|
||||
|
||||
protected PayloadEndpoint createNoRequestEndpoint() throws Exception {
|
||||
return new AbstractXomPayloadEndpoint(false) {
|
||||
return new AbstractXomPayloadEndpoint() {
|
||||
|
||||
protected Element invokeInternal(Element requestElement) throws Exception {
|
||||
assertNull("RequestElement passed", requestElement);
|
||||
@@ -55,7 +55,15 @@ public class NonReflectiveXomPayloadEndpointTest extends AbstractPayloadEndpoint
|
||||
// overriden, because XOM doesn not support it
|
||||
}
|
||||
|
||||
public void testStaxSourceEventReaderJaxp14() throws Exception {
|
||||
// overriden, because XOM doesn not support it
|
||||
}
|
||||
|
||||
public void testStaxSourceStreamReader() throws Exception {
|
||||
// overriden, because XOM doesn not support it
|
||||
}
|
||||
|
||||
public void testStaxSourceStreamReaderJaxp14() throws Exception {
|
||||
// overriden, because XOM doesn not support it
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
* Copyright 2006 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.ws.soap.axiom;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.StringReader;
|
||||
|
||||
import org.apache.axiom.om.OMAbstractFactory;
|
||||
import org.apache.axiom.om.OMDocument;
|
||||
import org.apache.axiom.om.OMElement;
|
||||
import org.apache.axiom.om.OMFactory;
|
||||
import org.apache.axiom.om.OMNamespace;
|
||||
import org.custommonkey.xmlunit.XMLTestCase;
|
||||
import org.xml.sax.InputSource;
|
||||
import org.xml.sax.XMLReader;
|
||||
import org.xml.sax.helpers.XMLReaderFactory;
|
||||
|
||||
public class AxiomContentHandlerTest extends XMLTestCase {
|
||||
|
||||
private static final String XML_1 = "<?xml version='1.0' encoding='UTF-8'?>" + "<?pi content?>" +
|
||||
"<root xmlns='namespace'>" +
|
||||
"<prefix:child xmlns:prefix='namespace2' xmlns:prefix2='namespace3' prefix2:attr='value'>content</prefix:child>" +
|
||||
"</root>";
|
||||
|
||||
private static final String XML_2_EXPECTED = "<?xml version='1.0' encoding='UTF-8'?>" + "<root xmlns='namespace'>" +
|
||||
"<child xmlns='namespace2' />" + "</root>";
|
||||
|
||||
private static final String XML_2_SNIPPET =
|
||||
"<?xml version='1.0' encoding='UTF-8'?>" + "<child xmlns='namespace2' />";
|
||||
|
||||
private AxiomContentHandler handler;
|
||||
|
||||
private OMDocument result;
|
||||
|
||||
private XMLReader xmlReader;
|
||||
|
||||
private OMFactory factory;
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
factory = OMAbstractFactory.getOMFactory();
|
||||
result = factory.createOMDocument();
|
||||
xmlReader = XMLReaderFactory.createXMLReader();
|
||||
}
|
||||
|
||||
public void testContentHandlerDocumentNamespacePrefixes() throws Exception {
|
||||
xmlReader.setFeature("http://xml.org/sax/features/namespace-prefixes", true);
|
||||
handler = new AxiomContentHandler(result, factory);
|
||||
xmlReader.setContentHandler(handler);
|
||||
xmlReader.parse(new InputSource(new StringReader(XML_1)));
|
||||
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||
result.serialize(bos);
|
||||
assertXMLEqual("Invalid result", XML_1, bos.toString("UTF-8"));
|
||||
}
|
||||
|
||||
public void testContentHandlerDocumentNoNamespacePrefixes() throws Exception {
|
||||
xmlReader.setFeature("http://xml.org/sax/features/namespace-prefixes", false);
|
||||
handler = new AxiomContentHandler(result, factory);
|
||||
xmlReader.setContentHandler(handler);
|
||||
xmlReader.parse(new InputSource(new StringReader(XML_1)));
|
||||
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||
result.serialize(bos);
|
||||
assertXMLEqual("Invalid result", XML_1, bos.toString("UTF-8"));
|
||||
}
|
||||
|
||||
public void testContentHandlerElement() throws Exception {
|
||||
OMNamespace namespace = factory.createOMNamespace("namespace", "");
|
||||
OMElement rootElement = factory.createOMElement("root", namespace, result);
|
||||
handler = new AxiomContentHandler(rootElement, factory);
|
||||
xmlReader.setContentHandler(handler);
|
||||
xmlReader.parse(new InputSource(new StringReader(XML_2_SNIPPET)));
|
||||
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||
result.serialize(bos);
|
||||
assertXMLEqual("Invalid result", XML_2_EXPECTED, bos.toString("UTF-8"));
|
||||
}
|
||||
}
|
||||
@@ -73,6 +73,7 @@ public class XsdBasedSoap11Wsdl4jDefinitionBuilderTest extends XMLTestCase {
|
||||
|
||||
Document result = (Document) domResult.getNode();
|
||||
Document expected = documentBuilder.parse(getClass().getResourceAsStream("single-inline.wsdl"));
|
||||
|
||||
assertXMLEqual("Invalid WSDL built", expected, result);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<root xmlns="http://www.springframework.org/spring-ws" attribute="value">
|
||||
<child xmlns="http://www.springframework.org/spring-ws/child"/>
|
||||
<root xmlns="http://www.springframework.org/spring-ws" xmlns:attr="http://www.springframework.org/spring-ws/attr"
|
||||
attr:attribute="value">
|
||||
<prefix:child xmlns:prefix="http://www.springframework.org/spring-ws/child"/>
|
||||
</root>
|
||||
@@ -130,33 +130,28 @@
|
||||
|
||||
</schema>
|
||||
</wsdl:types>
|
||||
<wsdl:message name="GetFlightsRequest">
|
||||
<wsdl:part element="schema:GetFlightsRequest" name="GetFlightsRequest"/>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="BookFlightRequest">
|
||||
<wsdl:part element="schema:BookFlightRequest" name="BookFlightRequest"/>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="GetFlightsResponse">
|
||||
<wsdl:part element="schema:GetFlightsResponse" name="GetFlightsResponse"/>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="GetFlightsFault">
|
||||
<wsdl:part element="schema:GetFlightsFault" name="GetFlightsFault"/>
|
||||
<wsdl:message name="BookFlightResponse">
|
||||
<wsdl:part element="schema:BookFlightResponse" name="BookFlightResponse"/>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="GetFrequentFlyerMileageRequest">
|
||||
<wsdl:part element="schema:GetFrequentFlyerMileageRequest" name="GetFrequentFlyerMileageRequest"/>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="GetFlightsFault">
|
||||
<wsdl:part element="schema:GetFlightsFault" name="GetFlightsFault"/>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="GetFlightsRequest">
|
||||
<wsdl:part element="schema:GetFlightsRequest" name="GetFlightsRequest"/>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="GetFrequentFlyerMileageResponse">
|
||||
<wsdl:part element="schema:GetFrequentFlyerMileageResponse" name="GetFrequentFlyerMileageResponse"/>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="BookFlightResponse">
|
||||
<wsdl:part element="schema:BookFlightResponse" name="BookFlightResponse"/>
|
||||
</wsdl:message>
|
||||
<wsdl:portType name="Airline">
|
||||
<wsdl:operation name="GetFlights">
|
||||
<wsdl:input message="tns:GetFlightsRequest" name="GetFlightsRequest"/>
|
||||
<wsdl:output message="tns:GetFlightsResponse" name="GetFlightsResponse"/>
|
||||
<wsdl:fault message="tns:GetFlightsFault" name="GetFlightsFault"/>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="BookFlight">
|
||||
<wsdl:input message="tns:BookFlightRequest" name="BookFlightRequest"/>
|
||||
<wsdl:output message="tns:BookFlightResponse" name="BookFlightResponse"/>
|
||||
@@ -165,21 +160,14 @@
|
||||
<wsdl:input message="tns:GetFrequentFlyerMileageRequest" name="GetFrequentFlyerMileageRequest"/>
|
||||
<wsdl:output message="tns:GetFrequentFlyerMileageResponse" name="GetFrequentFlyerMileageResponse"/>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="GetFlights">
|
||||
<wsdl:input message="tns:GetFlightsRequest" name="GetFlightsRequest"/>
|
||||
<wsdl:output message="tns:GetFlightsResponse" name="GetFlightsResponse"/>
|
||||
<wsdl:fault message="tns:GetFlightsFault" name="GetFlightsFault"/>
|
||||
</wsdl:operation>
|
||||
</wsdl:portType>
|
||||
<wsdl:binding name="AirlineBinding" type="tns:Airline">
|
||||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<wsdl:operation name="GetFlights">
|
||||
<soap:operation soapAction=""/>
|
||||
<wsdl:input name="GetFlightsRequest">
|
||||
<soap:body use="literal"/>
|
||||
</wsdl:input>
|
||||
<wsdl:output name="GetFlightsResponse">
|
||||
<soap:body use="literal"/>
|
||||
</wsdl:output>
|
||||
<wsdl:fault name="GetFlightsFault">
|
||||
<soap:fault name="GetFlightsFault" use="literal"/>
|
||||
</wsdl:fault>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="BookFlight">
|
||||
<soap:operation soapAction=""/>
|
||||
<wsdl:input name="BookFlightRequest">
|
||||
@@ -198,6 +186,18 @@
|
||||
<soap:body use="literal"/>
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="GetFlights">
|
||||
<soap:operation soapAction=""/>
|
||||
<wsdl:input name="GetFlightsRequest">
|
||||
<soap:body use="literal"/>
|
||||
</wsdl:input>
|
||||
<wsdl:output name="GetFlightsResponse">
|
||||
<soap:body use="literal"/>
|
||||
</wsdl:output>
|
||||
<wsdl:fault name="GetFlightsFault">
|
||||
<soap:fault name="GetFlightsFault" use="literal"/>
|
||||
</wsdl:fault>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
<wsdl:service name="AirlineService">
|
||||
<wsdl:port binding="tns:AirlineBinding" name="AirlinePort">
|
||||
|
||||
@@ -130,33 +130,28 @@
|
||||
|
||||
</schema>
|
||||
</wsdl:types>
|
||||
<wsdl:message name="GetFlightsRequest">
|
||||
<wsdl:part element="schema:GetFlightsRequest" name="GetFlightsRequest"/>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="BookFlightRequest">
|
||||
<wsdl:part element="schema:BookFlightRequest" name="BookFlightRequest"/>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="GetFlightsResponse">
|
||||
<wsdl:part element="schema:GetFlightsResponse" name="GetFlightsResponse"/>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="GetFlightsFault">
|
||||
<wsdl:part element="schema:GetFlightsFault" name="GetFlightsFault"/>
|
||||
<wsdl:message name="BookFlightResponse">
|
||||
<wsdl:part element="schema:BookFlightResponse" name="BookFlightResponse"/>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="GetFrequentFlyerMileageRequest">
|
||||
<wsdl:part element="schema:GetFrequentFlyerMileageRequest" name="GetFrequentFlyerMileageRequest"/>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="GetFlightsFault">
|
||||
<wsdl:part element="schema:GetFlightsFault" name="GetFlightsFault"/>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="GetFlightsRequest">
|
||||
<wsdl:part element="schema:GetFlightsRequest" name="GetFlightsRequest"/>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="GetFrequentFlyerMileageResponse">
|
||||
<wsdl:part element="schema:GetFrequentFlyerMileageResponse" name="GetFrequentFlyerMileageResponse"/>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="BookFlightResponse">
|
||||
<wsdl:part element="schema:BookFlightResponse" name="BookFlightResponse"/>
|
||||
</wsdl:message>
|
||||
<wsdl:portType name="Airline">
|
||||
<wsdl:operation name="GetFlights">
|
||||
<wsdl:input message="tns:GetFlightsRequest" name="GetFlightsRequest"/>
|
||||
<wsdl:output message="tns:GetFlightsResponse" name="GetFlightsResponse"/>
|
||||
<wsdl:fault message="tns:GetFlightsFault" name="GetFlightsFault"/>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="BookFlight">
|
||||
<wsdl:input message="tns:BookFlightRequest" name="BookFlightRequest"/>
|
||||
<wsdl:output message="tns:BookFlightResponse" name="BookFlightResponse"/>
|
||||
@@ -165,21 +160,14 @@
|
||||
<wsdl:input message="tns:GetFrequentFlyerMileageRequest" name="GetFrequentFlyerMileageRequest"/>
|
||||
<wsdl:output message="tns:GetFrequentFlyerMileageResponse" name="GetFrequentFlyerMileageResponse"/>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="GetFlights">
|
||||
<wsdl:input message="tns:GetFlightsRequest" name="GetFlightsRequest"/>
|
||||
<wsdl:output message="tns:GetFlightsResponse" name="GetFlightsResponse"/>
|
||||
<wsdl:fault message="tns:GetFlightsFault" name="GetFlightsFault"/>
|
||||
</wsdl:operation>
|
||||
</wsdl:portType>
|
||||
<wsdl:binding name="AirlineBinding" type="tns:Airline">
|
||||
<soap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<wsdl:operation name="GetFlights">
|
||||
<soap12:operation soapAction=""/>
|
||||
<wsdl:input name="GetFlightsRequest">
|
||||
<soap12:body use="literal"/>
|
||||
</wsdl:input>
|
||||
<wsdl:output name="GetFlightsResponse">
|
||||
<soap12:body use="literal"/>
|
||||
</wsdl:output>
|
||||
<wsdl:fault name="GetFlightsFault">
|
||||
<soap12:fault name="GetFlightsFault" use="literal"/>
|
||||
</wsdl:fault>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="BookFlight">
|
||||
<soap12:operation soapAction=""/>
|
||||
<wsdl:input name="BookFlightRequest">
|
||||
@@ -198,6 +186,18 @@
|
||||
<soap12:body use="literal"/>
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="GetFlights">
|
||||
<soap12:operation soapAction=""/>
|
||||
<wsdl:input name="GetFlightsRequest">
|
||||
<soap12:body use="literal"/>
|
||||
</wsdl:input>
|
||||
<wsdl:output name="GetFlightsResponse">
|
||||
<soap12:body use="literal"/>
|
||||
</wsdl:output>
|
||||
<wsdl:fault name="GetFlightsFault">
|
||||
<soap12:fault name="GetFlightsFault" use="literal"/>
|
||||
</wsdl:fault>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
<wsdl:service name="AirlineService">
|
||||
<wsdl:port binding="tns:AirlineBinding" name="AirlinePort">
|
||||
|
||||
@@ -25,12 +25,12 @@
|
||||
|
||||
</xsd:schema>
|
||||
</wsdl:types>
|
||||
<wsdl:message name="GetOrderResponse">
|
||||
<wsdl:part name="GetOrderResponse" element="schema0:GetOrderResponse"/>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="GetOrderRequest">
|
||||
<wsdl:part name="GetOrderRequest" element="schema:GetOrderRequest"/>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="GetOrderResponse">
|
||||
<wsdl:part name="GetOrderResponse" element="schema0:GetOrderResponse"/>
|
||||
</wsdl:message>
|
||||
<wsdl:portType name="Order">
|
||||
<wsdl:operation name="GetOrder">
|
||||
<wsdl:input message="tns:GetOrderRequest" name="GetOrderRequest"/>
|
||||
|
||||
@@ -10,15 +10,15 @@
|
||||
<xsd:import namespace="http://www.springframework.org/spring-ws/single/schema" schemaLocation="single.xsd"/>
|
||||
</xsd:schema>
|
||||
</wsdl:types>
|
||||
<wsdl:message name="GetOrderResponse">
|
||||
<wsdl:part name="GetOrderResponse" element="schema:GetOrderResponse"/>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="GetOrderRequest">
|
||||
<wsdl:part name="GetOrderRequest" element="schema:GetOrderRequest"/>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="GetOrderFault">
|
||||
<wsdl:part name="GetOrderFault" element="schema:GetOrderFault"/>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="GetOrderResponse">
|
||||
<wsdl:part name="GetOrderResponse" element="schema:GetOrderResponse"/>
|
||||
</wsdl:message>
|
||||
<wsdl:portType name="Order">
|
||||
<wsdl:operation name="GetOrder">
|
||||
<wsdl:input message="tns:GetOrderRequest" name="GetOrderRequest"/>
|
||||
|
||||
@@ -36,15 +36,15 @@
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
</wsdl:types>
|
||||
<wsdl:message name="GetOrderResponse">
|
||||
<wsdl:part name="GetOrderResponse" element="schema:GetOrderResponse"/>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="GetOrderRequest">
|
||||
<wsdl:part name="GetOrderRequest" element="schema:GetOrderRequest"/>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="GetOrderFault">
|
||||
<wsdl:part name="GetOrderFault" element="schema:GetOrderFault"/>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="GetOrderResponse">
|
||||
<wsdl:part name="GetOrderResponse" element="schema:GetOrderResponse"/>
|
||||
</wsdl:message>
|
||||
<wsdl:portType name="Order">
|
||||
<wsdl:operation name="GetOrder">
|
||||
<wsdl:input message="tns:GetOrderRequest" name="GetOrderRequest"/>
|
||||
|
||||
Reference in New Issue
Block a user