<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>WebDialer SOAP interface Serialization issues using .NET</title>
  <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_thread?p_l_id=&amp;threadId=1777773" />
  <subtitle>WebDialer SOAP interface Serialization issues using .NET</subtitle>
  <id>http://developer.cisco.com/c/message_boards/find_thread?p_l_id=&amp;threadId=1777773</id>
  <updated>2013-05-20T16:33:56Z</updated>
  <dc:date>2013-05-20T16:33:56Z</dc:date>
  <entry>
    <title>RE: WebDialer SOAP interface Serialization issues using .NET</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=2502084" />
    <author>
      <name>Ruben Sanchez Bono</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=2502084</id>
    <updated>2010-09-02T21:04:48Z</updated>
    <published>2010-09-02T21:04:48Z</published>
    <summary type="html">Hí Stephan,
 
It was really usefull. Thank you very much but I have the same question asked by Cristian. I don't know how to access the wsdl description to make the changes. I tried in the admin console of CCM OS, also with the web interfaces of CCM Administration and CCM OS Administration but I can not find how to edit the file.

I need help please.

Thank you in advance.

Regads.</summary>
    <dc:creator>Ruben Sanchez Bono</dc:creator>
    <dc:date>2010-09-02T21:04:48Z</dc:date>
  </entry>
  <entry>
    <title>RE: WebDialer SOAP interface Serialization issues using .NET</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=2323731" />
    <author>
      <name>Mark Salter</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=2323731</id>
    <updated>2010-07-01T19:09:18Z</updated>
    <published>2010-07-01T19:09:18Z</published>
    <summary type="html">Hi Steve
Is there any chance you can post the WSDL definition for me as every time i change it and re-add i keep getting same error as before?
i think its just the WSDL file i am using as it looks like same error every time
thanks
Mark</summary>
    <dc:creator>Mark Salter</dc:creator>
    <dc:date>2010-07-01T19:09:18Z</dc:date>
  </entry>
  <entry>
    <title>RE: WebDialer SOAP interface Serialization issues using .NET</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=2245436" />
    <author>
      <name>Cristian Gomes</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=2245436</id>
    <updated>2010-06-11T04:43:19Z</updated>
    <published>2010-06-11T04:43:19Z</published>
    <summary type="html">  Thank you for the explanation, it was really useful. Therefore,  I would like to know how to access the wsdl description to make the change that you mentioned.
   Thank you in advance</summary>
    <dc:creator>Cristian Gomes</dc:creator>
    <dc:date>2010-06-11T04:43:19Z</dc:date>
  </entry>
  <entry>
    <title>RE: WebDialer SOAP interface Serialization issues using .NET</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=2010852" />
    <author>
      <name>Stephan Steiner</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=2010852</id>
    <updated>2010-03-03T15:29:45Z</updated>
    <published>2010-03-03T15:29:45Z</published>
    <summary type="html">And here's how you fix it:
 
First of all in the &lt;wsdl:definitions line, add the old namespace before the closing &gt; :
 
xmlns:impl2="urn:WebdialerSoap"
 
Then move out the WDDeviceInfo declaration to a new schema declaration which you add before the existing schema declaration.
 
&lt;schema targetNamespace="urn:WebdialerSoap" xmlns="http://www.w3.org/2001/XMLSchema"&gt;
     &lt;import namespace="http://schemas.xmlsoap.org/soap/encoding/"/&gt;
     &lt;import namespace="urn:WD70"/&gt;
     &lt;complexType name="WDDeviceInfo"&gt;
       &lt;sequence&gt;
         &lt;element name="deviceName" type="xsd:string"/&gt;
         &lt;element name="lines" type="impl:ArrayOf_soapenc_string"/&gt;
       &lt;/sequence&gt;
     &lt;/complexType&gt;
   &lt;/schema&gt;
 
(you import the urn=WD70 namespace because it contains the ArrayOf_soapenc_string definition)
 
Finally, import the old namespace to the existing &lt;schema&gt; definition:
 
&lt;schema targetNamespace="urn:WD70" xmlns="http://www.w3.org/2001/XMLSchema"&gt;
   &lt;import namespace="http://schemas.xmlsoap.org/soap/encoding/"/&gt;
 
Now after that you add the following:
 
   &lt;import namespace="urn:WebdialerSoap"/&gt;
 
Save, load the WSDL and you're good to go.</summary>
    <dc:creator>Stephan Steiner</dc:creator>
    <dc:date>2010-03-03T15:29:45Z</dc:date>
  </entry>
  <entry>
    <title>RE: WebDialer SOAP interface Serialization issues using .NET</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=2010846" />
    <author>
      <name>Stephan Steiner</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=2010846</id>
    <updated>2010-03-03T15:12:01Z</updated>
    <published>2010-03-03T15:12:01Z</published>
    <summary type="html">And it gets even worse with CCM7.. getProfileSoap starts mixing the old and new namespace. The getProfileSoap response is this:
 
&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;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"&gt;&lt;soapenv:Body&gt;&lt;ns1:getProfileSoapResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:WD70"&gt;&lt;getProfileSoapReturn href="#id0"/&gt;&lt;/ns1:getProfileSoapResponse&gt;&lt;multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:GetConfigResponse" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="urn:WD70"&gt;&lt;description xsi:type="xsd:string"&gt;Success&lt;/description&gt;&lt;deviceInfoList soapenc:arrayType="ns3:WDDeviceInfo[1]" xsi:type="soapenc:Array" xmlns:ns3="urn:WebdialerSoap"&gt;&lt;item href="#id1"/&gt;&lt;/deviceInfoList&gt;&lt;responseCode href="#id2"/&gt;&lt;/multiRef&gt;&lt;multiRef id="id1" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns4:WDDeviceInfo" xmlns:ns4="urn:WebdialerSoap" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"&gt;&lt;deviceName xsi:type="xsd:string"&gt;SEP0016D43F0C3D&lt;/deviceName&gt;&lt;lines soapenc:arrayType="xsd:string[2]" xsi:type="soapenc:Array"&gt;&lt;item xsi:type="xsd:string"&gt;3355 ; p_phones&lt;/item&gt;&lt;item xsi:type="xsd:string"&gt;7502 ; p_phones&lt;/item&gt;&lt;/lines&gt;&lt;/multiRef&gt;&lt;multiRef id="id2" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="xsd:int" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"&gt;0&lt;/multiRef&gt;&lt;/soapenv:Body&gt;&lt;/soapenv:Envelope&gt;
 
Note ns3 and ns4.. they use the old namespace.. the rest uses the new one. And of course .NET won't have that. Now I need to find a way to add the old namespace.</summary>
    <dc:creator>Stephan Steiner</dc:creator>
    <dc:date>2010-03-03T15:12:01Z</dc:date>
  </entry>
  <entry>
    <title>RE: WebDialer SOAP interface Serialization issues using .NET</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=2010837" />
    <author>
      <name>Stephan Steiner</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=2010837</id>
    <updated>2010-03-03T14:55:32Z</updated>
    <published>2010-03-03T14:55:32Z</published>
    <summary type="html">Johnatan
You've probably solved the issue by now.. but just for reference and to help everybody else struggling with this, here's the fix:
 
First let's start with the culprit: The WSDL file is incorrect. I don't know how, it is autogenerated after all, but it specifies the wrong return content for getProfileSoap:
 
&lt;complexType name="WDDeviceInfo"&gt;
&lt;sequence&gt;
&lt;element name="deviceName" type="xsd:string"/&gt;
&lt;element name="lines" type="xsd:string"/&gt;
&lt;/sequence&gt;
&lt;/complexType&gt;
 
the lines element is the problem.. if you look at what's passing over the wire:
 
 
&lt;deviceInfoList 
soapenc:arrayType="[b]ns2:WDDeviceInfo[2][/b]" xsi:type="[b]soapenc:Array[/b]"&gt;


  &lt;item href="[b]#id1[/b]" /&gt; 



  &lt;item href="[b]#id2[/b]" /&gt;
&lt;/deviceInfoList&gt;



&lt;multiRef 
id="[b]id2[/b]" 
soapenc:root="[b]0[/b]" soapenv:encodingStyle="[b]http://schemas.xmlsoap.org/soap/encoding/[/b]" xsi:type="[b]ns3:WDDeviceInfo[/b]" 
xmlns:ns3="&lt;strong class="ns"&gt;urn:WebdialerSoap[/b]" xmlns:soapenc="&lt;strong class="ns"&gt;http://schemas.xmlsoap.org/soap/encoding/[/b]"&gt;


  &lt;deviceName 
xsi:type="[b]xsd:string[/b]"&gt;SEP0016D43F0C3D&lt;/deviceName&gt; 


[url=#]-[/url] &lt;lines soapenc:arrayType="[b]xsd:string[2][/b]" 
xsi:type="[b]soapenc:Array[/b]"&gt;


  &lt;item xsi:type="[b]xsd:string[/b]"&gt;3351 ; p_phones&lt;/item&gt; 



  &lt;item xsi:type="[b]xsd:string[/b]"&gt;7423 ; p_phones&lt;/item&gt; 


  &lt;/lines&gt;


  &lt;/multiRef&gt;


Note that WDDeviceInfo as returned contains a string deviceName, and lines is an array of soapEnc:Arry... not a string.


So, we need to create our own WSDL file which matches what the service actually does.





This is done by updating the WDDeviceInfo definition:



&lt;complexType name="WDDeviceInfo"&gt;
    &lt;sequence&gt;
     &lt;element name="deviceName" type="xsd:string"/&gt;
     &lt;element name="lines" type="impl:ArrayOf_soapenc_string"/&gt;
    &lt;/sequence&gt;
   &lt;/complexType&gt;



And, since there's no ArrayOf_soapenc_string definition, we need to add the following before the definition of WDDeviceInfo:


&lt;complexType name="ArrayOf_soapenc_string"&gt;
      &lt;complexContent&gt;
        &lt;restriction base="soapenc:Array"&gt;
          &lt;attribute ref="soapenc:arrayType" wsdl:arrayType="soapenc:string[]"/&gt;
        &lt;/restriction&gt;
      &lt;/complexContent&gt;
    &lt;/complexType&gt;


And that's it.. now you have a WSDL that matches the service and getProfileSoap works.


Now if you want to import a service ref instead of using wsdl.exe /svcutil.exe, then put that WSDL on a webserver and import it. And pay attention that the reference probably now uses http instead of https, so make sure that the ccm url uses https. In my case, with WCF, the import created both a http and https config and for some reason the proper transport type (as well as the CCM url) was already in there so I was good from the getgo.</summary>
    <dc:creator>Stephan Steiner</dc:creator>
    <dc:date>2010-03-03T14:55:32Z</dc:date>
  </entry>
  <entry>
    <title>WebDialer SOAP interface Serialization issues using .NET</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=1777772" />
    <author>
      <name>Jonathan Withers</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=1777772</id>
    <updated>2009-11-17T22:55:13Z</updated>
    <published>2009-11-17T22:55:13Z</published>
    <summary type="html">Hi,
 
I'm using CUCM 6.1(2) and the WebDailer Soap interface with a .NET (3.5) client. I can sucessfully call the makeCall method.
 
However if i Call the getProfileSoap() method i get an error on deserializstion.
 
There is an error in XML document (1, 1411).

{"Cannot assign object of type System.String[] to an object of type System.String."}
 
"   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderWebdialerSoap.Read1_WDDeviceInfo()\r\n   at System.Xml.Serialization.XmlSerializationReader.ReadReferencingElement(String name, String ns, Boolean elementCanBeType, String&amp; fixupReference)\r\n   at System.Xml.Serialization.XmlSerializationReader.ReadReferencedElements()\r\n   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderWebdialerSoap.Read11_getProfileSoapResponse()\r\n   at Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectSerializer7.Deserialize(XmlSerializationReader reader)\r\n   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)"

 
Attached is the SOAP response that is being returned. Does anyone know how to resolve this issue
 </summary>
    <dc:creator>Jonathan Withers</dc:creator>
    <dc:date>2009-11-17T22:55:13Z</dc:date>
  </entry>
</feed>

