This project is read-only.

Problem with wrapping

Oct 5, 2012 at 1:38 PM

Hi,

I'm trying to learn how to write a doc-lit-wrapped wsdl.

Getting some really weird stuff.

I'm reading this page as a dos and don't: http://pzf.fremantle.org/2007/05/handlign.html

Here's the contract (I'll explain what's going on at the bottom):

SimpleModel.xsd

<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns="urn:test-com:simple" xmlns:mstns="urn:test-com:simple" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:test-com:simple" elementFormDefault="qualified" attributeFormDefault="unqualified" id="SimpleModel">
	<xs:complexType name="PayloadType">
		<xs:sequence>
			<xs:element name="AString" type="xs:string" nillable="1" minOccurs="0"/>
			<xs:element name="AnInt" type="xs:int"/>
		</xs:sequence>
	</xs:complexType>
</xs:schema>

SimpleMessages.xsd

<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns="urn:test-com:simple" xmlns:mstns="urn:test-com:simple" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:smod="http://tempuri.org/SimpleModel.xsd" targetNamespace="urn:test-com:simple" elementFormDefault="qualified" attributeFormDefault="unqualified" id="SimpleMessages">
	<xs:include schemaLocation="SimpleModel.xsd"/>
	<xs:element name="TestMethod">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="Payload" type="PayloadType"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="TestMethodResponse">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="Payload" type="PayloadType" nillable="1" minOccurs="0"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
</xs:schema>

Simple.wsdl

<!--WSDL generated by thinktecture WSCF; version 1.0.13.0-->
<!--Friday, 05-10-2012 - 01:14 PM-->
<definitions xmlns:tns="urn:test-com:simple" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" name="Simple" targetNamespace="urn:test-com:simple">
	<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
	<types>
		<xsd:schema>
			<xsd:import schemaLocation="SimpleMessages.xsd" namespace="urn:test-com:simple"/>
		</xsd:schema>
	</types>
	<message name="testMethodIn">
		<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
		<part name="parameters" element="tns:TestMethod"/>
	</message>
	<message name="testMethodOut">
		<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
		<part name="parameters" element="tns:TestMethodResponse"/>
	</message>
	<portType name="SimpleInterface">
		<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
		<operation name="TestMethod">
			<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
			<input message="tns:testMethodIn"/>
			<output message="tns:testMethodOut"/>
		</operation>
	</portType>
	<binding name="BasicHttpBinding_SimpleInterface" type="tns:SimpleInterface">
		<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
		<operation name="TestMethod">
			<soap:operation soapAction="urn:test-com:simple:testMethodIn" style="document"/>
			<input>
				<soap:body use="literal"/>
			</input>
			<output>
				<soap:body use="literal"/>
			</output>
		</operation>
	</binding>
</definitions>

Now, I *assume* if the code generation was working correctly the stub method in the ISimple created should read:

PayloadType TestMethod(PayloadType Payload);

However it does not. It reads:

void TestMethod(ref PayloadType Payload);

Which is not good.

Can anybody help? I can make it drop into unwrapped, which will at least work but I would like to get a nice d-l-w wsdl working.

TTa,

James.