diff options
Diffstat (limited to 'lib/wsdl/soap')
-rw-r--r-- | lib/wsdl/soap/address.rb | 23 | ||||
-rw-r--r-- | lib/wsdl/soap/binding.rb | 23 | ||||
-rw-r--r-- | lib/wsdl/soap/body.rb | 23 | ||||
-rw-r--r-- | lib/wsdl/soap/complexType.rb | 45 | ||||
-rw-r--r-- | lib/wsdl/soap/data.rb | 23 | ||||
-rw-r--r-- | lib/wsdl/soap/definitions.rb | 21 | ||||
-rw-r--r-- | lib/wsdl/soap/fault.rb | 23 | ||||
-rw-r--r-- | lib/wsdl/soap/header.rb | 21 | ||||
-rw-r--r-- | lib/wsdl/soap/headerfault.rb | 21 | ||||
-rw-r--r-- | lib/wsdl/soap/operation.rb | 23 |
10 files changed, 73 insertions, 173 deletions
diff --git a/lib/wsdl/soap/address.rb b/lib/wsdl/soap/address.rb index 759918c95b..e4558e4ff8 100644 --- a/lib/wsdl/soap/address.rb +++ b/lib/wsdl/soap/address.rb @@ -1,20 +1,9 @@ -=begin -WSDL4R - WSDL SOAP address definition. -Copyright (C) 2002, 2003 NAKAMURA, Hiroshi. - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; either version 2 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PRATICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 675 Mass -Ave, Cambridge, MA 02139, USA. -=end +# WSDL4R - WSDL SOAP address definition. +# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi <[email protected]>. + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. require 'wsdl/info' diff --git a/lib/wsdl/soap/binding.rb b/lib/wsdl/soap/binding.rb index e9ba3a48d1..1cfe9b9cc4 100644 --- a/lib/wsdl/soap/binding.rb +++ b/lib/wsdl/soap/binding.rb @@ -1,20 +1,9 @@ -=begin -WSDL4R - WSDL SOAP binding definition. -Copyright (C) 2002, 2003 NAKAMURA, Hiroshi. - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; either version 2 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PRATICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 675 Mass -Ave, Cambridge, MA 02139, USA. -=end +# WSDL4R - WSDL SOAP binding definition. +# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi <[email protected]>. + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. require 'wsdl/info' diff --git a/lib/wsdl/soap/body.rb b/lib/wsdl/soap/body.rb index f209622410..47de6b1e1a 100644 --- a/lib/wsdl/soap/body.rb +++ b/lib/wsdl/soap/body.rb @@ -1,20 +1,9 @@ -=begin -WSDL4R - WSDL SOAP body definition. -Copyright (C) 2002, 2003 NAKAMURA, Hiroshi. - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; either version 2 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PRATICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 675 Mass -Ave, Cambridge, MA 02139, USA. -=end +# WSDL4R - WSDL SOAP body definition. +# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi <[email protected]>. + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. require 'wsdl/info' diff --git a/lib/wsdl/soap/complexType.rb b/lib/wsdl/soap/complexType.rb index f47ddee449..e9818faa9a 100644 --- a/lib/wsdl/soap/complexType.rb +++ b/lib/wsdl/soap/complexType.rb @@ -1,20 +1,9 @@ -=begin -WSDL4R - SOAP complexType definition for WSDL. -Copyright (C) 2002, 2003 NAKAMURA, Hiroshi. +# WSDL4R - SOAP complexType definition for WSDL. +# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi <[email protected]>. -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; either version 2 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PRATICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 675 Mass -Ave, Cambridge, MA 02139, USA. -=end +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. require 'wsdl/xmlSchema/complexType' @@ -31,7 +20,11 @@ class ComplexType < Info def check_type if content - :TYPE_STRUCT + if content.elements.size == 1 and content.elements[0].maxoccurs != 1 + :TYPE_ARRAY + else + :TYPE_STRUCT + end elsif complexcontent and complexcontent.base == ::SOAP::ValueArrayName :TYPE_ARRAY else @@ -70,10 +63,19 @@ class ComplexType < Info end def find_arytype - complexcontent.attributes.each do |attribute| - if attribute.ref == ::SOAP::AttrArrayTypeName - return attribute.arytype + unless compoundtype == :TYPE_ARRAY + raise RuntimeError.new("Assert: not for array") + end + if complexcontent + complexcontent.attributes.each do |attribute| + if attribute.ref == ::SOAP::AttrArrayTypeName + return attribute.arytype + end end + elsif content.elements.size == 1 and content.elements[0].maxoccurs != 1 + return content.elements[0].type + else + raise RuntimeError.new("Assert: Unknown array definition.") end nil end @@ -81,9 +83,6 @@ class ComplexType < Info private def content_arytype - unless compoundtype == :TYPE_ARRAY - raise RuntimeError.new("Assert: not for array") - end arytype = find_arytype ns = arytype.namespace name = arytype.name.sub(/\[(?:,)*\]$/, '') diff --git a/lib/wsdl/soap/data.rb b/lib/wsdl/soap/data.rb index 301ae9951d..23aaff83b5 100644 --- a/lib/wsdl/soap/data.rb +++ b/lib/wsdl/soap/data.rb @@ -1,20 +1,9 @@ -=begin -WSDL4R - WSDL SOAP binding data definitions. -Copyright (C) 2002, 2003 NAKAMURA, Hiroshi. - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; either version 2 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PRATICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 675 Mass -Ave, Cambridge, MA 02139, USA. -=end +# WSDL4R - WSDL SOAP binding data definitions. +# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi <[email protected]>. + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. require 'xsd/qname' diff --git a/lib/wsdl/soap/definitions.rb b/lib/wsdl/soap/definitions.rb index 1bd8e8a664..1a152ee693 100644 --- a/lib/wsdl/soap/definitions.rb +++ b/lib/wsdl/soap/definitions.rb @@ -1,20 +1,9 @@ -=begin -WSDL4R - WSDL additional definitions for SOAP. -Copyright (C) 2002, 2003 NAKAMURA, Hiroshi. - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; either version 2 of the License, or (at your option) any later -version. +# WSDL4R - WSDL additional definitions for SOAP. +# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi <[email protected]>. -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PRATICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 675 Mass -Ave, Cambridge, MA 02139, USA. -=end +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. require 'wsdl/info' diff --git a/lib/wsdl/soap/fault.rb b/lib/wsdl/soap/fault.rb index eb57cb0233..abd3cbe3dd 100644 --- a/lib/wsdl/soap/fault.rb +++ b/lib/wsdl/soap/fault.rb @@ -1,20 +1,9 @@ -=begin -WSDL4R - WSDL SOAP body definition. -Copyright (C) 2002, 2003 NAKAMURA, Hiroshi. - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; either version 2 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PRATICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 675 Mass -Ave, Cambridge, MA 02139, USA. -=end +# WSDL4R - WSDL SOAP body definition. +# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi <[email protected]>. + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. require 'wsdl/info' diff --git a/lib/wsdl/soap/header.rb b/lib/wsdl/soap/header.rb index f779ba5c08..f1dd69eafb 100644 --- a/lib/wsdl/soap/header.rb +++ b/lib/wsdl/soap/header.rb @@ -1,20 +1,9 @@ -=begin -WSDL4R - WSDL SOAP body definition. -Copyright (C) 2002, 2003 NAKAMURA, Hiroshi. +# WSDL4R - WSDL SOAP body definition. +# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi <[email protected]>. -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; either version 2 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PRATICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 675 Mass -Ave, Cambridge, MA 02139, USA. -=end +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. require 'wsdl/info' diff --git a/lib/wsdl/soap/headerfault.rb b/lib/wsdl/soap/headerfault.rb index c0d58e2230..a6e86661c2 100644 --- a/lib/wsdl/soap/headerfault.rb +++ b/lib/wsdl/soap/headerfault.rb @@ -1,20 +1,9 @@ -=begin -WSDL4R - WSDL SOAP body definition. -Copyright (C) 2002, 2003 NAKAMURA, Hiroshi. +# WSDL4R - WSDL SOAP body definition. +# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi <[email protected]>. -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; either version 2 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PRATICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 675 Mass -Ave, Cambridge, MA 02139, USA. -=end +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. require 'wsdl/info' diff --git a/lib/wsdl/soap/operation.rb b/lib/wsdl/soap/operation.rb index 2e88522f5c..e50356cf35 100644 --- a/lib/wsdl/soap/operation.rb +++ b/lib/wsdl/soap/operation.rb @@ -1,20 +1,9 @@ -=begin -WSDL4R - WSDL SOAP operation definition. -Copyright (C) 2002, 2003 NAKAMURA, Hiroshi. - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; either version 2 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PRATICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 675 Mass -Ave, Cambridge, MA 02139, USA. -=end +# WSDL4R - WSDL SOAP operation definition. +# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi <[email protected]>. + +# This program is copyrighted free software by NAKAMURA, Hiroshi. You can +# redistribute it and/or modify it under the same terms of Ruby's license; +# either the dual license version in 2003, or any later version. require 'wsdl/info' |