Skip to content

Commit b0c22e9

Browse files
committed
Record the routine encoding in the state.
Moticated by R624-004.
1 parent dd5f5da commit b0c22e9

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/soap/soap-message-xml.adb

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ package body SOAP.Message.XML is
8686
NS : Namespaces;
8787
Strict : Boolean := True;
8888
Style : WSDL.Schema.Binding_Style := WSDL.Schema.RPC;
89+
Encoding : WSDL.Schema.Encoding_Style := WSDL.Schema.Encoded;
8990
Schema : WSDL.Schema.Definition;
9091
Enclosing : Unbounded_String; -- enclosing element type (array record)
9192
end record;
@@ -938,6 +939,10 @@ package body SOAP.Message.XML is
938939
S.Enclosing := S.Wrapper_Name;
939940
end Compute_Signature;
940941

942+
-- Document style is always literal
943+
944+
S.Encoding := WSDL.Schema.Literal;
945+
941946
declare
942947
use SOAP.Parameters;
943948
use type DOM.Core.Node;
@@ -1193,9 +1198,6 @@ package body SOAP.Message.XML is
11931198
then To_String (S.Enclosing) & '.' & Name
11941199
else To_String (S.Enclosing) & ".item")
11951200
else Name);
1196-
Encoding : constant SOAP.Types.Encoding_Style :=
1197-
WSDL.Schema.Get_Encoding_Style
1198-
(S.Schema, To_String (S.Wrapper_Name));
11991201

12001202
Ref : constant DOM.Core.Node := SOAP.XML.Get_Ref (N);
12011203
Atts : constant DOM.Core.Named_Node_Map := Attributes (Ref);
@@ -1247,7 +1249,7 @@ package body SOAP.Message.XML is
12471249
begin
12481250
Parse_Namespaces (Ref, S.NS);
12491251

1250-
if Encoding = WSDL.Schema.Encoded then
1252+
if S.Encoding = WSDL.Schema.Encoded then
12511253
XSI_Type :=
12521254
Get_Named_Item (Atts, SOAP.Name_Space.Name (S.NS.xsi) & ":type");
12531255

@@ -1619,7 +1621,7 @@ package body SOAP.Message.XML is
16191621
end if;
16201622

16211623
S.Wrapper_Name := To_Unbounded_String (Name);
1622-
S.Enclosing := S.Wrapper_Name;
1624+
S.Encoding := WSDL.Schema.Get_Encoding_Style (S.Schema, Name);
16231625

16241626
for K in 0 .. Length (NL) - 1 loop
16251627
if Item (NL, K).Node_Type /= DOM.Core.Text_Node then

0 commit comments

Comments
 (0)