Permalink
Browse files

added soap12 capability

  • Loading branch information...
1 parent a2c17ec commit 08cee94ac6c7a92a7d753e9a1eeb022ca26243d1 @kalski kalski committed with vinoski Mar 9, 2012
Showing with 1,449 additions and 1 deletion.
  1. +19 −0 include/soap-envelope.hrl
  2. +41 −0 include/wsdl11soap12.hrl
  3. +3 −0 include/yaws_soap.hrl
  4. +146 −0 priv/soap-envelope.xsd
  5. +143 −0 priv/wsdl11soap12.xsd
  6. +287 −0 priv/xml.xsd
  7. +1 −1 src/Makefile
  8. +809 −0 src/yaws_soap12_lib.erl
View
@@ -0,0 +1,19 @@
+%% HRL file generated by ERLSOM
+%%
+%% It is possible to change the name of the record fields.
+%%
+%% It is possible to add default values, but be aware that these will
+%% only be used when *writing* an xml document.
+
+-record('soap:UpgradeType', {anyAttribs, 'SupportedEnvelope'}).
+-record('soap:SupportedEnvType', {anyAttribs, 'qname'}).
+-record('soap:NotUnderstoodType', {anyAttribs, 'qname'}).
+-record('soap:detail', {anyAttribs, choice}).
+-record('soap:subcode', {anyAttribs, 'Value', 'Subcode'}).
+-record('soap:faultcode', {anyAttribs, 'Value', 'Subcode'}).
+-record('soap:reasontext', {anyAttribs, 'P:lang', '#text'}).
+-record('soap:faultreason', {anyAttribs, 'Text'}).
+-record('soap:Fault', {anyAttribs, 'Code', 'Reason', 'Node', 'Role', 'Detail'}).
+-record('soap:Body', {anyAttribs, choice}).
+-record('soap:Header', {anyAttribs, choice}).
+-record('soap:Envelope', {anyAttribs, 'Header', 'Body'}).
View
@@ -0,0 +1,41 @@
+%% HRL file generated by ERLSOM
+%%
+%% It is possible to change the name of the record fields.
+%%
+%% It is possible to add default values, but be aware that these will
+%% only be used when *writing* an xml document.
+
+-record('soap:tAddress', {anyAttribs, 'wsdl:required', 'location'}).
+-record('soap:tHeaderFault', {anyAttribs, 'message', 'part', 'use', 'encodingStyle', 'namespace'}).
+-record('soap:tHeader', {anyAttribs, 'wsdl:required', 'message', 'part', 'use', 'encodingStyle', 'namespace', 'headerfault'}).
+-record('soap:tFault', {anyAttribs, 'wsdl:required', 'parts', 'encodingStyle', 'use', 'namespace', 'name'}).
+-record('soap:tFaultRes', {anyAttribs, 'wsdl:required', 'parts', 'encodingStyle', 'use', 'namespace'}).
+-record('soap:tBody', {anyAttribs, 'wsdl:required', 'parts', 'encodingStyle', 'use', 'namespace'}).
+-record('soap:tOperation', {anyAttribs, 'wsdl:required', 'soapAction', 'soapActionRequired', 'style'}).
+-record('soap:tBinding', {anyAttribs, 'wsdl:required', 'transport', 'style'}).
+-record('soap:tExtensibilityElementOpenAttrs', {anyAttribs, 'wsdl:required'}).
+-record('wsdl:tDocumentation', {anyAttribs, choice}).
+-record('wsdl:tDocumented', {anyAttribs, 'documentation'}).
+-record('wsdl:tExtensibleAttributesDocumented', {anyAttribs, 'documentation'}).
+-record('wsdl:tExtensibleDocumented', {anyAttribs, 'documentation', choice}).
+-record('wsdl:anyTopLevelOptionalElement', {anyAttribs, choice}).
+-record('wsdl:tDefinitions', {anyAttribs, 'targetNamespace', 'name', 'documentation', choice, choice1}).
+-record('wsdl:tImport', {anyAttribs, 'namespace', 'location', 'documentation'}).
+-record('wsdl:tTypes', {anyAttribs, 'documentation', choice}).
+-record('wsdl:tMessage', {anyAttribs, 'name', 'documentation', choice, 'part'}).
+-record('wsdl:tPart', {anyAttribs, 'name', 'element', 'type', 'documentation'}).
+-record('wsdl:tPortType', {anyAttribs, 'name', 'documentation', 'operation'}).
+-record('wsdl:tOperation', {anyAttribs, 'name', 'parameterOrder', 'documentation', choice, choice1}).
+-record('wsdl:request-response-or-one-way-operation/SEQ1', {anyAttribs, 'output', 'fault'}).
+-record('wsdl:request-response-or-one-way-operation', {anyAttribs, 'input', 'request-response-or-one-way-operation/SEQ1'}).
+-record('wsdl:solicit-response-or-notification-operation/SEQ2', {anyAttribs, 'input', 'fault'}).
+-record('wsdl:solicit-response-or-notification-operation', {anyAttribs, 'output', 'solicit-response-or-notification-operation/SEQ2'}).
+-record('wsdl:tParam', {anyAttribs, 'name', 'message', 'documentation'}).
+-record('wsdl:tFault', {anyAttribs, 'name', 'message', 'documentation'}).
+-record('wsdl:tBinding', {anyAttribs, 'name', 'type', 'documentation', choice, 'operation'}).
+-record('wsdl:tBindingOperationMessage', {anyAttribs, 'name', 'documentation', choice}).
+-record('wsdl:tBindingOperationFault', {anyAttribs, 'name', 'documentation', choice}).
+-record('wsdl:tBindingOperation', {anyAttribs, 'name', 'documentation', choice, 'input', 'output', 'fault'}).
+-record('wsdl:tService', {anyAttribs, 'name', 'documentation', choice, 'port'}).
+-record('wsdl:tPort', {anyAttribs, 'name', 'binding', 'documentation', choice}).
+-record('wsdl:tExtensibilityElement', {anyAttribs, 'wsdl:required'}).
View
@@ -0,0 +1,3 @@
+-record(wsdl, {operations, model, module}).
+-record(port, {service, port, binding, address}).
+-record(operation, {service, port, operation, binding, address, action}).
View
@@ -0,0 +1,146 @@
+<!-- Schema defined in the SOAP Version 1.2 Part 1 specification
+ Recommendation:
+ http://www.w3.org/TR/2003/REC-soap12-part1-20030624/
+ $Id: soap-envelope.xsd,v 1.2 2006/12/20 20:43:36 ylafon Exp $
+
+ Copyright (C)2003 W3C(R) (MIT, ERCIM, Keio), All Rights Reserved.
+ W3C viability, trademark, document use and software licensing rules
+ apply.
+ http://www.w3.org/Consortium/Legal/
+
+ This document is governed by the W3C Software License [1] as
+ described in the FAQ [2].
+
+ [1] http://www.w3.org/Consortium/Legal/copyright-software-19980720
+ [2] http://www.w3.org/Consortium/Legal/IPR-FAQ-20000620.html#DTD
+-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.w3.org/2003/05/soap-envelope" targetNamespace="http://www.w3.org/2003/05/soap-envelope" elementFormDefault="qualified">
+
+ <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+
+ <!-- Envelope, header and body -->
+ <xs:element name="Envelope" type="tns:Envelope"/>
+ <xs:complexType name="Envelope">
+ <xs:sequence>
+ <xs:element ref="tns:Header" minOccurs="0"/>
+ <xs:element ref="tns:Body" minOccurs="1"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+
+ <xs:element name="Header" type="tns:Header"/>
+ <xs:complexType name="Header">
+ <xs:annotation>
+ <xs:documentation>
+ Elements replacing the wildcard MUST be namespace qualified, but can be in the targetNamespace
+ </xs:documentation>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+
+ <xs:element name="Body" type="tns:Body"/>
+ <xs:complexType name="Body">
+ <xs:sequence>
+ <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+
+ <!-- Global Attributes. The following attributes are intended to be
+ usable via qualified attribute names on any complex type referencing
+ them. -->
+ <xs:attribute name="mustUnderstand" type="xs:boolean" default="0"/>
+ <xs:attribute name="relay" type="xs:boolean" default="0"/>
+ <xs:attribute name="role" type="xs:anyURI"/>
+
+ <!-- 'encodingStyle' indicates any canonicalization conventions
+ followed in the contents of the containing element. For example, the
+ value 'http://www.w3.org/2003/05/soap-encoding' indicates the pattern
+ described in the SOAP Version 1.2 Part 2: Adjuncts Recommendation -->
+
+ <xs:attribute name="encodingStyle" type="xs:anyURI"/>
+
+ <xs:element name="Fault" type="tns:Fault"/>
+ <xs:complexType name="Fault" final="extension">
+ <xs:annotation>
+ <xs:documentation>
+ Fault reporting structure
+ </xs:documentation>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="Code" type="tns:faultcode"/>
+ <xs:element name="Reason" type="tns:faultreason"/>
+ <xs:element name="Node" type="xs:anyURI" minOccurs="0"/>
+ <xs:element name="Role" type="xs:anyURI" minOccurs="0"/>
+ <xs:element name="Detail" type="tns:detail" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="faultreason">
+ <xs:sequence>
+ <xs:element name="Text" type="tns:reasontext" minOccurs="1" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="reasontext">
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute ref="xml:lang" use="required"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:complexType name="faultcode">
+ <xs:sequence>
+ <xs:element name="Value" type="tns:faultcodeEnum"/>
+ <xs:element name="Subcode" type="tns:subcode" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:simpleType name="faultcodeEnum">
+ <xs:restriction base="xs:QName">
+ <xs:enumeration value="tns:DataEncodingUnknown"/>
+ <xs:enumeration value="tns:MustUnderstand"/>
+ <xs:enumeration value="tns:Receiver"/>
+ <xs:enumeration value="tns:Sender"/>
+ <xs:enumeration value="tns:VersionMismatch"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:complexType name="subcode">
+ <xs:sequence>
+ <xs:element name="Value" type="xs:QName"/>
+ <xs:element name="Subcode" type="tns:subcode" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="detail">
+ <xs:sequence>
+ <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+
+ <!-- Global element declaration and complex type definition for header entry returned due to a mustUnderstand fault -->
+ <xs:element name="NotUnderstood" type="tns:NotUnderstoodType"/>
+ <xs:complexType name="NotUnderstoodType">
+ <xs:attribute name="qname" type="xs:QName" use="required"/>
+ </xs:complexType>
+
+
+ <!-- Global element and associated types for managing version transition as described in Appendix A of the SOAP Version 1.2 Part 1 Recommendation --> <xs:complexType name="SupportedEnvType">
+ <xs:attribute name="qname" type="xs:QName" use="required"/>
+ </xs:complexType>
+
+ <xs:element name="Upgrade" type="tns:UpgradeType"/>
+ <xs:complexType name="UpgradeType">
+ <xs:sequence>
+ <xs:element name="SupportedEnvelope" type="tns:SupportedEnvType" minOccurs="1" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+
+
+</xs:schema>
View
@@ -0,0 +1,143 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+
+Copyright 2001 - 2006, International Business Machines Corporation and Microsoft Corporation
+All Rights Reserved
+
+License for WSDL 1.1 Binding Extension for SOAP 1.2 Schema Files
+
+The Authors grant permission to copy and distribute the WSDL 1.1 Binding Extension for SOAP 1.2 Schema Files in any medium without fee or royalty as long as this notice and license are distributed with them. The originals of these files can be located at:
+
+http://schemas.xmlsoap.org/wsdl/soap12/wsdl11soap12.xsd
+
+THESE SCHEMA FILES ARE PROVIDED "AS IS," AND THE AUTHORS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THESE FILES, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT OR TITLE. THE AUTHORS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO ANY USE OR DISTRIBUTION OF THESE FILES.
+
+The name and trademarks of the Authors may NOT be used in any manner, including advertising or publicity pertaining to these files or any program or service that uses these files, written prior permission. Title to copyright in these files will at all times remain with the Authors.
+
+No other rights are granted by implication, estoppel or otherwise.
+
+
+-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsoap12="http://schemas.xmlsoap.org/wsdl/soap12/"
+ targetNamespace="http://schemas.xmlsoap.org/wsdl/soap12/" >
+
+ <xs:import namespace = "http://schemas.xmlsoap.org/wsdl/" />
+
+ <xs:complexType name="tExtensibilityElementOpenAttrs" >
+ <xs:complexContent>
+ <xs:extension base="wsdl:tExtensibilityElement" >
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:element name="binding" type="wsoap12:tBinding" />
+ <xs:complexType name="tBinding" >
+ <xs:complexContent>
+ <xs:extension base="wsoap12:tExtensibilityElementOpenAttrs" >
+ <xs:attribute name="transport" type="xs:anyURI" use="required" />
+ <xs:attribute name="style" type="wsoap12:tStyleChoice" use="optional" />
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:simpleType name="tStyleChoice" >
+ <xs:restriction base="xs:string" >
+ <xs:enumeration value="rpc" />
+ <xs:enumeration value="document" />
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:element name="operation" type="wsoap12:tOperation" />
+ <xs:complexType name="tOperation" >
+ <xs:complexContent>
+ <xs:extension base="wsoap12:tExtensibilityElementOpenAttrs" >
+ <xs:attribute name="soapAction" type="xs:anyURI" use="optional" />
+ <xs:attribute name="soapActionRequired" type="xs:boolean" use="optional" />
+ <xs:attribute name="style" type="wsoap12:tStyleChoice" use="optional" />
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:element name="body" type="wsoap12:tBody" />
+ <xs:attributeGroup name="tBodyAttributes" >
+ <!-- The encodingStyle attribute is now a single URI, instead of a list of URIs -->
+ <xs:attribute name="encodingStyle" type="xs:anyURI" use="optional" />
+ <xs:attribute name="use" type="wsoap12:useChoice" use="optional" />
+ <xs:attribute name="namespace" type="xs:anyURI" use="optional" />
+ </xs:attributeGroup>
+ <xs:simpleType name="tParts">
+ <xs:list itemType="xs:NMTOKEN"/>
+ </xs:simpleType>
+ <xs:complexType name="tBody" >
+ <xs:complexContent>
+ <xs:extension base="wsoap12:tExtensibilityElementOpenAttrs" >
+ <xs:attribute name="parts" type="wsoap12:tParts" use="optional" />
+ <xs:attributeGroup ref = "wsoap12:tBodyAttributes" />
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:simpleType name="useChoice" >
+ <xs:restriction base="xs:string" >
+ <xs:enumeration value="literal" />
+ <xs:enumeration value="encoded" />
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:element name="fault" type="wsoap12:tFault" />
+ <xs:complexType name="tFaultRes" abstract="true" >
+ <xs:complexContent>
+ <xs:restriction base="wsoap12:tBody" >
+ <xs:attribute ref="wsdl:required" use="optional" />
+ <xs:attribute name="parts" type="wsoap12:tParts" use="prohibited" />
+ <xs:attributeGroup ref="wsoap12:tBodyAttributes" />
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="tFault" >
+ <xs:complexContent>
+ <xs:extension base="wsoap12:tFaultRes">
+ <xs:attribute name="name" type="xs:NCName" use="required" />
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+
+ <xs:element name="header" type="wsoap12:tHeader" />
+ <xs:attributeGroup name="tHeaderAttributes" >
+ <xs:attribute name="message" type="xs:QName" use="required" />
+ <xs:attribute name="part" type="xs:NMTOKEN" use="required" />
+ <xs:attribute name="use" type="wsoap12:useChoice" use="required" />
+ <xs:attribute name="encodingStyle" type="xs:anyURI" use="optional" />
+ <xs:attribute name="namespace" type="xs:anyURI" use="optional" />
+ </xs:attributeGroup>
+ <xs:complexType name="tHeader" >
+ <xs:complexContent>
+ <xs:extension base="wsoap12:tExtensibilityElementOpenAttrs" >
+ <xs:sequence>
+ <xs:element ref="wsoap12:headerfault" minOccurs="0" maxOccurs="unbounded" />
+ </xs:sequence>
+ <xs:attributeGroup ref="wsoap12:tHeaderAttributes" />
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:element name="headerfault" type="wsoap12:tHeaderFault" />
+ <xs:complexType name="tHeaderFault" >
+ <xs:attributeGroup ref="wsoap12:tHeaderAttributes" />
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+
+ <xs:element name="address" type="wsoap12:tAddress" />
+ <xs:complexType name="tAddress" >
+ <xs:complexContent>
+ <xs:extension base="wsoap12:tExtensibilityElementOpenAttrs" >
+ <xs:attribute name="location" type="xs:anyURI" use="required" />
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+</xs:schema>
Oops, something went wrong.

0 comments on commit 08cee94

Please sign in to comment.