[Mono-bugs] [Bug 68809][Blo] New - Running wsdl.exe on the given wsdl file generates an error

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 26 Oct 2004 12:09:16 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by msironi@intellireach.com.

http://bugzilla.ximian.com/show_bug.cgi?id=68809

--- shadow/68809	2004-10-26 12:09:16.000000000 -0400
+++ shadow/68809.tmp.14491	2004-10-26 12:09:16.000000000 -0400
@@ -0,0 +1,89 @@
+Bug#: 68809
+Product: Mono: Doctools
+Version: unspecified
+OS: 
+OS Details: Winsdows XP SP2
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Blocker
+Component: Core
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: msironi@intellireach.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Running wsdl.exe on the given wsdl file generates an error
+
+Running wsdl.exe (mono 1.0.2) on the following wsdl generates the 
+message "Error: Object reference not set to an instance of an object". 
+(presumably a thrown NullReferenceException)  The problem appears to be 
+caused by the <soap:header> tag, removing that 'fixes' the problem. (but 
+of course then the header would not be set correctly)  I cannot find a 
+workaround to generate a wrapper that manipulates soap headers.
+
+wsdl:
+
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions
+    targetNamespace="http://foo.com/foo.xsd"
+    xmlns="http://schemas.xmlsoap.org/wsdl/"
+    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
+    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
+    xmlns:tns="http://foo.com/foo.xsd"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema">
+    
+    <types>
+        <xs:schema targetNamespace="http://foo.com/foo.xsd">
+            <xs:element name="SessionID" type="xs:string"/>
+            <xs:element name="DoThisOutput" type="xs:string"/>
+            <xs:element name="DoThisInput">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element name="Categories" type="xs:string"/>
+                        <xs:element name="Flag" type="xs:boolean"/>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+        </xs:schema>
+    </types>
+    
+    <message name="DoThisInMessage">
+        <part element="tns:DoThisInput" name="body"/>
+    </message>
+    <message name="DoThisOutMessage">
+        <part element="tns:DoThisOutput" name="body"/>
+    </message>
+    <message name="Header">
+        <part element="tns:SessionID" name="SessionID"/>
+    </message>
+    
+    <portType name="FooPortType">
+        <operation name="DoThis">
+            <input message="tns:DoThisInMessage"/>
+            <output message="tns:DoThisOutMessage"/>
+        </operation>
+    </portType>
+    
+    <binding name="FooBinding" type="tns:FooPortType">
+        <soap:binding style="document" 
+transport="http://schemas.xmlsoap.org/soap/http"/>
+        <operation name="DoThis">
+            <soap:operation soapAction="DoThis" style="document"/>
+            <input>
+                <soap:body use="literal"/>
+                <soap:header message="tns:Header" part="SessionID" 
+use="literal"/>
+            </input>
+            <output>
+                <soap:body use="literal"/>
+            </output>
+        </operation>
+    </binding>
+    
+    <service name="FooSoap">
+        <port binding="tns:FooBinding" name="FooSOAPPort"/>
+    </service>
+</definitions>