Sync with 5.4.0
[deliverable/titan.core.git] / regression_test / XML / xsdConverter / HN21072 / HN21072Test.ttcn
1 /******************************************************************************
2 * Copyright (c) 2000-2015 Ericsson Telecom AB
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 ******************************************************************************/
8 module HN21072Test {
9
10 import from schemas_xmlsoap_org_wsdl all;
11
12 external function enc(in Binding_operationType b) return octetstring
13 with { extension "prototype(convert) encode(XER:XER_EXTENDED)" }
14
15 external function dec(in octetstring o) return Binding_operationType
16 with { extension "prototype(convert) decode(XER:XER_EXTENDED)" }
17
18 type component HN {}
19
20 testcase tc1() runs on HN
21 {
22 var Binding_operationType b := {
23 elem_list := {
24 "<h:html xmlns:h=""ah.t.m.l""/>",
25 "<schema xmlns=""http://www.w3.org/2001/XMLSchema"" xmlns:xs=""http://www.w3.org/2001/XMLSchema"" xmlns:wsdl=""http://schemas.xmlsoap.org/wsdl/"" targetNamespace=""http://schemas.xmlsoap.org/wsdl/"" elementFormDefault=""qualified"">
26
27 <!-- kell! -->
28 <complexType name=""documented"" abstract=""true"">
29 <sequence>
30 </sequence>
31 </complexType>
32
33 <complexType name=""startWithExtensionsType"" abstract=""true"">
34 <complexContent>
35 <extension base=""wsdl:documented"">
36 <sequence>
37 <!-- this (record of) any is needed! -->
38 <any namespace=""##other"" minOccurs=""0"" maxOccurs=""unbounded"" processContents=""lax""/>
39 </sequence>
40 </extension>
41 </complexContent>
42 </complexType>
43
44 <!-- !! !! !! !! !! !! !! !! -->
45 <complexType name=""binding_operationType"">
46 <complexContent>
47 <extension base=""wsdl:startWithExtensionsType"">
48 <sequence>
49 <element name=""fault"" minOccurs=""0"" maxOccurs=""unbounded"">
50 <!-- This appears to be the critical part -->
51 <complexType>
52 <complexContent>
53 <extension base=""wsdl:startWithExtensionsType"">
54 </extension>
55 </complexContent>
56 </complexType>
57 </element>
58 </sequence>
59 </extension>
60 </complexContent>
61 </complexType>
62
63 <element name=""binding_operationType"" type=""wsdl:binding_operationType""/>
64 </schema>"
65 },
66 fault_list := { { {"<h:foo xmlns:h=""ah.t.m.l""/>"} } }
67 }
68
69 var octetstring res := enc(b);
70 action(res);
71
72 var Binding_operationType b2 := dec(res);
73 if (b2 == b) { setverdict(pass); }
74 else { setverdict(fail, match(b2, b)); }
75
76 var octetstring encoded := enc(b2);
77 if( encoded==res ) { setverdict(pass); }
78 else { setverdict(fail, match(encoded, res)); }
79 }
80
81 control {
82 execute(tc1());
83 }
84
85 }
This page took 0.045355 seconds and 5 git commands to generate.