-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed namespace resolution in case of complexType extension. (#1145)
* Adding complex wsdl test "should parse complex wsdls" in file "wsdl-parse-test.js". * Fixed namespace resolution in case of complexType extension. Co-authored-by: Stephane Tondini <stondini@cbhbank.com>
- Loading branch information
Showing
9 changed files
with
436 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xsd:schema targetNamespace="http://test-soap.com/api/common/messages" | ||
xmlns:tns="http://test-soap.com/api/common/messages" | ||
xmlns:xsd="http://www.w3.org/2001/XMLSchema" | ||
elementFormDefault="qualified" | ||
version="5.0"> | ||
|
||
<xsd:annotation> | ||
<xsd:documentation>Common Messages</xsd:documentation> | ||
</xsd:annotation> | ||
|
||
<xsd:complexType name="errorDetailParameter"> | ||
<xsd:sequence> | ||
<xsd:element name="key" type="xsd:string"/> | ||
<xsd:element name="value" type="xsd:string"/> | ||
</xsd:sequence> | ||
</xsd:complexType> | ||
|
||
<xsd:complexType name="errorDetailParameters"> | ||
<xsd:sequence> | ||
<xsd:element name="parameter" type="tns:errorDetailParameter" maxOccurs="unbounded"/> | ||
</xsd:sequence> | ||
</xsd:complexType> | ||
|
||
<xsd:element name="errorDetail"> | ||
<xsd:complexType> | ||
<xsd:sequence> | ||
<xsd:element name="code" type="xsd:string"/> | ||
<xsd:element name="message" type="xsd:string"/> | ||
<xsd:element name="parameters" type="tns:errorDetailParameters" minOccurs="0"/> | ||
<xsd:element name="staleData" type="xsd:boolean" default="false"/> | ||
</xsd:sequence> | ||
</xsd:complexType> | ||
</xsd:element> | ||
|
||
</xsd:schema> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xsd:schema targetNamespace="http://test-soap.com/api/common/types" | ||
xmlns:tns="http://test-soap.com/api/common/types" | ||
xmlns:xsd="http://www.w3.org/2001/XMLSchema" | ||
elementFormDefault="qualified" | ||
version="5.0"> | ||
|
||
<xsd:annotation> | ||
<xsd:documentation>Common Types</xsd:documentation> | ||
</xsd:annotation> | ||
|
||
<xsd:simpleType name="mandatoryStringType"> | ||
<xsd:restriction base="xsd:string"> | ||
<xsd:minLength value="1"/> | ||
</xsd:restriction> | ||
</xsd:simpleType> | ||
|
||
<xsd:simpleType name="mandatoryStringWithMaxLength35Type"> | ||
<xsd:restriction base="tns:mandatoryStringType"> | ||
<xsd:maxLength value="35"/> | ||
</xsd:restriction> | ||
</xsd:simpleType> | ||
|
||
<xsd:simpleType name="mandatoryStringWithMaxLength70Type"> | ||
<xsd:restriction base="tns:mandatoryStringType"> | ||
<xsd:maxLength value="70"/> | ||
</xsd:restriction> | ||
</xsd:simpleType> | ||
|
||
<xsd:simpleType name="emailAddressType"> | ||
<xsd:restriction base="tns:mandatoryStringType"> | ||
<xsd:maxLength value="256"/> | ||
</xsd:restriction> | ||
</xsd:simpleType> | ||
|
||
<xsd:simpleType name="correspondenceLanguageType"> | ||
<xsd:restriction base="xsd:string"> | ||
<xsd:enumeration value="GER"/> | ||
<xsd:enumeration value="ITA"/> | ||
<xsd:enumeration value="FRE"/> | ||
<xsd:enumeration value="ENG"/> | ||
</xsd:restriction> | ||
</xsd:simpleType> | ||
|
||
<xsd:simpleType name="idType"> | ||
<xsd:restriction base="tns:mandatoryStringType"> | ||
<xsd:pattern value="ID[A-Z0-9]{32}"/> | ||
</xsd:restriction> | ||
</xsd:simpleType> | ||
|
||
<xsd:simpleType name="lookupType"> | ||
<xsd:restriction base="xsd:string"> | ||
<xsd:enumeration value="ALLOWED"/> | ||
<xsd:enumeration value="NOT_ALLOWED"/> | ||
<xsd:enumeration value="UNDECIDED"/> | ||
</xsd:restriction> | ||
</xsd:simpleType> | ||
|
||
<xsd:simpleType name="postalCodeType"> | ||
<xsd:restriction base="tns:mandatoryStringType"> | ||
<xsd:maxLength value="9"/> | ||
</xsd:restriction> | ||
</xsd:simpleType> | ||
|
||
<xsd:simpleType name="countryCodeType"> | ||
<xsd:annotation> | ||
<xsd:documentation>ISO-3166</xsd:documentation> | ||
</xsd:annotation> | ||
<xsd:restriction base="xsd:string"> | ||
<xsd:pattern value="[A-Z]{2}"/> | ||
</xsd:restriction> | ||
</xsd:simpleType> | ||
|
||
<xsd:complexType name="recipientAddress"> | ||
<xsd:sequence> | ||
<xsd:element name="streetName" type="tns:mandatoryStringWithMaxLength70Type"/> | ||
<xsd:element name="postalCode" type="tns:postalCodeType"/> | ||
<xsd:element name="city" type="tns:mandatoryStringWithMaxLength35Type"/> | ||
<xsd:element name="countryCode" type="tns:countryCodeType"/> | ||
</xsd:sequence> | ||
</xsd:complexType> | ||
|
||
<xsd:complexType name="commonAddress" abstract="true"> | ||
<xsd:sequence> | ||
<xsd:element name="address" type="tns:recipientAddress"/> | ||
</xsd:sequence> | ||
</xsd:complexType> | ||
|
||
<xsd:complexType name="privateAddress"> | ||
<xsd:complexContent> | ||
<xsd:extension base="tns:commonAddress"/> | ||
</xsd:complexContent> | ||
</xsd:complexType> | ||
|
||
<xsd:complexType name="companyAddress"> | ||
<xsd:complexContent> | ||
<xsd:extension base="tns:commonAddress"> | ||
<xsd:sequence> | ||
<xsd:element name="companyName" type="tns:mandatoryStringWithMaxLength70Type"/> | ||
</xsd:sequence> | ||
</xsd:extension> | ||
</xsd:complexContent> | ||
</xsd:complexType> | ||
|
||
<xsd:simpleType name="userIdType"> | ||
<xsd:restriction base="tns:mandatoryStringType"> | ||
<xsd:pattern value="EBID[A-Z0-9]{32}"/> | ||
</xsd:restriction> | ||
</xsd:simpleType> | ||
|
||
</xsd:schema> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<wsdl:definitions name="RegistrationCommonApi" | ||
targetNamespace="http://test-soap.com/api/registration" | ||
xmlns:tns="http://test-soap.com/api/registration" | ||
xmlns:registrationMessages="http://test-soap.com/api/registration/messages" | ||
xmlns:commonMessages="http://test-soap.com/api/common/messages" | ||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" | ||
xmlns:xsd="http://www.w3.org/2001/XMLSchema" | ||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" | ||
> | ||
|
||
<wsdl:documentation>Registration Web Service Definition</wsdl:documentation> | ||
|
||
<wsdl:types> | ||
<xsd:schema targetNamespace="http://test-soap.com/api/registration" elementFormDefault="qualified"> | ||
<xsd:import namespace="http://test-soap.com/api/registration/messages" schemaLocation="registration-messages-common.xsd"/> | ||
<xsd:import namespace="http://test-soap.com/api/common/messages" schemaLocation="common-messages.xsd"/> | ||
<xsd:import namespace="http://test-soap.com/api/common/types" schemaLocation="common-types.xsd"/> | ||
</xsd:schema> | ||
</wsdl:types> | ||
|
||
<wsdl:message name="registerUserRequestMessage"> | ||
<wsdl:part name="registerUserRequest" element="registrationMessages:registerUserRequest"/> | ||
</wsdl:message> | ||
<wsdl:message name="registerUserResponseMessage"> | ||
<wsdl:part name="registerUserResponse" element="registrationMessages:registerUserResponse"/> | ||
</wsdl:message> | ||
|
||
<wsdl:portType name="registrationCommonPortType"> | ||
|
||
<wsdl:operation name="registerUser"> | ||
<wsdl:input name="registerUserRequestMessage" message="tns:registerUserRequestMessage"/> | ||
<wsdl:output name="registerUserResponseMessage" message="tns:registerUserResponseMessage"/> | ||
<wsdl:fault name="errorDetail" message="tns:errorDetailMessage"/> | ||
</wsdl:operation> | ||
|
||
</wsdl:portType> | ||
|
||
<wsdl:binding name="registrationCommonHttpSoapBinding" type="tns:registrationCommonPortType"> | ||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> | ||
|
||
<wsdl:operation name="registerUser"> | ||
<soap:operation soapAction="http://test-soap.com/api/registration/registerUser"/> | ||
<wsdl:input> | ||
<soap:body parts="registerUserRequest" use="literal"/> | ||
</wsdl:input> | ||
<wsdl:output> | ||
<soap:body parts="registerUserResponse" use="literal"/> | ||
</wsdl:output> | ||
<wsdl:fault name="errorDetail"> | ||
<soap:fault name="errorDetail" use="literal"/> | ||
</wsdl:fault> | ||
</wsdl:operation> | ||
|
||
</wsdl:binding> | ||
|
||
<wsdl:service name="registrationCommon"> | ||
<wsdl:port name="registrationCommonHttpSoapPort" binding="tns:registrationCommonHttpSoapBinding"> | ||
<soap:address location="https://{{SERVER}}/api/api/v5/registration"/> | ||
</wsdl:port> | ||
</wsdl:service> | ||
|
||
</wsdl:definitions> |
Oops, something went wrong.
@stondini can you please commit realization for
open_wsdl
? iam trying to use xmlToObject, but facing an errorTypeError: Cannot read property 'messages' of undefined