[cl-soap-cvs] CVS update: cl-soap/src/xsd.lisp cl-soap/src/namespaces.lisp cl-soap/src/wsdl.lisp

Sven Van Caekenberghe scaekenberghe at common-lisp.net
Thu Sep 15 13:37:37 UTC 2005


Update of /project/cl-soap/cvsroot/cl-soap/src
In directory common-lisp.net:/tmp/cvs-serv23928/src

Modified Files:
	namespaces.lisp wsdl.lisp 
Added Files:
	xsd.lisp 
Log Message:
added first step towards partial XML Schema Definition implmentation to support WSDL types schema

Date: Thu Sep 15 15:37:35 2005
Author: scaekenberghe



Index: cl-soap/src/namespaces.lisp
diff -u cl-soap/src/namespaces.lisp:1.5 cl-soap/src/namespaces.lisp:1.6
--- cl-soap/src/namespaces.lisp:1.5	Mon Sep 12 13:24:01 2005
+++ cl-soap/src/namespaces.lisp	Thu Sep 15 15:37:34 2005
@@ -1,6 +1,6 @@
 ;;;; -*- mode: lisp -*-
 ;;;;
-;;;; $Id: namespaces.lisp,v 1.5 2005/09/12 11:24:01 scaekenberghe Exp $
+;;;; $Id: namespaces.lisp,v 1.6 2005/09/15 13:37:34 scaekenberghe Exp $
 ;;;;
 ;;;; Definition of some standard XML namespaces commonly needed for SOAP
 ;;;;
@@ -32,7 +32,9 @@
 
 (defpackage :xsd
   (:nicknames "xsd")
-  (:export)
+  (:export "schema" "element" "simpleType" "complexType" 
+           "sequence" "choice" "all" "attribute"
+           "restriction" "maxLength" "pattern" "list" "union" "enumeration")
   (:documentation "Package for symbols in the XML Schema Definition XML Namespace"))
 
 (defparameter *xsd-ns* (s-xml:register-namespace +xsd-ns-uri+ "xsd" :xsd))


Index: cl-soap/src/wsdl.lisp
diff -u cl-soap/src/wsdl.lisp:1.5 cl-soap/src/wsdl.lisp:1.6
--- cl-soap/src/wsdl.lisp:1.5	Tue Sep 13 21:23:48 2005
+++ cl-soap/src/wsdl.lisp	Thu Sep 15 15:37:34 2005
@@ -1,6 +1,6 @@
 ;;;; -*- mode: lisp -*-
 ;;;;
-;;;; $Id: wsdl.lisp,v 1.5 2005/09/13 19:23:48 scaekenberghe Exp $
+;;;; $Id: wsdl.lisp,v 1.6 2005/09/15 13:37:34 scaekenberghe Exp $
 ;;;;
 ;;;; The basic WSDL protocol: we parse the generic and soap specific parts
 ;;;;
@@ -79,10 +79,6 @@
 (defclass wsdl-message (abstract-wsdl-definition)
   ((parts :accessor get-parts :initarg :parts :initform nil)))
 
-(defclass wsdl-type (abstract-wsdl-definition)
-  ;; to be finished !!!
-  ((data-type-definitions)))
-
 ;;; WSDL SOAP Model Extension Elements
 
 (defclass wsdl-soap-address ()
@@ -122,6 +118,13 @@
 
 ;; one day we should handle <import> statements ;-)
 
+(defun lxml->types (lxml)
+  (let (types)
+    (loop :for element :in (rest lxml) :do
+          (if (eql (lxml-get-tag element) 'xsd:|schema|)
+              (push (lxml->schema-definition element) types)))
+    types))
+
 (defun lxml->operation-element (lxml)
   (let* ((attributes (lxml-get-attributes lxml))
          (message (getf attributes :|message|))
@@ -247,7 +250,8 @@
                                             (rest element)))
                 (wsdl-soap:|address| (setf (get-extension wsdl-port)
                                            (make-instance 'wsdl-soap-address
-                                                          :location (getf (lxml-get-attributes element) :|location|))))))
+                                                          :location (getf (lxml-get-attributes element) 
+                                                                          :|location|))))))
     wsdl-port))
 
 (defun lxml->service (lxml)
@@ -275,7 +279,8 @@
                 :do (case (lxml-get-tag element)
                       (wsdl:|documentation| (setf (get-documentation wsdl-document-definitions)
                                                   (rest element)))
-                      (wsdl:|types|)
+                      (wsdl:|types| (setf (get-types wsdl-document-definitions)
+                                          (lxml->types element)))
                       (wsdl:|message| (push (lxml->message element) 
                                             (get-messages wsdl-document-definitions)))
                       (wsdl:|portType| (push (lxml->port-type element)




More information about the Cl-soap-cvs mailing list