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:
<complexType name="WDDeviceInfo">
<sequence>
<element name="deviceName" type="xsd:string"/>
<element name="lines" type="xsd:string"/>
</sequence>
</complexType>
the lines element is the problem.. if you look at what's passing over the wire:
<deviceInfoList
soapenc:arrayType="
ns2:WDDeviceInfo[2]" xsi:type="
soapenc:Array">
<item href="
#id1" />
<item href="
#id2" />
</deviceInfoList>
<multiRef
id="
id2"
soapenc:root="
0" soapenv:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/" xsi:type="
ns3:WDDeviceInfo"
xmlns:ns3="<strong class="ns">urn:WebdialerSoap" xmlns:soapenc="<strong class="ns">http://schemas.xmlsoap.org/soap/encoding/">
<deviceName
xsi:type="
xsd:string">SEP0016D43F0C3D</deviceName>
- <lines soapenc:arrayType="
xsd:string[2]"
xsi:type="
soapenc:Array">
<item xsi:type="
xsd:string">3351 ; p_phones</item>
<item xsi:type="
xsd:string">7423 ; p_phones</item>
</lines>
</multiRef>
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:
<complexType name="WDDeviceInfo">
<sequence>
<element name="deviceName" type="xsd:string"/>
<element name="lines" type="impl:ArrayOf_soapenc_string"/>
</sequence>
</complexType>
And, since there's no ArrayOf_soapenc_string definition, we need to add the following before the definition of WDDeviceInfo:
<complexType name="ArrayOf_soapenc_string">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="soapenc:string[]"/>
</restriction>
</complexContent>
</complexType>
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.