blob: eac0212572b16cffbe08e4d5725c9ddb91d50b45 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2000-2019 Ericsson Telecom AB
*
* XSD to TTCN-3 Translator version: CRL 113 200/6 R4B
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
*******************************************************************************/
//
// File: XML_RPC.ttcn
// Description:
// References:
// Rev:
// Prodnr:
// Updated: Thu Aug 2 13:51:04 2018
// Contact: http://ttcn.ericsson.se
//
////////////////////////////////////////////////////////////////////////////////
// Generated from file(s):
// - XML-RPC.xsd
// /* xml version = "1.0" */
// /* targetnamespace = "NoTargetNamespace" */
////////////////////////////////////////////////////////////////////////////////
// Modification header(s):
//-----------------------------------------------------------------------------
// Modified by:
// Modification date:
// Description:
// Modification contact:
//------------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////
module XML_RPC {
import from XSD all;
external function enc_MethodCall(in MethodCall pdu) return octetstring
with { extension "prototype (convert) encode(XER:XER_EXTENDED)" }
external function dec_MethodCall(in octetstring stream) return MethodCall
with { extension "prototype (convert) decode(XER:XER_EXTENDED)" }
external function enc_MethodResponse(in MethodResponse pdu) return octetstring
with { extension "prototype (convert) encode(XER:XER_EXTENDED)" }
external function dec_MethodResponse(in octetstring stream) return MethodResponse
with { extension "prototype (convert) decode(XER:XER_EXTENDED)" }
type record MethodCall
{
record of enumerated {
methodName,
params
} order,
XSD.String methodName (pattern "([A-Za-z0-9]|/|.|:|_)*"),
record {
record of ParamType param_list
} params optional
}
with {
variant "name as uncapitalized";
variant "useOrder";
variant "element";
variant (params.param_list) "untagged";
variant (params.param_list[-]) "name as 'param'";
};
type record MethodResponse
{
union {
record {
ParamType param_
} params,
/* What can appear inside a fault is very restricted */
record {
record {
record {
MemberType member,
MemberType member_1
} struct
} value_
} fault
} choice
}
with {
variant "name as uncapitalized";
variant "element";
variant (choice) "untagged";
variant (choice.params.param_) "name as 'param'";
variant (choice.fault.value_) "name as 'value'";
variant (choice.fault.value_.struct.member_1) "name as 'member'";
};
type record ParamType
{
ValueType value_
}
with {
variant (value_) "name as 'value'";
};
type record ValueType
{
record of XSD.String embed_values,
union {
XSD.Int i4,
// XSD.Int int,
ASCIIString string,
XSD.Decimal double,
XSD.Base64Binary base64,
NumericBoolean boolean_,
XSD.DateTime dateTime_iso8601,
ArrayType array,
StructType struct
} choice
}
with {
variant "embedValues";
variant (choice) "untagged";
variant (choice.base64) "name as capitalized";
variant (choice.boolean_) "name as 'boolean'";
variant (choice.dateTime_iso8601) "name as 'dateTime.iso8601'";
};
type record StructType
{
record length(1 .. infinity) of MemberType member_list
}
with {
variant (member_list) "untagged";
variant (member_list[-]) "name as 'member'";
};
type record MemberType
{
XSD.String name,
ValueType value_
}
with {
variant (value_) "name as 'value'";
};
type record ArrayType
{
record {
record of ValueType value_list
} data
}
with {
variant (data.value_list) "untagged";
variant (data.value_list[-]) "name as 'value'";
};
type XSD.String ASCIIString (pattern "([ -~]|\n|\r|\t)*");
type XSD.Boolean NumericBoolean;
//with {
//variant "text 'true' as '1'";
//variant "text 'false' as '0'";
//};
}
with {
encode "XML";
variant "controlNamespace 'http://www.w3.org/2001/XMLSchema-instance' prefix 'xsi'";
}