Author: heiko.braun(a)jboss.com
Date: 2007-01-11 09:51:07 -0500 (Thu, 11 Jan 2007)
New Revision: 1925
Added:
trunk/jbossws-tests/src/main/resources/common/wsdl11/SwaTestService.wsdl
trunk/jbossws-tests/src/main/resources/common/wsdl11/WS-ISwA.xsd
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/common/wsdl11/WSDL11TestCase.java
Log:
Fix SWA processing
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java 2007-01-11
14:44:14 UTC (rev 1924)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java 2007-01-11
14:51:07 UTC (rev 1925)
@@ -102,6 +102,7 @@
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
+import com.ibm.wsdl.PortTypeImpl;
/**
* A helper that translates a WSDL-1.1 object graph into a WSDL-2.0 object graph.
@@ -141,6 +142,10 @@
// Temporary files used by this reader.
private List<File> tempFiles = new ArrayList<File>();
+ // SWA handling
+ private static final QName SWA_PORT_TYPE = new
QName("jboss.ws.wsdl.porttype.swa");
+ private Map<QName, List<String>> skippedSWAParts = new HashMap<QName,
List<String>>();
+
/**
* Takes a WSDL11 Definition element and converts into
* our object graph that has been developed for WSDL20
@@ -521,7 +526,7 @@
Message srcMessage = srcInput.getMessage();
if (srcMessage == null)
throw new WSDLException(WSDLException.INVALID_WSDL, "Cannot find input
message on operation " + srcOperation.getName() + " on port type: "
- + srcPortType.getQName());
+ + srcPortType.getQName());
log.trace("processOperationInput: " + srcMessage.getQName());
@@ -542,12 +547,15 @@
WSDLInterfaceOperationInput rpcInput = new
WSDLInterfaceOperationInput(destOperation);
for (Part srcPart : (List<Part>)srcMessage.getOrderedParts(paramOrder))
{
+ // Skip SWA attachment parts
+ if( ignorePart(srcPortType, srcPart) ) continue;
+
if (Constants.URI_STYLE_DOCUMENT == destOperation.getStyle())
{
WSDLInterfaceOperationInput destInput = new
WSDLInterfaceOperationInput(destOperation);
QName elementName = messagePartToElementName(srcMessage, srcPart,
destOperation);
destInput.setElement(elementName);
-
+
//Lets remember the Message name
destInput.setMessageName(srcMessage.getQName());
destOperation.addProperty(new
WSDLProperty(Constants.WSDL_PROPERTY_MESSAGE_NAME_IN,
srcMessage.getQName().getLocalPart()));
@@ -578,6 +586,22 @@
}
}
+ private boolean ignorePart(PortType srcPortType, Part srcPart) {
+
+ boolean canBeSkipped = false;
+ QName parentName = srcPortType.getQName();
+ if(skippedSWAParts.containsKey(parentName))
+ {
+ if(skippedSWAParts.get(parentName).contains(srcPart.getName()))
+ {
+ log.trace("Skip attachment part: " +
parentName+"->"+srcPart.getName());
+ canBeSkipped = true;
+ }
+ }
+
+ return canBeSkipped;
+ }
+
private void processOperationOutput(Definition srcWsdl, Operation srcOperation,
WSDLInterfaceOperation destOperation, PortType srcPortType) throws WSDLException
{
Output srcOutput = srcOperation.getOutput();
@@ -590,8 +614,8 @@
Message srcMessage = srcOutput.getMessage();
if (srcMessage == null)
throw new WSDLException(WSDLException.INVALID_WSDL, "Cannot find output
message on operation " + srcOperation.getName() + " on port type: "
- + srcPortType.getQName());
-
+ + srcPortType.getQName());
+
log.trace("processOperationOutput: " + srcMessage.getQName());
destOperation.setPattern(Constants.WSDL20_PATTERN_IN_OUT);
@@ -617,6 +641,9 @@
WSDLInterfaceOperationOutput rpcOutput = new
WSDLInterfaceOperationOutput(destOperation);
for (Part srcPart : (List<Part>)srcMessage.getOrderedParts(null))
{
+ // Skip SWA attachment parts
+ if(ignorePart(srcPortType, srcPart)) continue;
+
if (Constants.URI_STYLE_DOCUMENT == destOperation.getStyle())
{
WSDLInterfaceOperationOutput destOutput = new
WSDLInterfaceOperationOutput(destOperation);
@@ -711,12 +738,12 @@
}
/** Translate the message part name into an XML element name.
- * @throws WSDLException
+ * @throws WSDLException
*/
private QName messagePartToElementName(Message srcMessage, Part srcPart,
WSDLInterfaceOperation destOperation) throws WSDLException
{
QName xmlName;
-
+
// R2306 A wsdl:message in a DESCRIPTION MUST NOT specify both type and element
attributes on the same wsdl:part
if (srcPart.getTypeName() != null && srcPart.getElementName() != null)
throw new WSDLException(WSDLException.INVALID_WSDL, "Message parts must not
define an element name and type name: " + srcMessage.getQName());
@@ -728,11 +755,11 @@
// only to wsdl:part element(s) that have been defined using the type
attribute.
if (srcPart.getName() == null)
throw new WSDLException(WSDLException.INVALID_WSDL, "RPC style message
parts must define a typy name: " + srcMessage.getQName());
-
+
// <part name="param" element="tns:SomeType" />
// Headers do have an element name even in rpc
xmlName = srcPart.getElementName();
-
+
// <part name="param" type="xsd:string" />
if (xmlName == null)
xmlName = new QName(srcPart.getName());
@@ -741,9 +768,10 @@
{
// R2204 A document-literal binding in a DESCRIPTION MUST refer, in each of its
soapbind:body element(s),
// only to wsdl:part element(s) that have been defined using the element
attribute
- if (srcPart.getElementName() == null)
+ // [hb] do this only for non swa porttypes
+ if (srcPart.getElementName() == null &&
srcPart.getExtensionAttribute(SWA_PORT_TYPE)==null)
throw new WSDLException(WSDLException.INVALID_WSDL, "Document style
message parts must define an element name: " + srcMessage.getQName());
-
+
// <part name="param" element="tns:SomeType" />
xmlName = srcPart.getElementName();
}
@@ -859,6 +887,9 @@
destBinding.setType(bindingType);
destWsdl.addBinding(destBinding);
+ // mark SWA Parts upfront
+ preProcessSWAParts(srcBinding, srcWsdl);
+
processPortType(srcWsdl, srcPortType);
String bindingStyle = Style.getDefaultStyle().toString();
@@ -883,6 +914,65 @@
return true;
}
+ /**
+ * Identify and mark message parts that belong to
+ * an SWA binding and can be skipped when processing this WSDL
+ * @param srcBinding
+ * @param srcWsdl
+ */
+ private void preProcessSWAParts(Binding srcBinding, Definition srcWsdl) {
+
+ Iterator opIt = srcBinding.getBindingOperations().iterator();
+ while(opIt.hasNext())
+ {
+ BindingOperation bindingOperation = (BindingOperation)opIt.next();
+
+ // Input
+ if(bindingOperation.getBindingInput()!=null)
+ markSWAParts( bindingOperation.getBindingInput().getExtensibilityElements() ,
srcBinding, srcWsdl);
+
+ // Output
+ if(bindingOperation.getBindingOutput()!=null)
+ markSWAParts( bindingOperation.getBindingOutput().getExtensibilityElements()
, srcBinding, srcWsdl);
+ }
+ }
+
+ private void markSWAParts(List extensions, Binding srcBinding, Definition srcWsdl) {
+ Iterator extIt = extensions.iterator();
+ while(extIt.hasNext())
+ {
+ Object o = extIt.next();
+ if(o instanceof MIMEMultipartRelated)
+ {
+
+ QName portTypeName = srcBinding.getPortType().getQName();
+
+ if(log.isTraceEnabled())
+ log.trace("SWA found on portType" + portTypeName);
+
+ MIMEMultipartRelated mrel = (MIMEMultipartRelated)o;
+ Iterator mimePartIt = mrel.getMIMEParts().iterator();
+ while(mimePartIt.hasNext())
+ {
+ MIMEPart mimePartDesc = (MIMEPart)mimePartIt.next();
+ List mimePartExt = mimePartDesc.getExtensibilityElements();
+ if(! mimePartExt.isEmpty() && (mimePartExt.get(0) instanceof
MIMEContent))
+ {
+ MIMEContent mimeContent = (MIMEContent)mimePartExt.get(0);
+
+ if(skippedSWAParts.get(portTypeName)==null)
+ skippedSWAParts.put(portTypeName, new ArrayList<String>());
+ skippedSWAParts.get(portTypeName).add(mimeContent.getPart());
+ }
+ }
+
+ PortTypeImpl p = (PortTypeImpl)srcWsdl.getPortTypes().get(portTypeName);
+ p.setExtensionAttribute( SWA_PORT_TYPE, "true");
+ break;
+ }
+ }
+ }
+
private Map<QName, Binding> getPortTypeBindings(Definition srcWsdl)
{
getAllDefinedBindings(srcWsdl);
@@ -990,7 +1080,7 @@
}
private void processBindingInput(Definition srcWsdl, WSDLBindingOperation
destBindingOperation, final WSDLInterfaceOperation destIntfOperation,
- final BindingOperation srcBindingOperation, BindingInput srcBindingInput) throws
WSDLException
+ final BindingOperation srcBindingOperation,
BindingInput srcBindingInput) throws WSDLException
{
log.trace("processBindingInput");
@@ -1023,7 +1113,7 @@
}
private void processBindingOutput(Definition srcWsdl, WSDLBindingOperation
destBindingOperation, final WSDLInterfaceOperation destIntfOperation,
- final BindingOperation srcBindingOperation, BindingOutput srcBindingOutput)
throws WSDLException
+ final BindingOperation srcBindingOperation,
BindingOutput srcBindingOutput) throws WSDLException
{
log.trace("processBindingInput");
@@ -1057,7 +1147,7 @@
}
private void processBindingReference(Definition srcWsdl, WSDLBindingOperation
destBindingOperation, WSDLInterfaceOperation destIntfOperation, QName soap11Body,
- List<ExtensibilityElement> extList, WSDLBindingMessageReference reference,
BindingOperation srcBindingOperation, ReferenceCallback callback) throws WSDLException
+ List<ExtensibilityElement> extList,
WSDLBindingMessageReference reference, BindingOperation srcBindingOperation,
ReferenceCallback callback) throws WSDLException
{
for (ExtensibilityElement extElement : extList)
{
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/common/wsdl11/WSDL11TestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/common/wsdl11/WSDL11TestCase.java 2007-01-11
14:44:14 UTC (rev 1924)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/common/wsdl11/WSDL11TestCase.java 2007-01-11
14:51:07 UTC (rev 1925)
@@ -173,4 +173,14 @@
assertNotNull(eventSourceInterface);
assertEquals(eventSourceInterface.getQName().getNamespaceURI(),
EventingConstants.NS_EVENTING);
}
+
+ public void testSwaMessages() throws Exception
+ {
+ File wsdlFile = new File("resources/common/wsdl11/SwaTestService.wsdl");
+ assertTrue(wsdlFile.exists());
+
+ WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
+ WSDLDefinitions wsdlDefinitions = factory.parse(wsdlFile.toURL());
+ assertNotNull(wsdlDefinitions); // should throw an Exception when SWA parts are not
skipped
+ }
}
Added: trunk/jbossws-tests/src/main/resources/common/wsdl11/SwaTestService.wsdl
===================================================================
--- trunk/jbossws-tests/src/main/resources/common/wsdl11/SwaTestService.wsdl 2007-01-11
14:44:14 UTC (rev 1924)
+++ trunk/jbossws-tests/src/main/resources/common/wsdl11/SwaTestService.wsdl 2007-01-11
14:51:07 UTC (rev 1925)
@@ -0,0 +1,487 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name="SwaTestService"
+
targetNamespace="http://SwaTestService.org/wsdl"
+
xmlns="http://schemas.xmlsoap.org/wsdl/"
+
xmlns:tns="http://SwaTestService.org/wsdl"
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
+
xmlns:s="http://SwaTestService.org/xsd"
+
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+
+ <types>
+ <schema
targetNamespace="http://SwaTestService.org/xsd"
+
xmlns:tns="http://SwaTestService.org/xsd"
+
xmlns="http://www.w3.org/2001/XMLSchema"
+
xmlns:ref="http://ws-i.org/profiles/basic/1.1/xsd"
+ elementFormDefault="qualified">
+ <import
namespace="http://ws-i.org/profiles/basic/1.1/xsd"
schemaLocation="WS-ISwA.xsd"/>
+ <element name="InputRequestGet"
type="tns:InputRequestGet"/>
+ <complexType name="InputRequestGet">
+ <sequence>
+ <element name="mimeType1" type="string"/>
+ <element name="mimeType2" type="string"/>
+ <element name="url1" type="string"/>
+ <element name="url2" type="string"/>
+ </sequence>
+ </complexType>
+ <element name="InputRequestPut"
type="tns:InputRequestPut"/>
+ <complexType name="InputRequestPut">
+ <sequence>
+ <element name="mimeType1" type="string"/>
+ <element name="mimeType2" type="string"/>
+ <element name="header" type="string"/>
+ </sequence>
+ </complexType>
+ <element name="InputRequest" type="tns:InputRequest"/>
+ <complexType name="InputRequest">
+ <sequence>
+ <element name="mimeType1" type="string"/>
+ <element name="mimeType2" type="string"/>
+ </sequence>
+ </complexType>
+ <element name="InputRequestThrowAFault"
type="tns:InputRequestThrowAFault"/>
+ <complexType name="InputRequestThrowAFault">
+ <sequence>
+ <element name="mimeType1" type="string"/>
+ <element name="mimeType2" type="string"/>
+ </sequence>
+ </complexType>
+ <element name="InputRequestWithHeader"
type="tns:InputRequestWithHeader"/>
+ <complexType name="InputRequestWithHeader">
+ <sequence>
+ <element name="mimeType1" type="string"/>
+ <element name="mimeType2" type="string"/>
+ </sequence>
+ </complexType>
+ <element name="InputRequestString"
type="tns:InputRequestString"/>
+ <complexType name="InputRequestString">
+ <sequence>
+ <element name="myString" type="string"/>
+ </sequence>
+ </complexType>
+ <element name="OutputResponse"
type="tns:OutputResponse"/>
+ <complexType name="OutputResponse">
+ <sequence>
+ <element name="mimeType1" type="string"/>
+ <element name="mimeType2" type="string"/>
+ <element name="result" type="string"/>
+ <element name="reason" type="string"/>
+ </sequence>
+ </complexType>
+ <element name="OutputResponseString"
type="tns:OutputResponseString"/>
+ <complexType name="OutputResponseString">
+ <sequence>
+ <element name="myString" type="string"/>
+ </sequence>
+ </complexType>
+ <element name="MyHeader" type="tns:MyHeader"/>
+ <complexType name="MyHeader">
+ <sequence>
+ <annotation>
+ <documentation>
+ This is my header
+ </documentation>
+ </annotation>
+ <element name="message" type="string"/>
+ </sequence>
+ </complexType>
+ <element name="MyFaultReason" type="tns:MyFaultType"/>
+ <complexType name="MyFaultType">
+ <sequence>
+ <annotation>
+ <documentation>
+ This is my fault
+ </documentation>
+ </annotation>
+ <element name="message" type="string"/>
+ </sequence>
+ </complexType>
+ <element name="VoidRequest" type="tns:VoidRequest"/>
+ <complexType name="VoidRequest">
+ <sequence/>
+ </complexType>
+ <element name="OutputResponseAll"
type="tns:OutputResponseAll"/>
+ <complexType name="OutputResponseAll">
+ <sequence>
+ <element name="result" type="string"/>
+ <element name="reason" type="string"/>
+ </sequence>
+ </complexType>
+ </schema>
+ </types>
+
+ <message name="messageInputGet">
+ <part name="request" element="s:InputRequestGet"/>
+ </message>
+
+ <message name="messageInputPut">
+ <part name="request" element="s:InputRequestPut"/>
+ <part name="attach1" type="xsd:string"/>
+ <part name="attach2" type="xsd:string"/>
+ </message>
+
+ <message name="messageInput">
+ <part name="request" element="s:InputRequest"/>
+ <part name="attach1" type="xsd:string"/>
+ <part name="attach2" type="xsd:string"/>
+ </message>
+
+ <message name="messageInputThrowAFault">
+ <part name="request" element="s:InputRequestThrowAFault"/>
+ <part name="attach1" type="xsd:string"/>
+ <part name="attach2" type="xsd:string"/>
+ </message>
+
+ <message name="messageInputNoAttachments">
+ <part name="request" element="s:InputRequestString"/>
+ </message>
+
+ <message name="messageInputAllAttachmentTypes">
+ <part name="request" element="s:VoidRequest"/>
+ <part name="attach1" type="xsd:string"/>
+ <part name="attach2" type="xsd:string"/>
+ <part name="attach3" type="xsd:string"/>
+ <part name="attach4" type="xsd:base64Binary"/>
+ <part name="attach5" type="xsd:base64Binary"/>
+ </message>
+
+ <message name="messageInputWithHeader">
+ <part name="request" element="s:InputRequestWithHeader"/>
+ <part name="header" element="s:MyHeader"/>
+ <part name="attach1" type="xsd:string"/>
+ <part name="attach2" type="xsd:string"/>
+ </message>
+
+ <message name="messageOutput">
+ <part name="response" element="s:OutputResponse"/>
+ <part name="attach1" type="xsd:string"/>
+ <part name="attach2" type="xsd:string"/>
+ </message>
+
+ <message name="messageOutputAllAttachmentTypes">
+ <part name="response" element="s:OutputResponseAll"/>
+ <part name="attach1" type="xsd:string"/>
+ <part name="attach2" type="xsd:string"/>
+ <part name="attach3" type="xsd:string"/>
+ <part name="attach4" type="xsd:base64Binary"/>
+ <part name="attach5" type="xsd:base64Binary"/>
+ </message>
+
+ <message name="messageOutputStringResponse">
+ <part name="response" element="s:OutputResponseString"/>
+ </message>
+
+ <message name="MyFault">
+ <part name="MyFault" element="s:MyFaultReason"/>
+ </message>
+
+ <message name="MyHeaderFault">
+ <part name="MyHeaderFault"
element="s:MyHeaderFaultReason"/>
+ </message>
+
+ <portType name="SwaTest1">
+ <operation name="getMultipleAttachments">
+ <input message="tns:messageInputGet"/>
+ <output message="tns:messageOutput"/>
+ </operation>
+ <operation name="putMultipleAttachments">
+ <input message="tns:messageInputPut"/>
+ <output message="tns:messageOutputStringResponse"/>
+ </operation>
+ <operation name="echoMultipleAttachments">
+ <input message="tns:messageInput"/>
+ <output message="tns:messageOutput"/>
+ </operation>
+ <operation name="echoNoAttachments">
+ <input message="tns:messageInputNoAttachments"/>
+ <output message="tns:messageOutputStringResponse"/>
+ </operation>
+ <operation name="echoAllAttachmentTypes">
+ <input message="tns:messageInputAllAttachmentTypes"/>
+ <output message="tns:messageOutputAllAttachmentTypes"/>
+ </operation>
+ <operation name="echoAttachmentsAndThrowAFault">
+ <input message="tns:messageInputThrowAFault"/>
+ <output message="tns:messageOutput"/>
+ <fault name="MyFault" message="tns:MyFault"/>
+ </operation>
+ <operation name="echoAttachmentsWithHeader">
+ <input message="tns:messageInputWithHeader"/>
+ <output message="tns:messageOutput"/>
+ <fault name="MyFault" message="tns:MyFault"/>
+ </operation>
+ </portType>
+
+ <portType name="SwaTest2">
+ <operation name="putMultipleAttachments">
+ <input message="tns:messageInputPut"/>
+ <output message="tns:messageOutputStringResponse"/>
+ </operation>
+ <operation name="echoNoAttachments">
+ <input message="tns:messageInputNoAttachments"/>
+ <output message="tns:messageOutputStringResponse"/>
+ </operation>
+ </portType>
+
+ <binding name="SwaTestSoapBinding1" type="tns:SwaTest1">
+ <soap:binding
transport="http://schemas.xmlsoap.org/soap/http"
style="document"/>
+ <operation name="getMultipleAttachments">
+ <soap:operation/>
+ <input>
+ <soap:body parts="request" use="literal"/>
+ </input>
+ <output>
+ <mime:multipartRelated>
+ <mime:part>
+ <soap:body parts="response" use="literal"/>
+ </mime:part>
+ <mime:part>
+ <mime:content part="attach1" type="text/plain"/>
+ </mime:part>
+ <mime:part>
+ <mime:content part="attach2" type="text/html"/>
+ </mime:part>
+ </mime:multipartRelated>
+ </output>
+ </operation>
+ <operation name="putMultipleAttachments">
+ <soap:operation/>
+ <input>
+ <mime:multipartRelated>
+ <mime:part>
+ <soap:body parts="request" use="literal"/>
+ </mime:part>
+ <mime:part>
+ <mime:content part="attach1" type="text/plain"/>
+ <mime:content part="attach1" type="text/html"/>
+ <mime:content part="attach1" type="text/xml"/>
+ </mime:part>
+ <mime:part>
+ <mime:content part="attach2" type="text/plain"/>
+ <mime:content part="attach2" type="text/html"/>
+ <mime:content part="attach2" type="text/xml"/>
+ </mime:part>
+ </mime:multipartRelated>
+ </input>
+ <output>
+ <soap:body use="literal"
message="tns:messageOutputStringResponse" parts="response"/>
+ </output>
+ </operation>
+ <operation name="echoMultipleAttachments">
+ <soap:operation/>
+ <input>
+ <mime:multipartRelated>
+ <mime:part>
+ <soap:body parts="request" use="literal"/>
+ </mime:part>
+ <mime:part>
+ <mime:content part="attach1" type="text/plain"/>
+ <mime:content part="attach1" type="text/html"/>
+ </mime:part>
+ <mime:part>
+ <mime:content part="attach2" type="text/plain"/>
+ <mime:content part="attach2" type="text/html"/>
+ </mime:part>
+ </mime:multipartRelated>
+ </input>
+ <output>
+ <mime:multipartRelated>
+ <mime:part>
+ <soap:body parts="response" use="literal"/>
+ </mime:part>
+ <mime:part>
+ <mime:content part="attach1" type="text/plain"/>
+ <mime:content part="attach1" type="text/html"/>
+ </mime:part>
+ <mime:part>
+ <mime:content part="attach2" type="text/plain"/>
+ <mime:content part="attach2" type="text/html"/>
+ </mime:part>
+ </mime:multipartRelated>
+ </output>
+ </operation>
+ <operation name="echoNoAttachments">
+ <soap:operation/>
+ <input>
+ <mime:multipartRelated>
+ <mime:part>
+ <soap:body parts="request" use="literal"/>
+ </mime:part>
+ </mime:multipartRelated>
+ </input>
+ <output>
+ <mime:multipartRelated>
+ <mime:part>
+ <soap:body use="literal"
message="tns:messageOutputStringResponse" parts="response"/>
+ </mime:part>
+ </mime:multipartRelated>
+ </output>
+ </operation>
+ <operation name="echoAllAttachmentTypes">
+ <soap:operation/>
+ <input>
+ <mime:multipartRelated>
+ <mime:part>
+ <soap:body parts="request" use="literal"/>
+ </mime:part>
+ <mime:part>
+ <mime:content part="attach1" type="text/plain"/>
+ </mime:part>
+ <mime:part>
+ <mime:content part="attach2" type="text/html"/>
+ </mime:part>
+ <mime:part>
+ <mime:content part="attach3" type="text/xml"/>
+ </mime:part>
+ <mime:part>
+ <mime:content part="attach4" type="image/jpeg"/>
+ </mime:part>
+ <mime:part>
+ <mime:content part="attach5" type="image/jpeg"/>
+ </mime:part>
+ </mime:multipartRelated>
+ </input>
+ <output>
+ <mime:multipartRelated>
+ <mime:part>
+ <soap:body parts="response" use="literal"/>
+ </mime:part>
+ <mime:part>
+ <mime:content part="attach1" type="text/plain"/>
+ </mime:part>
+ <mime:part>
+ <mime:content part="attach2" type="text/html"/>
+ </mime:part>
+ <mime:part>
+ <mime:content part="attach3" type="text/xml"/>
+ </mime:part>
+ <mime:part>
+ <mime:content part="attach4" type="image/jpeg"/>
+ </mime:part>
+ <mime:part>
+ <mime:content part="attach5" type="image/jpeg"/>
+ </mime:part>
+ </mime:multipartRelated>
+ </output>
+ </operation>
+ <operation name="echoAttachmentsAndThrowAFault">
+ <soap:operation/>
+ <input>
+ <mime:multipartRelated>
+ <mime:part>
+ <soap:body parts="request" use="literal"/>
+ </mime:part>
+ <mime:part>
+ <mime:content part="attach1" type="text/plain"/>
+ </mime:part>
+ <mime:part>
+ <mime:content part="attach2" type="text/html"/>
+ </mime:part>
+ </mime:multipartRelated>
+ </input>
+ <output>
+ <mime:multipartRelated>
+ <mime:part>
+ <soap:body parts="response" use="literal"/>
+ </mime:part>
+ <mime:part>
+ <mime:content part="attach1" type="text/plain"/>
+ </mime:part>
+ <mime:part>
+ <mime:content part="attach2" type="text/html"/>
+ </mime:part>
+ </mime:multipartRelated>
+ </output>
+ <fault name="MyFault">
+ <soap:fault name="MyFault" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="echoAttachmentsWithHeader">
+ <soap:operation/>
+ <input>
+ <mime:multipartRelated>
+ <mime:part>
+ <soap:body parts="request" use="literal"/>
+ <soap:header part="header" use="literal"
message="tns:messageInputWithHeader"/>
+ </mime:part>
+ <mime:part>
+ <mime:content part="attach1" type="text/plain"/>
+ </mime:part>
+ <mime:part>
+ <mime:content part="attach2" type="text/html"/>
+ </mime:part>
+ </mime:multipartRelated>
+ </input>
+ <output>
+ <mime:multipartRelated>
+ <mime:part>
+ <soap:body parts="response" use="literal"/>
+ </mime:part>
+ <mime:part>
+ <mime:content part="attach1" type="text/plain"/>
+ </mime:part>
+ <mime:part>
+ <mime:content part="attach2" type="text/html"/>
+ </mime:part>
+ </mime:multipartRelated>
+ </output>
+ <fault name="MyFault">
+ <soap:fault name="MyFault" use="literal"/>
+ </fault>
+ </operation>
+ </binding>
+
+ <binding name="SwaTestSoapBinding2" type="tns:SwaTest2">
+ <soap:binding
transport="http://schemas.xmlsoap.org/soap/http"
style="document"/>
+ <operation name="putMultipleAttachments">
+ <soap:operation/>
+ <input>
+ <mime:multipartRelated>
+ <mime:part>
+ <soap:body parts="request" use="literal"/>
+ </mime:part>
+ <mime:part>
+ <mime:content part="attach1" type="text/plain"/>
+ <mime:content part="attach1" type="text/html"/>
+ <mime:content part="attach1" type="text/xml"/>
+ </mime:part>
+ <mime:part>
+ <mime:content part="attach2" type="text/plain"/>
+ <mime:content part="attach2" type="text/html"/>
+ <mime:content part="attach2" type="text/xml"/>
+ </mime:part>
+ </mime:multipartRelated>
+ </input>
+ <output>
+ <soap:body use="literal"
message="tns:messageOutputStringResponse" parts="response"/>
+ </output>
+ </operation>
+ <operation name="echoNoAttachments">
+ <soap:operation/>
+ <input>
+ <mime:multipartRelated>
+ <mime:part>
+ <soap:body parts="request" use="literal"/>
+ </mime:part>
+ </mime:multipartRelated>
+ </input>
+ <output>
+ <mime:multipartRelated>
+ <mime:part>
+ <soap:body use="literal"
message="tns:messageOutputStringResponse" parts="response"/>
+ </mime:part>
+ </mime:multipartRelated>
+ </output>
+ </operation>
+ </binding>
+
+ <service name="WSIDLSwaTestService">
+ <port name="SwaTestOnePort"
binding="tns:SwaTestSoapBinding1">
+ <soap:address
location="http://localhost:8080/WSIDLSwaTest/jaxws/SwaTestOne"/>
+ </port>
+ <port name="SwaTestTwoPort"
binding="tns:SwaTestSoapBinding2">
+ <soap:address
location="http://localhost:8080/WSIDLSwaTest/jaxws/SwaTestTwo"/>
+ </port>
+ </service>
+</definitions>
Property changes on:
trunk/jbossws-tests/src/main/resources/common/wsdl11/SwaTestService.wsdl
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/jbossws-tests/src/main/resources/common/wsdl11/WS-ISwA.xsd
===================================================================
--- trunk/jbossws-tests/src/main/resources/common/wsdl11/WS-ISwA.xsd 2007-01-11 14:44:14
UTC (rev 1924)
+++ trunk/jbossws-tests/src/main/resources/common/wsdl11/WS-ISwA.xsd 2007-01-11 14:51:07
UTC (rev 1925)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8" ?>
+
+<!--
+ Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+-->
+
+<!--
+ July, 2002
+
+ (c) Copyright 2003, The Web Services-Interoperability Organization (WS-I)
+ Download or use of this file is governed by the Policies and Bylaws of WS-I.
+
+ For more information, send email info(a)ws-i.org.
+-->
+<xsd:schema
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
+
targetNamespace="http://ws-i.org/profiles/basic/1.1/xsd"
+
xmlns:tns="http://ws-i.org/profiles/basic/1.1/xsd">
+ <xsd:simpleType name="swaRef">
+ <xsd:restriction base="xsd:anyURI" />
+ </xsd:simpleType>
+</xsd:schema>