Nicholas
Sorry for the late reply.. Your message was just enough to get me
onto the proper path with this:
http://blogs.msdn.com/sonuarora/arc...-datacontractserializer-vs-xmlserializer.aspx.
I used svcutil to create the interface from my wsdl file (at the
bottom). Then I created the class implementing the interface and
hosted the whole thing and it runs. So far so good. Then I had the
third party software start sending events.. and I get at most one
event. Looking at the data exchange with Wireshark I noted that my
server would return HTTP 500 errors all the time - so I turned on
custom error messages.
No for instance for an onLineState message, the error my app returns
is
Cannot assign object of type System.Xml.XmlNode[] to an object of type
LineState
The error is similar for all the other operations that do not work
(the only one that works is onPhoneSetStaticState).. it's always the
object that's part of the call that cannot be deserialized.
And here's the wireshark dump of the message:
POST /XMLPhoneEvents HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related,
text/*
User-Agent: Axis/1.4
Host: 10.145.18.29
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: "onLineState"
Content-Length: 505
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope
xmlns:soapenv="
http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="
http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://
www.w3.org/2001/XMLSchema-instance"><soapenv:Body><ns1

nLineState
soapenv:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="
http://xmlapi.alcatel.com/phone"><sessionId
xsi:type="xsd:string">3453</sessionId><state
xsi:type="ns1:LineState">IN_SERVICE</state></ns1

nLineState></
soapenv:Body></soapenv:Envelope>
Is there a way to modify the WSDL / an option in svcutil that would
generate a stub that works with the following WSDL file for all the
calls?
Regards
Stephan
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
targetNamespace="
http://xmlapi.alcatel.com/phone"
xmlns:impl="
http://xmlapi.alcatel.com/phone"
xmlns:tns1="
http://xmlapi.alcatel.com/phone/types"
xmlns:tns2="
http://xmlapi.alcatel.com/phonesetprogramming/types"
xmlns:intf="
http://xmlapi.alcatel.com/phone"
xmlns:apachesoap="
http://xml.apache.org/xml-soap"
xmlns:wsdlsoap="
http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="
http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="
http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/"
xmlns="
http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<schema
targetNamespace="
http://xmlapi.alcatel.com/phone"
xmlns="
http://www.w3.org/2001/XMLSchema">
<import namespace="
http://xmlapi.alcatel.com/phone/types"/>
<import namespace="
http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType name="ArrayOf_tns1_Call">
<complexContent>
</restriction>
</complexContent>
</complexType>
</schema>
<schema
targetNamespace="
http://xmlapi.alcatel.com/phone/types"
xmlns="
http://www.w3.org/2001/XMLSchema">
<import namespace="
http://xmlapi.alcatel.com/phone"/>
<import namespace="
http://schemas.xmlsoap.org/soap/encoding/"/>
<simpleType name="CallState">
<restriction base="xsd:string">
<enumeration value="init"/>
<enumeration value="ringingIncoming"/>
<enumeration value="ringingOutgoing"/>
<enumeration value="active"/>
<enumeration value="held"/>
<enumeration value="conferenced"/>
<enumeration value="recording"/>
<enumeration value="waiting"/>
<enumeration value="dialing"/>
<enumeration value="releasing"/>
<enumeration value="unreacheable"/>
<enumeration value="busytone"/>
<enumeration value="opereserved"/>
<enumeration value="paging"/>
<enumeration value="unknown"/>
</restriction>
</simpleType>
<simpleType name="MessageType">
<restriction base="xsd:string">
<enumeration value="apology"/>
<enumeration value="unknown"/>
</restriction>
</simpleType>
<complexType name="Call">
<sequence>
<element name="callRef" type="xsd:long"/>
<element name="correlator" nillable="true" type="xsd:hexBinary"/>
<element name="message" nillable="true" type="xsd:string"/>
<element name="msgtype" nillable="true" type="tns1:MessageType"/>
<element name="name" nillable="true" type="xsd:string"/>
<element name="number" nillable="true" type="xsd:string"/>
<element name="state" nillable="true" type="tns1:CallState"/>
</sequence>
</complexType>
<simpleType name="NomadMode">
<restriction base="xsd:string">
<enumeration value="privatePhone"/>
<enumeration value="local"/>
<enumeration value="voip"/>
</restriction>
</simpleType>
<simpleType name="LineState">
<restriction base="xsd:string">
<enumeration value="IN_SERVICE"/>
<enumeration value="OUT_OF_SERVICE"/>
<enumeration value="UNKNOWN"/>
</restriction>
</simpleType>
</schema>
<schema
targetNamespace="
http://xmlapi.alcatel.com/phonesetprogramming/
types"
xmlns="
http://www.w3.org/2001/XMLSchema">
<import namespace="
http://xmlapi.alcatel.com/phonesetprogramming"/>
<import namespace="
http://xmlapi.alcatel.com/common"/>
<import namespace="
http://schemas.xmlsoap.org/soap/encoding/"/>
<simpleType name="AlcForwardTargetType">
<restriction base="xsd:string">
<enumeration value="NONE"/>
<enumeration value="NUMBER"/>
<enumeration value="VOICE_MAIL"/>
<enumeration value="ROUTING_SERVICE"/>
</restriction>
</simpleType>
<simpleType name="AlcForwardType">
<restriction base="xsd:string">
<enumeration value="NO_FORWARD"/>
<enumeration value="IMMEDIATE"/>
<enumeration value="ON_BUSY"/>
<enumeration value="ON_NO_ANSWER"/>
<enumeration value="ON_BUSY_OR_NO_ANSWER"/>
</restriction>
</simpleType>
<complexType name="AlcForwardState">
<sequence>
<element name="firstName" nillable="true" type="xsd:string"/>
<element name="name" nillable="true" type="xsd:string"/>
<element name="targetNumber" nillable="true" type="xsd:string"/>
<element name="targetType" nillable="true"
type="tns2:AlcForwardTargetType"/>
<element name="type" nillable="true" type="tns2:AlcForwardType"/>
</sequence>
</complexType>
<simpleType name="AlcOverflowType">
<restriction base="xsd:string">
<enumeration value="NO_OVERFLOW"/>
<enumeration value="ON_BUSY"/>
<enumeration value="ON_NO_ANSWER"/>
<enumeration value="ON_BUSY_OR_NO_ANSWER"/>
</restriction>
</simpleType>
<complexType name="AlcStaticState">
<sequence>
<element name="associate" nillable="true" type="xsd:string"/>
<element name="campOnActivated" type="xsd:boolean"/>
<element name="doNotDisturbActivated" type="xsd:boolean"/>
<element name="forwardState" nillable="true"
type="tns2:AlcForwardState"/>
<element name="locked" type="xsd:boolean"/>
<element name="overflowType" nillable="true"
type="tns2:AlcOverflowType"/>
</sequence>
</complexType>
</schema>
</wsdl:types>
<wsdl:message name="onSessionClosed">
<wsdl

art name="sessionId" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="onSessionClosedResponse">
</wsdl:message>
<wsdl:message name="onCallState">
<wsdl

art name="sessionId" type="xsd:string"/>
<wsdl

art name="calls" type="impl:ArrayOf_tns1_Call"/>
</wsdl:message>
<wsdl:message name="onCallStateResponse">
</wsdl:message>
<wsdl:message name="onNewSession">
<wsdl

art name="sessionId" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="onNewSessionResponse">
</wsdl:message>
<wsdl:message name="onConnectionDown">
</wsdl:message>
<wsdl:message name="onConnectionDownResponse">
</wsdl:message>
<wsdl:message name="onPhoneSetStaticState">
<wsdl

art name="sessionId" type="xsd:string"/>
<wsdl

art name="state" type="tns2:AlcStaticState"/>
</wsdl:message>
<wsdl:message name="onPhoneSetStaticStateResponse">
</wsdl:message>
<wsdl:message name="onUnansweredCall">
<wsdl

art name="sessionId" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="onUnansweredCallResponse">
</wsdl:message>
<wsdl:message name="onNomadState">
<wsdl

art name="sessionId" type="xsd:string"/>
<wsdl

art name="mode" type="tns1:NomadMode"/>
<wsdl

art name="homeNumber" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="onNomadStateResponse">
</wsdl:message>
<wsdl:message name="onLineState">
<wsdl

art name="sessionId" type="xsd:string"/>
<wsdl

art name="state" type="tns1:LineState"/>
</wsdl:message>
<wsdl:message name="onLineStateResponse">
</wsdl:message>
<wsdl

ortType name="XmlPhoneEvents">
<wsdl

peration name="onCallState" parameterOrder="sessionId calls">
<documentation>This notification is sent each time a call's state
has changed.</documentation>
<wsdl:input name="onCallState" message="impl

nCallState"/>
<wsdl

utput name="onCallStateResponse"
message="impl

nCallStateResponse"/>
</wsdl

peration>
<wsdl

peration name="onNewSession" parameterOrder="sessionId">
<documentation>This notification is sent when another XmlPhone
session has been opened for the same user.</documentation>
<wsdl:input name="onNewSession" message="impl

nNewSession"/>
<wsdl

utput name="onNewSessionResponse"
message="impl

nNewSessionResponse"/>
</wsdl

peration>
<wsdl

peration name="onSessionClosed" parameterOrder="sessionId">
<documentation>This notification is sent when the XmlPhone session
has been closed after a timeout.</documentation>
<wsdl:input name="onSessionClosed" message="impl

nSessionClosed"/>
<wsdl

utput name="onSessionClosedResponse"
message="impl

nSessionClosedResponse"/>
</wsdl

peration>
<wsdl

peration name="onConnectionDown">
<documentation>This notification is sent when the event connection
<wsdl

utput name="onConnectionDownResponse"
message="impl

nConnectionDownResponse"/>
</wsdl

peration>
<wsdl

peration name="onPhoneSetStaticState"
parameterOrder="sessionId state">
<documentation>This notification is sent each time the static state
of the phone set changes.</documentation>
<wsdl:input name="onPhoneSetStaticState"
message="impl

nPhoneSetStaticState"/>
<wsdl

utput name="onPhoneSetStaticStateResponse"
message="impl

nPhoneSetStaticStateResponse"/>
</wsdl

peration>
<wsdl

peration name="onUnansweredCall" parameterOrder="sessionId">
<documentation>This notification is sent each time a new incoming
<wsdl

utput name="onUnansweredCallResponse"
message="impl

nUnansweredCallResponse"/>
</wsdl

peration>
<wsdl

peration name="onNomadState" parameterOrder="sessionId mode
homeNumber">
<documentation>This notification is sent each time the nomadic
state has changed.</documentation>
<wsdl:input name="onNomadState" message="impl

nNomadState"/>
<wsdl

utput name="onNomadStateResponse"
message="impl

nNomadStateResponse"/>
</wsdl

peration>
<wsdl

peration name="onLineState" parameterOrder="sessionId state">
<documentation>This notification is sent each time the line state
has changed.</documentation>
<wsdl:input name="onLineState" message="impl

nLineState"/>
<wsdl

utput name="onLineStateResponse"
message="impl

nLineStateResponse"/>
</wsdl

peration>
</wsdl

ortType>
<wsdl:binding name="XmlPhoneEventsSoapBinding"
type="impl:XmlPhoneEvents">
<wsdlsoap:binding style="rpc" transport="
http://schemas.xmlsoap.org/
soap/http"/>
<wsdl

peration name="onCallState">
<wsdlsoap

peration soapAction="onCallState"/>
<wsdl:input name="onCallState">
<wsdlsoap:body use="encoded" encodingStyle="http://
schemas.xmlsoap.org/soap/encoding/" namespace="http://
xmlapi.alcatel.com/phone"/>
</wsdl:input>
<wsdl

utput name="onCallStateResponse">
<wsdlsoap:body use="encoded" encodingStyle="http://
schemas.xmlsoap.org/soap/encoding/" namespace="http://
xmlapi.alcatel.com/phone"/>
</wsdl

utput>
</wsdl

peration>
<wsdl

peration name="onNewSession">
<wsdlsoap

peration soapAction="onNewSession"/>
<wsdl:input name="onNewSession">
<wsdlsoap:body use="encoded" encodingStyle="http://
schemas.xmlsoap.org/soap/encoding/" namespace="http://
xmlapi.alcatel.com/phone"/>
</wsdl:input>
<wsdl

utput name="onNewSessionResponse">
<wsdlsoap:body use="encoded" encodingStyle="http://
schemas.xmlsoap.org/soap/encoding/" namespace="http://
xmlapi.alcatel.com/phone"/>
</wsdl

utput>
</wsdl

peration>
<wsdl

peration name="onSessionClosed">
<wsdlsoap

peration soapAction="onSessionClosed"/>
<wsdl:input name="onSessionClosed">
<wsdlsoap:body use="encoded" encodingStyle="http://
schemas.xmlsoap.org/soap/encoding/" namespace="http://
xmlapi.alcatel.com/phone"/>
</wsdl:input>
<wsdl

utput name="onSessionClosedResponse">
<wsdlsoap:body use="encoded" encodingStyle="http://
schemas.xmlsoap.org/soap/encoding/" namespace="http://
xmlapi.alcatel.com/phone"/>
</wsdl

utput>
</wsdl

peration>
<wsdl

peration name="onConnectionDown">
<wsdlsoap

peration soapAction="onConnectionDown"/>
<wsdl:input name="onConnectionDown">
<wsdlsoap:body use="encoded" encodingStyle="http://
schemas.xmlsoap.org/soap/encoding/" namespace="http://
xmlapi.alcatel.com/phone"/>
</wsdl:input>
<wsdl

utput name="onConnectionDownResponse">
<wsdlsoap:body use="encoded" encodingStyle="http://
schemas.xmlsoap.org/soap/encoding/" namespace="http://
xmlapi.alcatel.com/phone"/>
</wsdl

utput>
</wsdl

peration>
<wsdl

peration name="onPhoneSetStaticState">
<wsdlsoap

peration soapAction="onPhoneSetStaticState"/>
<wsdl:input name="onPhoneSetStaticState">
<wsdlsoap:body use="encoded" encodingStyle="http://
schemas.xmlsoap.org/soap/encoding/" namespace="http://
xmlapi.alcatel.com/phone"/>
</wsdl:input>
<wsdl

utput name="onPhoneSetStaticStateResponse">
<wsdlsoap:body use="encoded" encodingStyle="http://
schemas.xmlsoap.org/soap/encoding/" namespace="http://
xmlapi.alcatel.com/phone"/>
</wsdl

utput>
</wsdl

peration>
<wsdl

peration name="onUnansweredCall">
<wsdlsoap

peration soapAction="onUnansweredCall"/>
<wsdl:input name="onUnansweredCall">
<wsdlsoap:body use="encoded" encodingStyle="http://
schemas.xmlsoap.org/soap/encoding/" namespace="http://
xmlapi.alcatel.com/phone"/>
</wsdl:input>
<wsdl

utput name="onUnansweredCallResponse">
<wsdlsoap:body use="encoded" encodingStyle="http://
schemas.xmlsoap.org/soap/encoding/" namespace="http://
xmlapi.alcatel.com/phone"/>
</wsdl

utput>
</wsdl

peration>
<wsdl

peration name="onNomadState">
<wsdlsoap

peration soapAction="onNomadState"/>
<wsdl:input name="onNomadState">
<wsdlsoap:body use="encoded" encodingStyle="http://
schemas.xmlsoap.org/soap/encoding/" namespace="http://
xmlapi.alcatel.com/phone"/>
</wsdl:input>
<wsdl

utput name="onNomadStateResponse">
<wsdlsoap:body use="encoded" encodingStyle="http://
schemas.xmlsoap.org/soap/encoding/" namespace="http://
xmlapi.alcatel.com/phone"/>
</wsdl

utput>
</wsdl

peration>
<wsdl

peration name="onLineState">
<wsdlsoap

peration soapAction="onLineState"/>
<wsdl:input name="onLineState">
<wsdlsoap:body use="encoded" encodingStyle="http://
schemas.xmlsoap.org/soap/encoding/" namespace="http://
xmlapi.alcatel.com/phone"/>
</wsdl:input>
<wsdl

utput name="onLineStateResponse">
<wsdlsoap:body use="encoded" encodingStyle="http://
schemas.xmlsoap.org/soap/encoding/" namespace="http://
xmlapi.alcatel.com/phone"/>
</wsdl

utput>
</wsdl

peration>
</wsdl:binding>
<wsdl:service name="XmlPhoneEventsService">
<wsdl

ort name="XmlPhoneEvents"
binding="impl:XmlPhoneEventsSoapBinding">
<wsdlsoap:address location="
http://localhost/XMLPhoneEvents"/>
</wsdl

ort>
</wsdl:service>
</wsdl:definitions>