1 /******************************************************************************
2 * Copyright (c) 2000-2014 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 ******************************************************************************/
10 import from schemas_xmlsoap_org_wsdl all;
12 external function enc(in Binding_operationType b) return octetstring
13 with { extension "prototype(convert) encode(XER:XER_EXTENDED)" }
15 external function dec(in octetstring o) return Binding_operationType
16 with { extension "prototype(convert) decode(XER:XER_EXTENDED)" }
20 testcase tc1() runs on HN
22 var Binding_operationType b := {
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"">
28 <complexType name=""documented"" abstract=""true"">
33 <complexType name=""startWithExtensionsType"" abstract=""true"">
35 <extension base=""wsdl:documented"">
37 <!-- this (record of) any is needed! -->
38 <any namespace=""##other"" minOccurs=""0"" maxOccurs=""unbounded"" processContents=""lax""/>
44 <!-- !! !! !! !! !! !! !! !! -->
45 <complexType name=""binding_operationType"">
47 <extension base=""wsdl:startWithExtensionsType"">
49 <element name=""fault"" minOccurs=""0"" maxOccurs=""unbounded"">
50 <!-- This appears to be the critical part -->
53 <extension base=""wsdl:startWithExtensionsType"">
63 <element name=""binding_operationType"" type=""wsdl:binding_operationType""/>
66 fault_list := { { {"<h:foo xmlns:h=""ah.t.m.l""/>"} } }
69 var octetstring res := enc(b);
72 var Binding_operationType b2 := dec(res);
73 if (b2 == b) { setverdict(pass); }
74 else { setverdict(fail, match(b2, b)); }
76 var octetstring encoded := enc(b2);
77 if( encoded==res ) { setverdict(pass); }
78 else { setverdict(fail, match(encoded, res)); }