servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r473058 - in /incubator/servicemix/trunk/sandbox/servicemix-soap2/src/main/java/org/apache/servicemix/soap: ./ api/model/ core/model/ wsdl/ wsdl/validator/
Date Thu, 09 Nov 2006 20:17:39 GMT
Author: gnodet
Date: Thu Nov  9 12:17:38 2006
New Revision: 473058

URL: http://svn.apache.org/viewvc?view=rev&rev=473058
Log: (empty)

Modified:
    incubator/servicemix/trunk/sandbox/servicemix-soap2/src/main/java/org/apache/servicemix/soap/SoapEndpoint.java
    incubator/servicemix/trunk/sandbox/servicemix-soap2/src/main/java/org/apache/servicemix/soap/api/model/Binding.java
    incubator/servicemix/trunk/sandbox/servicemix-soap2/src/main/java/org/apache/servicemix/soap/core/model/AbstractBinding.java
    incubator/servicemix/trunk/sandbox/servicemix-soap2/src/main/java/org/apache/servicemix/soap/wsdl/WSDLUtils.java
    incubator/servicemix/trunk/sandbox/servicemix-soap2/src/main/java/org/apache/servicemix/soap/wsdl/Wsdl1Soap11BindingFactory.java
    incubator/servicemix/trunk/sandbox/servicemix-soap2/src/main/java/org/apache/servicemix/soap/wsdl/Wsdl1Soap12BindingFactory.java
    incubator/servicemix/trunk/sandbox/servicemix-soap2/src/main/java/org/apache/servicemix/soap/wsdl/validator/WSIBPValidator.java

Modified: incubator/servicemix/trunk/sandbox/servicemix-soap2/src/main/java/org/apache/servicemix/soap/SoapEndpoint.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/sandbox/servicemix-soap2/src/main/java/org/apache/servicemix/soap/SoapEndpoint.java?view=diff&rev=473058&r1=473057&r2=473058
==============================================================================
--- incubator/servicemix/trunk/sandbox/servicemix-soap2/src/main/java/org/apache/servicemix/soap/SoapEndpoint.java
(original)
+++ incubator/servicemix/trunk/sandbox/servicemix-soap2/src/main/java/org/apache/servicemix/soap/SoapEndpoint.java
Thu Nov  9 12:17:38 2006
@@ -46,6 +46,9 @@
 import org.apache.servicemix.jbi.security.keystore.KeystoreManager;
 import org.apache.servicemix.soap.api.Policy;
 import org.apache.servicemix.soap.api.model.Binding;
+import org.apache.servicemix.soap.api.model.Message;
+import org.apache.servicemix.soap.api.model.Operation;
+import org.apache.servicemix.soap.core.model.AbstractBinding;
 import org.apache.servicemix.soap.ws.addressing.WsAddressingPolicy;
 import org.springframework.core.io.Resource;
 import org.w3c.dom.Document;
@@ -473,4 +476,7 @@
         return wsdls;
     }
     
+    public static class NonWsdlBinding extends AbstractBinding<Operation<Message>>
{
+    }
+
 }

Modified: incubator/servicemix/trunk/sandbox/servicemix-soap2/src/main/java/org/apache/servicemix/soap/api/model/Binding.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/sandbox/servicemix-soap2/src/main/java/org/apache/servicemix/soap/api/model/Binding.java?view=diff&rev=473058&r1=473057&r2=473058
==============================================================================
--- incubator/servicemix/trunk/sandbox/servicemix-soap2/src/main/java/org/apache/servicemix/soap/api/model/Binding.java
(original)
+++ incubator/servicemix/trunk/sandbox/servicemix-soap2/src/main/java/org/apache/servicemix/soap/api/model/Binding.java
Thu Nov  9 12:17:38 2006
@@ -20,10 +20,18 @@
 
 import javax.xml.namespace.QName;
 
+import org.apache.servicemix.soap.api.Message;
+import org.apache.servicemix.soap.api.InterceptorChain;
 import org.apache.servicemix.soap.api.InterceptorProvider;
 
 public interface Binding<T extends Operation> extends InterceptorProvider {
 
+    public Message createMessage();
+    
+    public Message createMessage(Message request);
+    
+    public InterceptorChain getInterceptorChain(Phase phase);
+    
     public Collection<T> getOperations();
     
     public T getOperation(QName name);

Modified: incubator/servicemix/trunk/sandbox/servicemix-soap2/src/main/java/org/apache/servicemix/soap/core/model/AbstractBinding.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/sandbox/servicemix-soap2/src/main/java/org/apache/servicemix/soap/core/model/AbstractBinding.java?view=diff&rev=473058&r1=473057&r2=473058
==============================================================================
--- incubator/servicemix/trunk/sandbox/servicemix-soap2/src/main/java/org/apache/servicemix/soap/core/model/AbstractBinding.java
(original)
+++ incubator/servicemix/trunk/sandbox/servicemix-soap2/src/main/java/org/apache/servicemix/soap/core/model/AbstractBinding.java
Thu Nov  9 12:17:38 2006
@@ -22,9 +22,13 @@
 
 import javax.xml.namespace.QName;
 
+import org.apache.servicemix.soap.api.InterceptorChain;
+import org.apache.servicemix.soap.api.Message;
 import org.apache.servicemix.soap.api.model.Binding;
 import org.apache.servicemix.soap.api.model.Operation;
 import org.apache.servicemix.soap.core.AbstractInterceptorProvider;
+import org.apache.servicemix.soap.core.MessageImpl;
+import org.apache.servicemix.soap.core.PhaseInterceptorChain;
 
 /**
  * @author <a href="mailto:gnodet [at] gmail.com">Guillaume Nodet</a>
@@ -37,6 +41,25 @@
     
     public AbstractBinding() {
         operations = new HashMap<QName, T>();
+    }
+    
+    public Message createMessage() {
+        Message in = new MessageImpl();
+        in.put(Binding.class, this);
+        return in;
+    }
+    
+    public Message createMessage(Message request) {
+        Message out = new MessageImpl();
+        out.put(Binding.class, this);
+        out.put(Operation.class, request.get(Operation.class));
+        return out;
+    }
+    
+    public InterceptorChain getInterceptorChain(Phase phase) {
+        InterceptorChain chain = new PhaseInterceptorChain();
+        chain.add(getInterceptors(Phase.ClientOut));
+        return chain;
     }
     
     public T getOperation(QName name) {

Modified: incubator/servicemix/trunk/sandbox/servicemix-soap2/src/main/java/org/apache/servicemix/soap/wsdl/WSDLUtils.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/sandbox/servicemix-soap2/src/main/java/org/apache/servicemix/soap/wsdl/WSDLUtils.java?view=diff&rev=473058&r1=473057&r2=473058
==============================================================================
--- incubator/servicemix/trunk/sandbox/servicemix-soap2/src/main/java/org/apache/servicemix/soap/wsdl/WSDLUtils.java
(original)
+++ incubator/servicemix/trunk/sandbox/servicemix-soap2/src/main/java/org/apache/servicemix/soap/wsdl/WSDLUtils.java
Thu Nov  9 12:17:38 2006
@@ -1,12 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.apache.servicemix.soap.wsdl;
 
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
 
 import javax.wsdl.BindingFault;
 import javax.wsdl.BindingOperation;
+import javax.wsdl.Message;
+import javax.wsdl.Part;
 import javax.wsdl.WSDLException;
 import javax.wsdl.extensions.ElementExtensible;
 import javax.wsdl.extensions.soap.SOAPBody;
@@ -24,6 +43,10 @@
 
 public class WSDLUtils {
 
+    public static final String WSDL1_STYLE_RPC = "rpc";
+    public static final String WSDL1_STYLE_DOCUMENT = "document";
+    public static final String WSDL1_USE_LITERAL = "literal";
+    
     private static WSDLFactory wsdl11Factory;
     
     public static WSDLReader createWSDL11Reader() {
@@ -51,6 +74,11 @@
     @SuppressWarnings("unchecked")
     public static List<String> getParts(SOAP12Body body) {
         return (List<String>) body.getParts();
+    }
+    
+    @SuppressWarnings("unchecked")
+    public static Map<String, Part> getParts(Message msg) {
+        return (Map<String, Part>) msg.getParts();
     }
     
     @SuppressWarnings("unchecked")

Modified: incubator/servicemix/trunk/sandbox/servicemix-soap2/src/main/java/org/apache/servicemix/soap/wsdl/Wsdl1Soap11BindingFactory.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/sandbox/servicemix-soap2/src/main/java/org/apache/servicemix/soap/wsdl/Wsdl1Soap11BindingFactory.java?view=diff&rev=473058&r1=473057&r2=473058
==============================================================================
--- incubator/servicemix/trunk/sandbox/servicemix-soap2/src/main/java/org/apache/servicemix/soap/wsdl/Wsdl1Soap11BindingFactory.java
(original)
+++ incubator/servicemix/trunk/sandbox/servicemix-soap2/src/main/java/org/apache/servicemix/soap/wsdl/Wsdl1Soap11BindingFactory.java
Thu Nov  9 12:17:38 2006
@@ -48,13 +48,9 @@
 import org.apache.servicemix.soap.bindings.soap.model.wsdl1.Wsdl1SoapBinding;
 import org.apache.servicemix.soap.bindings.soap.model.wsdl1.Wsdl1SoapBinding.Style;
 import org.apache.servicemix.soap.interceptors.jbi.JbiConstants;
-import org.apache.servicemix.soap.util.QNameUtil;
 
 public class Wsdl1Soap11BindingFactory {
 
-    public static final String STYLE_RPC = "rpc";
-    public static final String STYLE_DOCUMENT = "document";
-    
     public static Wsdl1SoapBinding createWsdl1SoapBinding(Port wsdlPort) {
         Wsdl1SoapBindingImpl binding = new Wsdl1SoapBindingImpl(Soap11.getInstance());
         // Find infos from port
@@ -218,9 +214,9 @@
     }
     
     private static Style getStyle(String str) {
-        if (STYLE_DOCUMENT.equalsIgnoreCase(str)) {
+        if (WSDLUtils.WSDL1_STYLE_RPC.equalsIgnoreCase(str)) {
             return Style.DOCUMENT;
-        } else if (STYLE_RPC.equalsIgnoreCase(str)) {
+        } else if (WSDLUtils.WSDL1_STYLE_RPC.equalsIgnoreCase(str)) {
             return Style.RPC;
         } else {
             return null;

Modified: incubator/servicemix/trunk/sandbox/servicemix-soap2/src/main/java/org/apache/servicemix/soap/wsdl/Wsdl1Soap12BindingFactory.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/sandbox/servicemix-soap2/src/main/java/org/apache/servicemix/soap/wsdl/Wsdl1Soap12BindingFactory.java?view=diff&rev=473058&r1=473057&r2=473058
==============================================================================
--- incubator/servicemix/trunk/sandbox/servicemix-soap2/src/main/java/org/apache/servicemix/soap/wsdl/Wsdl1Soap12BindingFactory.java
(original)
+++ incubator/servicemix/trunk/sandbox/servicemix-soap2/src/main/java/org/apache/servicemix/soap/wsdl/Wsdl1Soap12BindingFactory.java
Thu Nov  9 12:17:38 2006
@@ -33,10 +33,10 @@
 import javax.wsdl.Port;
 import javax.wsdl.PortType;
 import javax.wsdl.extensions.ExtensibilityElement;
-import javax.wsdl.extensions.soap12.SOAP12Body;
-import javax.wsdl.extensions.soap12.SOAP12Header;
 import javax.wsdl.extensions.soap12.SOAP12Address;
 import javax.wsdl.extensions.soap12.SOAP12Binding;
+import javax.wsdl.extensions.soap12.SOAP12Body;
+import javax.wsdl.extensions.soap12.SOAP12Header;
 import javax.wsdl.extensions.soap12.SOAP12Operation;
 import javax.xml.namespace.QName;
 
@@ -48,7 +48,6 @@
 import org.apache.servicemix.soap.bindings.soap.model.wsdl1.Wsdl1SoapBinding;
 import org.apache.servicemix.soap.bindings.soap.model.wsdl1.Wsdl1SoapBinding.Style;
 import org.apache.servicemix.soap.interceptors.jbi.JbiConstants;
-import org.apache.servicemix.soap.util.QNameUtil;
 
 public class Wsdl1Soap12BindingFactory {
 

Modified: incubator/servicemix/trunk/sandbox/servicemix-soap2/src/main/java/org/apache/servicemix/soap/wsdl/validator/WSIBPValidator.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/sandbox/servicemix-soap2/src/main/java/org/apache/servicemix/soap/wsdl/validator/WSIBPValidator.java?view=diff&rev=473058&r1=473057&r2=473058
==============================================================================
--- incubator/servicemix/trunk/sandbox/servicemix-soap2/src/main/java/org/apache/servicemix/soap/wsdl/validator/WSIBPValidator.java
(original)
+++ incubator/servicemix/trunk/sandbox/servicemix-soap2/src/main/java/org/apache/servicemix/soap/wsdl/validator/WSIBPValidator.java
Thu Nov  9 12:17:38 2006
@@ -75,10 +75,6 @@
         DOCUMENT,
     }
     
-    public static final String STYLE_RPC = "rpc";
-    public static final String STYLE_DOCUMENT = "document";
-    public static final String USE_LITERAL = "literal";
-
     private Definition definition;
     private Set<String> errors;
     private ResourceBundle bundle;
@@ -86,7 +82,7 @@
     public WSIBPValidator(Definition definition) {
         this.definition = definition;
         this.errors = new HashSet<String>();
-        this.bundle = ResourceBundle.getBundle("org.apache.servicemix.soap.wsdl.WSIBP");
+        this.bundle = ResourceBundle.getBundle("org.apache.servicemix.soap.wsdl.validator.WSIBP");
     }
     
     protected void error(Code code, Binding binding) {
@@ -356,22 +352,22 @@
         // R2707: use attribute defaults to "literal" 
         List<ElementExtensible> els = WSDLUtils.getElements(operation);
         for (SOAPBody sb : WSDLUtils.getExtensions(els, SOAPBody.class)) {
-            if (sb.getUse() == null || !USE_LITERAL.equals(sb.getUse())) {
+            if (sb.getUse() == null || !WSDLUtils.WSDL1_USE_LITERAL.equals(sb.getUse()))
{
                 return false;
             }
         }
         for (SOAPHeader sh : WSDLUtils.getExtensions(els, SOAPHeader.class)) {
-            if (sh.getUse() == null || !USE_LITERAL.equals(sh.getUse())) {
+            if (sh.getUse() == null || !WSDLUtils.WSDL1_USE_LITERAL.equals(sh.getUse()))
{
                 return false;
             }
             for (SOAPHeaderFault shf : WSDLUtils.getSOAPHeaderFaults(sh)) {
-                if (shf.getUse() == null || !USE_LITERAL.equals(shf.getUse())) {
+                if (shf.getUse() == null || !WSDLUtils.WSDL1_USE_LITERAL.equals(shf.getUse()))
{
                     return false;
                 }
             }
         }
         for (SOAPFault sf : WSDLUtils.getExtensions(els, SOAPFault.class)) {
-            if (sf.getUse() == null || !USE_LITERAL.equals(sf.getUse())) {
+            if (sf.getUse() == null || !WSDLUtils.WSDL1_USE_LITERAL.equals(sf.getUse()))
{
                 return false;
             }
         }
@@ -421,9 +417,9 @@
     }
     
     private Style getStyle(String str) {
-        if (STYLE_DOCUMENT.equalsIgnoreCase(str)) {
+        if (WSDLUtils.WSDL1_STYLE_DOCUMENT.equalsIgnoreCase(str)) {
             return Style.DOCUMENT;
-        } else if (STYLE_RPC.equalsIgnoreCase(str)) {
+        } else if (WSDLUtils.WSDL1_STYLE_RPC.equalsIgnoreCase(str)) {
             return Style.RPC;
         } else {
             return null;



Mime
View raw message