Author: jonathan
Date: Tue Dec  4 14:28:44 2007
New Revision: 10498

Log:

Fixed SOAP and HTTP headers.

Modified:
   trunk/commons/dynamic-codegen/src/wsdl2sig.xslt

Modified: trunk/commons/dynamic-codegen/src/wsdl2sig.xslt
==============================================================================
--- trunk/commons/dynamic-codegen/src/wsdl2sig.xslt     (original)
+++ trunk/commons/dynamic-codegen/src/wsdl2sig.xslt     Tue Dec  4 14:28:44 2007
@@ -224,15 +224,31 @@
                                                     </xsl:when>
                                                 </xsl:choose> 
                                             </xsl:if>
-                                            <xsl:for-each 
select="wsoap:header">
-                                                <soapheader>
-                                                    <xsl:copy-of select="@*"/>
+                                            <xsl:for-each 
select="*/wsoap:header">
+                                                <soapheader 
for="{local-name(parent::*)}">
+                                                    <xsl:copy-of 
select="@required | @mustUnderstand"/>
+                                                    <xsl:attribute name="type">
+                                                        <xsl:call-template 
name="local-name">
+                                                            <xsl:with-param 
name="qname" select="@element"/>
+                                                        </xsl:call-template>
+                                                    </xsl:attribute>
+                                                    <xsl:attribute 
name="type-namespace">
+                                                        <xsl:value-of 
select="namespace::*[local-name() = substring-before(@element,':')]"/>
+                                                    </xsl:attribute>
                                                     <xsl:copy-of select="*"/>
                                                 </soapheader>
                                             </xsl:for-each>
                                             <xsl:for-each 
select="whttp:header">
-                                                <httpheader>
-                                                    <xsl:copy-of select="@*"/>
+                                                <httpheader 
for="{local-name(parent::*)}">
+                                                    <xsl:copy-of 
select="@required"/>
+                                                    <xsl:attribute name="type">
+                                                        <xsl:call-template 
name="local-name">
+                                                            <xsl:with-param 
name="qname" select="@element"/>
+                                                        </xsl:call-template>
+                                                    </xsl:attribute>
+                                                    <xsl:attribute 
name="type-namespace">
+                                                        <xsl:value-of 
select="namespace::*[local-name() = substring-before(@element,':')]"/>
+                                                    </xsl:attribute>
                                                     <xsl:copy-of select="*"/>
                                                 </httpheader>
                                             </xsl:for-each>

_______________________________________________
Commons-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/commons-dev

Reply via email to