[AWS] Problem with .net soap interaction

Wiljan Derks wiljan.derks at nxp.com
Wed Feb 27 21:06:19 CET 2008


Pascal, thanks for the input.

>Hum, but this seems correct to me providing that xmlns is defined into 
>the enclosing soap:Envelope. Do you confirm that this is the case?
>For reference: http://www.w3schools.com/soap/soap_body.asp
>State clearly that child of soap:body may be namespace-qualified.
The xmlns is defined in the soap envolope, so that is not problem.
I read what they write in the spec (thanks for the reference).
But anyway, the server does not want to repond when the name space are 
there.

>Looks like a bug in the .NET implementation to me.
You are probably right, but I just want to have something working.
The answer to that problem will defenitely not be that I can not do this 
with AWS and need .NET.

>Not sure what you want to integrate as there is not patch attached. I do 
>not remember all the details about the SOAP implementation...
I appended the differences in soap-message.adb
This allows to specify an empty namespace name and in that case,
the namespace stuff is not added to the soap body.

Wiljan

Index: soap-message.adb
===================================================================
--- soap-message.adb    (revision 26534)
+++ soap-message.adb    (revision 26535)
@@ -102,6 +102,7 @@
 
       New_Line       : constant String                 := ASCII.CR & 
ASCII.LF;
       NS             : constant SOAP.Name_Space.Object := Name_Space (M);
+      NS_Name        : constant String := SOAP.Name_Space.Name (NS);
       Message_Header : Unbounded_String;
       Message_Body   : Unbounded_String;
 
@@ -138,14 +139,19 @@
    begin
       --  Procedure
 
-      Append
-        (Message_Header,
-         "<" & SOAP.Name_Space.Name (NS) & ":" & Wrapper_Name (M));
+      Append (Message_Header, '<');
+      if NS_Name /= "" then
+         Append (Message_Header, NS_Name);
+         Append (Message_Header, ':');
+      end if;
+      Append (Message_Header, Wrapper_Name (M));
 
-      Append
-        (Message_Body,
-         " xmlns:" & SOAP.Name_Space.Name (NS)
-         & "=""" & SOAP.Name_Space.Value (NS) & """>" & New_Line);
+      Append (Message_Body, " xmlns");
+      if NS_Name /= "" then
+         Append (Message_Body, ":" & NS_Name);
+      end if;
+      Append (Message_Body, "=""" & SOAP.Name_Space.Value (NS) & """>" &
+                            New_Line);
 
       --  Procedure's parameters
 
@@ -162,12 +168,14 @@
       end;
 
       --  Close payload objects
+      Append (Message_Body, "</");
+      if NS_Name /= "" then
+         Append (Message_Body, NS_Name);
+         Append (Message_Body, ':');
+      end if;
+      Append (Message_Body, Wrapper_Name (M));
+      Append (Message_Body, ">" & New_Line);
 
-      Append
-        (Message_Body,
-         Utils.Tag (SOAP.Name_Space.Name (NS) & ':' & Wrapper_Name (M), 
False)
-         & New_Line);
-
       return Message_Header & Message_Body;
    end XML_Image;
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/aws/attachments/20080227/b1274b5c/attachment.htm 


More information about the AWS mailing list