LOBOMINATOR

Hello,

I used in a project the XmlSerializerFormat Attribute to have more control over the generated wsdl because the service needed to be compatible with a contract first wsdl. The service and the client works perfectly fine, altough the message handling is a bit aweful... But when I go to the ServiceMetaData Endpoint with Url WSDL the exposed WSDL doesn't show the datatypes etc. defined by my service! Is this common behaviour

Thanks for your answer

Daniel, Switzerland



Re: Windows Communication Foundation (Indigo) XmlSerializerFormat: Exposed WSDL somehow not complete

BenK

You will see the types defined in additional files have a look at the prefixes defined in the header and you will see xsd0 or something like that these are additional wsdl files with the xsd type information .

The WS standards are laid out the same way.

Regards,

Ben





Re: Windows Communication Foundation (Indigo) XmlSerializerFormat: Exposed WSDL somehow not complete

LOBOMINATOR

Hello Ben,

Yeah I know, that's normally the case. But when I use the XmlSerializerFormat the XSD schema definitions aren't exposed in the wsdl. Maybe it's because I used seperate namespaces for the datatypes

As you can see in the code below WCF exposes only the PortNames, Bindings and Service Definitions and also the WS-Policy stuff for the TcpBinding...

Code Snippet

< xml version="1.0" encoding="utf-8" >
- <wsdl:definitions name="Service" targetNamespace=http://my.namespace.ch/enterprise/Service/v1 xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://my.namespace.ch/enterprise/Service/v1" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex">
- <wsp:Policy wsu:Id="NetTcpBindingEndpoint_policy">
- <wsp:ExactlyOne>
- <wsp:All>
<msb:BinaryEncoding xmlns:msb="http://schemas.microsoft.com/ws/06/2004/mspolicy/netbinary1" />
<wsaw:UsingAddressing />
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
<wsdl:types />
<wsdl:portType name="ServicePortType" />
- <wsdl:binding name="BasicHTTPBindingEndpoint" type="tns:ServicePortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
</wsdl:binding>
- <wsdl:binding name="NetTcpBindingEndpoint" type="tns:ServicePortType">
<wsp:PolicyReference URI="#NetTcpBindingEndpoint_policy" />
<soap12:binding transport="http://schemas.microsoft.com/soap/tcp" />
</wsdl:binding>
- <wsdl:service name="Service">
- <wsdl:port name="BasicHTTPBindingEndpoint" binding="tns:BasicHTTPBindingEndpoint">
<soap:address location=http://localhost:6020/Service />
</wsdl:port>
- <wsdl:port name="NetTcpBindingEndpoint" binding="tns:NetTcpBindingEndpoint">
<soap12:address location="net.tcp://localhost:6021/Service" />
- <wsa10:EndpointReference>
<wsa10:Address>net.tcp://localhost:6021/Service</wsa10:Address>
</wsa10:EndpointReference>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

So the references to the schemas (normally http://localhost:6020/Service xsd=xsd0...) are not available when I use the XmlFormatSerializer... Can anybody help
Thanks




Re: Windows Communication Foundation (Indigo) XmlSerializerFormat: Exposed WSDL somehow not complete

ChiomaOs - MSFT

Your WSDL should not be affected by the serialization format you choose to use (DataContractFormat or XmlSerializerFormat). Have you tried DataContractFormat and is the WSDL complete when you do If so, could you post the service contract, et cetera, so that I can try to repro it

Thanks,

~Chioma





Re: Windows Communication Foundation (Indigo) XmlSerializerFormat: Exposed WSDL somehow not complete

BenK

Sorry for the belated repply . . I use the xmlserializer and have proper wsdl is there an issue with serializaing your types for your operations

Regards,

Ben





Re: Windows Communication Foundation (Indigo) XmlSerializerFormat: Exposed WSDL somehow not complete

LOBOMINATOR

Hello

I just checked it again. There seams to be no problem with the data types. I had an existing wsdl and xsd definition and builded the servicecontract with the svcutil with the following command:

Code Block

svcutil *.wsdl *.xsd


This gave me a client contract and a servercontract and server interface. I used this interface to rebuild the service. My config file has the service behaviour

Code Block

<serviceBehaviors>
<behavior name="MetaData">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>


and the service uses this behaviour. I don't understand what the matter is...

Do you need more of the service

Thanks for your help






Re: Windows Communication Foundation (Indigo) XmlSerializerFormat: Exposed WSDL somehow not complete

BenK

Id use a single operation and contract and seee if its ok ...my hunch is still its a serialization problem.

Also dont use httpGet use a Metadata endpooint

<endpoint address="mex" binding="mexHttpBinding" name="Wsdl" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:6037/MyService" />
</baseAddresses>
</host>

Regards,

Ben