servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject svn commit: r799044 - in /servicemix/components/engines/servicemix-exec/trunk/src/main: java/org/apache/servicemix/exec/ExecEndpoint.java resources/servicemix-exec.wsdl
Date Wed, 29 Jul 2009 20:06:07 GMT
Author: jbonofre
Date: Wed Jul 29 20:06:07 2009
New Revision: 799044

URL: http://svn.apache.org/viewvc?rev=799044&view=rev
Log:
Update the servicemix-exec abstract WSDL adding types.

Modified:
    servicemix/components/engines/servicemix-exec/trunk/src/main/java/org/apache/servicemix/exec/ExecEndpoint.java
    servicemix/components/engines/servicemix-exec/trunk/src/main/resources/servicemix-exec.wsdl

Modified: servicemix/components/engines/servicemix-exec/trunk/src/main/java/org/apache/servicemix/exec/ExecEndpoint.java
URL: http://svn.apache.org/viewvc/servicemix/components/engines/servicemix-exec/trunk/src/main/java/org/apache/servicemix/exec/ExecEndpoint.java?rev=799044&r1=799043&r2=799044&view=diff
==============================================================================
--- servicemix/components/engines/servicemix-exec/trunk/src/main/java/org/apache/servicemix/exec/ExecEndpoint.java
(original)
+++ servicemix/components/engines/servicemix-exec/trunk/src/main/java/org/apache/servicemix/exec/ExecEndpoint.java
Wed Jul 29 20:06:07 2009
@@ -31,6 +31,7 @@
 import org.apache.servicemix.jbi.jaxp.SourceTransformer;
 import org.apache.servicemix.jbi.jaxp.StringSource;
 import org.apache.servicemix.soap.util.DomUtil;
+import org.apache.servicemix.soap.wsdl.WSDLUtils;
 import org.springframework.core.io.ClassPathResource;
 import org.springframework.core.io.Resource;
 
@@ -116,13 +117,12 @@
 	            // load the default abstract WSDL
 	            description = DomUtil.parse(new ClassPathResource(DEFAULT_WSDL).getInputStream());
 	            definition = javax.wsdl.factory.WSDLFactory.newInstance().newWSDLReader().readWSDL(null,
description);
-	            // TODO cleanup in WSDL definitions to use endpoint properties (service/endpoint)
 	        }
 	    } catch (Exception e) {
 	        throw new DeploymentException("Can't load the WSDL.", e);
 	    }
 	    
-	    // TODO validate used WSDL
+	    // TODO define the WSDL for the marshaler
 	}
 
 	/*
@@ -166,8 +166,6 @@
 			return;
 		} else {
 			String exec = null;
-			
-			// TODO parse and extract data from the in SOAP envelope
 
 			// try to extract the command from the in message content
 			if (exchange.getMessage("in") != null) {
@@ -177,6 +175,8 @@
 				}
 				// gets the in message
 				NormalizedMessage in = exchange.getMessage("in");
+				logger.debug("In message: " + in);
+				logger.debug("In message content: " + in.getContent());
 				// parses the in message and get the execution command
 				SourceTransformer transformer = new SourceTransformer();
 				exec = marshaler.constructExecCommand(transformer.toDOMDocument(in));

Modified: servicemix/components/engines/servicemix-exec/trunk/src/main/resources/servicemix-exec.wsdl
URL: http://svn.apache.org/viewvc/servicemix/components/engines/servicemix-exec/trunk/src/main/resources/servicemix-exec.wsdl?rev=799044&r1=799043&r2=799044&view=diff
==============================================================================
--- servicemix/components/engines/servicemix-exec/trunk/src/main/resources/servicemix-exec.wsdl
(original)
+++ servicemix/components/engines/servicemix-exec/trunk/src/main/resources/servicemix-exec.wsdl
Wed Jul 29 20:06:07 2009
@@ -17,37 +17,64 @@
   specific language governing permissions and limitations
   under the License.
 -->
-<wsdl:definitions name="servicemix-exec" targetNamespace="http://servicemix.apache.org/exec"
+<wsdl:definitions name="servicemix-exec" 
+    targetNamespace="http://servicemix.apache.org/exec"
     xmlns:tns="http://servicemix.apache.org/exec"
     xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
     
     <wsdl:types>
         <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
-                attributeFormDefault="unqualified"
-                elementFormDefault="unqualified"
                 targetNamespace="http://servicemix.apache.org/exec"
-                xmlns:tns="http://servicemix.apache.org/exec">
-            <xs:element name="Command" type="xs:string"/>
-            <xs:element name="CommandResponse" type="tns:ExecutionData"/>
-            <xs:complexType name="ExecutionData">
-                <xs:element name="output" type="xs:string"/>
+                xmlns:tns="http://servicemix.apache.org/exec"
+                attributeFormDefault="unqualified"
+                elementFormDefault="unqualified">
+            <xs:element name="execute" type="tns:command"/>
+            <xs:complexType name="command">
+                <xs:sequence>
+                    <xs:element minOccurs="0" name="arg0" type="xs:string"/>
+                </xs:sequence>
+            </xs:complexType>
+            <xs:element name="executeResponse" type="tns:executeResponse"/>
+            <xs:complexType name="executeResponse">
+                <xs:sequence>
+                    <xs:element minOccurs="0" name="return" type="tns:executionData"/>
+                </xs:sequence>
+            </xs:complexType>
+            <xs:complexType name="executionData">
+                <xs:sequence>
+                    <xs:element name="endTime" type="xs:long"/>
+                    <xs:element minOccurs="0" name="errorData" type="tns:stringBuffer"/>
+                    <xs:element name="exitCode" type="xs:int"/>
+                    <xs:element minOccurs="0" name="outputData" type="tns:stringBuffer"/>
+                    <xs:element name="startTime" type="xs:long"/>
+                </xs:sequence>
+            </xs:complexType>                
+            <xs:complexType final="extension restriction" name="stringBuffer">
+                <xs:complexContent>
+                    <xs:extension base="tns:abstractStringBuilder">
+                        <xs:sequence/>
+                    </xs:extension>
+                </xs:complexContent>
+            </xs:complexType>
+            <xs:complexType abstract="true" name="abstractStringBuilder">
+                <xs:sequence/>
             </xs:complexType>
         </xs:schema>
     </wsdl:types>
     
-    <wsdl:message name="ExecuteCommandIn">
-        <wsdl:part name="body" element="tns:ExecuteCommand"/>
+    <wsdl:message name="execute">
+        <wsdl:part name="parameters" element="tns:execute"/>
     </wsdl:message>
     
-    <wsdl:message name="ExecuteCommandOut">
-        <wsdl:part name="body" element="tns:ExecuteCommandResponse"/>
+    <wsdl:message name="executeResponse">
+        <wsdl:part name="parameters" element="tns:executeResponse"/>
     </wsdl:message>
     
     <wsdl:portType name="ExecPortType">
-        <wsdl:operation name="ExecutionCommand">
-            <wsdl:input message="tns:Command"/>
-            <wsdl:output message="tns:CommandResponse"/>
+        <wsdl:operation name="execute">
+            <wsdl:input message="tns:execute"/>
+            <wsdl:output message="tns:executeResponse"/>
         </wsdl:operation>
     </wsdl:portType>
     



Mime
View raw message