-
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.
Fix missing namespace declaration on array if the namespace is alread…
…y declared with another prefix. (#923)
- Loading branch information
Showing
11 changed files
with
205 additions
and
4 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
2 changes: 1 addition & 1 deletion
2
...est-response-samples/UpdateProfile__correct_namespaces_for_elements_with_base/request.xml
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 |
---|---|---|
@@ -1 +1 @@ | ||
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://www.bigdatacollect.or" xmlns:c="http://www.bigdatacollect.or/Common/Types" xmlns:n="http://www.bigdatacollect.or/Name/Types"><soap:Body><n:UpdateProfileRequest xmlns:n="http://www.bigdatacollect.or/Name/Types" xmlns="http://www.bigdatacollect.or/Name/Types"><n:Profile><n:IDs><c:UniqueID source="TESTSOURCE">100</c:UniqueID></n:IDs><n:Addresses><n:NameAddress><c:AddressLine xmlns:c="http://www.bigdatacollect.or/Common/Types">Another Address</c:AddressLine></n:NameAddress><n:NameAddress><c:AddressLine xmlns:c="http://www.bigdatacollect.or/Common/Types">My Address</c:AddressLine></n:NameAddress></n:Addresses><n:Phones><n:NamePhone primary="true"><c:PhoneData xmlns:c="http://www.bigdatacollect.or/Common/Types"><c:PhoneNumber>123</c:PhoneNumber></c:PhoneData></n:NamePhone><n:NamePhone primary="false"><c:PhoneData xmlns:c="http://www.bigdatacollect.or/Common/Types"><c:PhoneNumber>456</c:PhoneNumber></c:PhoneData></n:NamePhone></n:Phones></n:Profile></n:UpdateProfileRequest></soap:Body></soap:Envelope> | ||
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://www.bigdatacollect.or" xmlns:c="http://www.bigdatacollect.or/Common/Types" xmlns:n="http://www.bigdatacollect.or/Name/Types"><soap:Body><n:UpdateProfileRequest xmlns:n="http://www.bigdatacollect.or/Name/Types" xmlns="http://www.bigdatacollect.or/Name/Types"><n:Profile><n:IDs><c:UniqueID source="TESTSOURCE" xmlns:c="http://www.bigdatacollect.or/Common/Types">100</c:UniqueID></n:IDs><n:Addresses><n:NameAddress><c:AddressLine xmlns:c="http://www.bigdatacollect.or/Common/Types">Another Address</c:AddressLine></n:NameAddress><n:NameAddress><c:AddressLine xmlns:c="http://www.bigdatacollect.or/Common/Types">My Address</c:AddressLine></n:NameAddress></n:Addresses><n:Phones><n:NamePhone primary="true"><c:PhoneData xmlns:c="http://www.bigdatacollect.or/Common/Types"><c:PhoneNumber>123</c:PhoneNumber></c:PhoneData></n:NamePhone><n:NamePhone primary="false"><c:PhoneData xmlns:c="http://www.bigdatacollect.or/Common/Types"><c:PhoneNumber>456</c:PhoneNumber></c:PhoneData></n:NamePhone></n:Phones></n:Profile></n:UpdateProfileRequest></soap:Body></soap:Envelope> |
2 changes: 1 addition & 1 deletion
2
...t-response-samples/UpdateProfile__correct_namespaces_in_sequence_with_imports/request.xml
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 |
---|---|---|
@@ -1 +1 @@ | ||
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://www.bigdatacollect.or" xmlns:c="http://www.bigdatacollect.or/Common/Types" xmlns:n="http://www.bigdatacollect.or/Name/Types"><soap:Body><n:UpdateProfileRequest xmlns:n="http://www.bigdatacollect.or/Name/Types" xmlns="http://www.bigdatacollect.or/Name/Types"><n:Profile><n:IDs><c:UniqueID source="TESTSOURCE">100</c:UniqueID></n:IDs><n:Phones><n:NamePhone primary="true"><n:IDs><c:UniqueID source="TEST">1</c:UniqueID></n:IDs></n:NamePhone><n:NamePhone primary="false"><n:IDs><c:UniqueID source="TEST">2</c:UniqueID></n:IDs></n:NamePhone></n:Phones></n:Profile></n:UpdateProfileRequest></soap:Body></soap:Envelope> | ||
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://www.bigdatacollect.or" xmlns:c="http://www.bigdatacollect.or/Common/Types" xmlns:n="http://www.bigdatacollect.or/Name/Types"><soap:Body><n:UpdateProfileRequest xmlns:n="http://www.bigdatacollect.or/Name/Types" xmlns="http://www.bigdatacollect.or/Name/Types"><n:Profile><n:IDs><c:UniqueID source="TESTSOURCE" xmlns:c="http://www.bigdatacollect.or/Common/Types">100</c:UniqueID></n:IDs><n:Phones><n:NamePhone primary="true"><n:IDs><c:UniqueID source="TEST" xmlns:c="http://www.bigdatacollect.or/Common/Types">1</c:UniqueID></n:IDs></n:NamePhone><n:NamePhone primary="false"><n:IDs><c:UniqueID source="TEST" xmlns:c="http://www.bigdatacollect.or/Common/Types">2</c:UniqueID></n:IDs></n:NamePhone></n:Phones></n:Profile></n:UpdateProfileRequest></soap:Body></soap:Envelope> |
43 changes: 43 additions & 0 deletions
43
test/request-response-samples/UpdateProfile__correct_namespaces_other_prefixes/Common.xsd
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,43 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xs:schema xmlns:tns="http://www.bigdatacollect.or/Common/Types" xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
targetNamespace="http://www.bigdatacollect.or/Common/Types" elementFormDefault="qualified" | ||
attributeFormDefault="unqualified"> | ||
<xs:complexType name="Phone"> | ||
<xs:sequence> | ||
<xs:element name="PhoneData"> | ||
<xs:complexType> | ||
<xs:sequence> | ||
<xs:element name="PhoneNumber" type="xs:string"/> | ||
<xs:element name="Comment" type="xs:string" minOccurs="0"/> | ||
</xs:sequence> | ||
</xs:complexType> | ||
</xs:element> | ||
</xs:sequence> | ||
<xs:attribute name="phoneType" type="xs:string"/> | ||
<xs:attribute name="phoneRole" type="xs:string"/> | ||
</xs:complexType> | ||
<xs:complexType name="ResultStatus"> | ||
<xs:sequence> | ||
<xs:element name="IDs" type="tns:UniqueIDList" minOccurs="0"/> | ||
</xs:sequence> | ||
<xs:attribute name="resultStatusFlag" type="tns:ResultStatusFlag"/> | ||
</xs:complexType> | ||
<xs:complexType name="UniqueID"> | ||
<xs:simpleContent> | ||
<xs:extension base="xs:string"> | ||
<xs:attribute name="source" type="xs:string"/> | ||
</xs:extension> | ||
</xs:simpleContent> | ||
</xs:complexType> | ||
<xs:complexType name="UniqueIDList"> | ||
<xs:sequence> | ||
<xs:element name="UniqueID" type="tns:UniqueID" minOccurs="0" maxOccurs="unbounded"/> | ||
</xs:sequence> | ||
</xs:complexType> | ||
<xs:simpleType name="ResultStatusFlag"> | ||
<xs:restriction base="xs:string"> | ||
<xs:enumeration value="FAIL"/> | ||
<xs:enumeration value="SUCCESS"/> | ||
</xs:restriction> | ||
</xs:simpleType> | ||
</xs:schema> |
47 changes: 47 additions & 0 deletions
47
test/request-response-samples/UpdateProfile__correct_namespaces_other_prefixes/Name.xsd
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,47 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xs:schema xmlns:common="http://www.bigdatacollect.or/Common/Types" xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
xmlns:tns="http://www.bigdatacollect.or/Name/Types" | ||
targetNamespace="http://www.bigdatacollect.or/Name/Types" elementFormDefault="qualified" | ||
attributeFormDefault="unqualified"> | ||
<xs:import namespace="http://www.bigdatacollect.or/Common/Types" schemaLocation="Common.xsd"/> | ||
<xs:element name="Profile"/> | ||
<xs:complexType name="NamePhone"> | ||
<xs:complexContent> | ||
<xs:extension base="common:Phone"> | ||
<xs:sequence> | ||
<xs:element name="IDs" type="common:UniqueIDList" minOccurs="0"/> | ||
</xs:sequence> | ||
<xs:attribute name="primary" type="xs:boolean"/> | ||
</xs:extension> | ||
</xs:complexContent> | ||
</xs:complexType> | ||
<xs:complexType name="NamePhoneList"> | ||
<xs:annotation> | ||
<xs:documentation>Collection of NamePhone</xs:documentation> | ||
</xs:annotation> | ||
<xs:sequence> | ||
<xs:element name="NamePhone" type="tns:NamePhone" minOccurs="0" maxOccurs="unbounded"/> | ||
</xs:sequence> | ||
</xs:complexType> | ||
<xs:complexType name="Profile"> | ||
<xs:sequence> | ||
<xs:element name="IDs" type="common:UniqueIDList" minOccurs="0"/> | ||
<xs:element name="Phones" type="tns:NamePhoneList" minOccurs="0"/> | ||
</xs:sequence> | ||
</xs:complexType> | ||
<xs:element name="UpdateProfileRequest"> | ||
<xs:complexType> | ||
<xs:sequence> | ||
<xs:element name="Profile" type="tns:Profile"/> | ||
<xs:element name="ResortId" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> | ||
</xs:sequence> | ||
</xs:complexType> | ||
</xs:element> | ||
<xs:element name="UpdateProfileResponse"> | ||
<xs:complexType> | ||
<xs:sequence> | ||
<xs:element name="Result" type="common:ResultStatus"/> | ||
</xs:sequence> | ||
</xs:complexType> | ||
</xs:element> | ||
</xs:schema> |
48 changes: 48 additions & 0 deletions
48
test/request-response-samples/UpdateProfile__correct_namespaces_other_prefixes/request.json
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,48 @@ | ||
{ | ||
"Profile": { | ||
"IDs": { | ||
"UniqueID": [ | ||
{ | ||
"attributes": { | ||
"source": "TESTSOURCE" | ||
}, | ||
"$value": 100 | ||
} | ||
] | ||
}, | ||
"Phones": { | ||
"NamePhone": [ | ||
{ | ||
"attributes": { | ||
"primary": true | ||
}, | ||
"IDs": { | ||
"UniqueID": [ | ||
{ | ||
"attributes": { | ||
"source": "TEST" | ||
}, | ||
"$value": 1 | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"attributes": { | ||
"primary": false | ||
}, | ||
"IDs": { | ||
"UniqueID": [ | ||
{ | ||
"attributes": { | ||
"source": "TEST" | ||
}, | ||
"$value": 2 | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
test/request-response-samples/UpdateProfile__correct_namespaces_other_prefixes/request.xml
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 @@ | ||
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://www.bigdatacollect.or" xmlns:c="http://www.bigdatacollect.or/Common/Types" xmlns:n="http://www.bigdatacollect.or/Name/Types"><soap:Body><n:UpdateProfileRequest xmlns:n="http://www.bigdatacollect.or/Name/Types" xmlns="http://www.bigdatacollect.or/Name/Types"><n:Profile><n:IDs><common:UniqueID source="TESTSOURCE" xmlns:common="http://www.bigdatacollect.or/Common/Types">100</common:UniqueID></n:IDs><n:Phones><n:NamePhone primary="true"><n:IDs><common:UniqueID source="TEST" xmlns:common="http://www.bigdatacollect.or/Common/Types">1</common:UniqueID></n:IDs></n:NamePhone><n:NamePhone primary="false"><n:IDs><common:UniqueID source="TEST" xmlns:common="http://www.bigdatacollect.or/Common/Types">2</common:UniqueID></n:IDs></n:NamePhone></n:Phones></n:Profile></n:UpdateProfileRequest></soap:Body></soap:Envelope> |
15 changes: 15 additions & 0 deletions
15
test/request-response-samples/UpdateProfile__correct_namespaces_other_prefixes/response.json
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,15 @@ | ||
{ | ||
"Result":{ | ||
"attributes": { | ||
"resultStatusFlag": "SUCCESS" | ||
}, | ||
"IDs": { | ||
"UniqueID": { | ||
"attributes": { | ||
"source": "TESTSOURCE" | ||
}, | ||
"$value": "100" | ||
} | ||
} | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
test/request-response-samples/UpdateProfile__correct_namespaces_other_prefixes/response.xml
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 @@ | ||
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><ns3:UpdateProfileResponse xmlns:ns3="http://www.bigdatacollect.or/Name/Types" xmlns="http://www.bigdatacollect.or/Common/Types"><ns3:Result resultStatusFlag="SUCCESS"><IDs><UniqueID source="TESTSOURCE">100</UniqueID></IDs></ns3:Result></ns3:UpdateProfileResponse></S:Body></S:Envelope> |
43 changes: 43 additions & 0 deletions
43
test/request-response-samples/UpdateProfile__correct_namespaces_other_prefixes/soap.wsdl
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,43 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" | ||
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.bigdatacollect.or" | ||
xmlns:c="http://www.bigdatacollect.or/Common/Types" | ||
xmlns:n="http://www.bigdatacollect.or/Name/Types" | ||
xmlns:ns="http://schemas.xmlsoap.org/soap/encoding/" | ||
targetNamespace="http://www.bigdatacollect.or"> | ||
<wsdl:types> | ||
<xs:schema> | ||
<xs:import namespace="http://www.bigdatacollect.or/Common/Types" schemaLocation="Common.xsd"/> | ||
<xs:import namespace="http://www.bigdatacollect.or/Name/Types" schemaLocation="Name.xsd"/> | ||
</xs:schema> | ||
</wsdl:types> | ||
<wsdl:message name="UpdateProfileRequest"> | ||
<wsdl:part name="UpdateProfileRequest" element="n:UpdateProfileRequest"/> | ||
</wsdl:message> | ||
<wsdl:message name="UpdateProfileResponse"> | ||
<wsdl:part name="UpdateProfileResponse" element="n:UpdateProfileResponse"/> | ||
</wsdl:message> | ||
<wsdl:portType name="NamePortType"> | ||
<wsdl:operation name="UpdateProfile"> | ||
<wsdl:input message="tns:UpdateProfileRequest"/> | ||
<wsdl:output message="tns:UpdateProfileResponse"/> | ||
</wsdl:operation> | ||
</wsdl:portType> | ||
<wsdl:binding name="NameBinding" type="tns:NamePortType"> | ||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> | ||
<wsdl:operation name="UpdateProfile"> | ||
<soap:operation soapAction="http://www.bigdatacollect.or#UpdateProfile" style="document"/> | ||
<wsdl:input> | ||
<soap:body use="literal"/> | ||
</wsdl:input> | ||
<wsdl:output> | ||
<soap:body use="literal"/> | ||
</wsdl:output> | ||
</wsdl:operation> | ||
</wsdl:binding> | ||
<wsdl:service name="BigDataCollectorService"> | ||
<wsdl:port name="NamePortType" binding="tns:NameBinding"> | ||
<soap:address location="http://www.bigdatacollect.or/"/> | ||
</wsdl:port> | ||
</wsdl:service> | ||
</wsdl:definitions> |
2 changes: 1 addition & 1 deletion
2
test/request-response-samples/UpdateProfile__correct_ns_context/request.xml
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 |
---|---|---|
@@ -1 +1 @@ | ||
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://www.bigdatacollect.or" xmlns:c="http://www.bigdatacollect.or/Common/Types" xmlns:n="http://www.bigdatacollect.or/Name/Types"><soap:Body><n:UpdateProfileRequest xmlns:n="http://www.bigdatacollect.or/Name/Types" xmlns="http://www.bigdatacollect.or/Name/Types"><n:Profile><n:IDs><c:UniqueID source="TESTSOURCE">100</c:UniqueID><c:UniqueID source="TESTSOURCE2">100</c:UniqueID><c:UniqueID source="TESTSOURCE3">100</c:UniqueID></n:IDs><n:Addresses><n:NameAddress><c:AddressLine xmlns:c="http://www.bigdatacollect.or/Common/Types">Another Address</c:AddressLine></n:NameAddress><n:NameAddress><c:AddressLine xmlns:c="http://www.bigdatacollect.or/Common/Types">My Address</c:AddressLine></n:NameAddress></n:Addresses><n:Phones><n:NamePhone primary="true"><c:PhoneData xmlns:c="http://www.bigdatacollect.or/Common/Types"><c:PhoneNumber>123</c:PhoneNumber></c:PhoneData></n:NamePhone><n:NamePhone primary="false"><c:PhoneData xmlns:c="http://www.bigdatacollect.or/Common/Types"><c:PhoneNumber>456</c:PhoneNumber></c:PhoneData></n:NamePhone></n:Phones></n:Profile></n:UpdateProfileRequest></soap:Body></soap:Envelope> | ||
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://www.bigdatacollect.or" xmlns:c="http://www.bigdatacollect.or/Common/Types" xmlns:n="http://www.bigdatacollect.or/Name/Types"><soap:Body><n:UpdateProfileRequest xmlns:n="http://www.bigdatacollect.or/Name/Types" xmlns="http://www.bigdatacollect.or/Name/Types"><n:Profile><n:IDs><c:UniqueID source="TESTSOURCE" xmlns:c="http://www.bigdatacollect.or/Common/Types">100</c:UniqueID><c:UniqueID source="TESTSOURCE2" xmlns:c="http://www.bigdatacollect.or/Common/Types">100</c:UniqueID><c:UniqueID source="TESTSOURCE3" xmlns:c="http://www.bigdatacollect.or/Common/Types">100</c:UniqueID></n:IDs><n:Addresses><n:NameAddress><c:AddressLine xmlns:c="http://www.bigdatacollect.or/Common/Types">Another Address</c:AddressLine></n:NameAddress><n:NameAddress><c:AddressLine xmlns:c="http://www.bigdatacollect.or/Common/Types">My Address</c:AddressLine></n:NameAddress></n:Addresses><n:Phones><n:NamePhone primary="true"><c:PhoneData xmlns:c="http://www.bigdatacollect.or/Common/Types"><c:PhoneNumber>123</c:PhoneNumber></c:PhoneData></n:NamePhone><n:NamePhone primary="false"><c:PhoneData xmlns:c="http://www.bigdatacollect.or/Common/Types"><c:PhoneNumber>456</c:PhoneNumber></c:PhoneData></n:NamePhone></n:Phones></n:Profile></n:UpdateProfileRequest></soap:Body></soap:Envelope> |