locked
best way to interact with soap services using c# RRS feed

  • General discussion

  • Hello:

    I am trying to create a simple UPNP control point. 

    I have looked at:

    http://www.codeproject.com/Articles/458807/UPnP-code-for-Windows-8

    and have enumerated the pnp renderers and servers and at this point have service URL such as below:

    http://192.168.1.154:50001/desc/device.xml

    the call above returns below:

    This XML file does not appear to have any style information associated with it. The document tree is shown below.
    <root xmlns="urn:schemas-upnp-org:device-1-0">
    <specVersion>
    <major>1</major>
    <minor>0</minor>
    </specVersion>
    <device>
    <deviceType>urn:schemas-upnp-org:device:MediaServer:1</deviceType>
    <friendlyName>NAS</friendlyName>
    <manufacturer>Synology Inc.</manufacturer>
    <manufacturerURL>http://www.synology.com/</manufacturerURL>
    <modelName>DS412+</modelName>
    <modelDescription>Synology DLNA/UPnP Media Server</modelDescription>
    <modelURL>http://www.synology.com</modelURL>
    <serialNumber>C3KFN00525</serialNumber>
    <UDN>uuid:00113210-726d-0011-6d72-6d7210321100</UDN>
    <presentationURL>http://192.168.1.154:5000/</presentationURL>
    <iconList>
    <icon>
    <mimetype>image/jpeg</mimetype>
    <width>120</width>
    <height>120</height>
    <depth>24</depth>
    <url>/tmp_icon/dmsicon120.jpg</url>
    </icon>
    <icon>
    <mimetype>image/jpeg</mimetype>
    <width>48</width>
    <height>48</height>
    <depth>24</depth>
    <url>/tmp_icon/dmsicon48.jpg</url>
    </icon>
    <icon>
    <mimetype>image/png</mimetype>
    <width>120</width>
    <height>120</height>
    <depth>24</depth>
    <url>/tmp_icon/dmsicon120.png</url>
    </icon>
    <icon>
    <mimetype>image/png</mimetype>
    <width>48</width>
    <height>48</height>
    <depth>24</depth>
    <url>/tmp_icon/dmsicon48.png</url>
    </icon>
    </iconList>
    <serviceList>
    <service>
    <serviceType>urn:schemas-upnp-org:service:ConnectionManager:1</serviceType>
    <serviceId>urn:upnp-org:serviceId:ConnectionManager</serviceId>
    <SCPDURL>/connmgrSCPD.xml</SCPDURL>
    <controlURL>/ConnectionManager/control</controlURL>
    <eventSubURL>/ConnectionManager/event</eventSubURL>
    </service>
    <service>
    <serviceType>urn:schemas-upnp-org:service:ContentDirectory:1</serviceType>
    <serviceId>urn:upnp-org:serviceId:ContentDirectory</serviceId>
    <SCPDURL>/cdsxSCPD.xml</SCPDURL>
    <controlURL>/ContentDirectory/control</controlURL>
    <eventSubURL>/ContentDirectory/event</eventSubURL>
    </service>
    <service>
    <serviceType>
    urn:microsoft.com:service:X_MS_MediaReceiverRegistrar:1
    </serviceType>
    <serviceId>
    urn:microsoft.com:serviceId:X_MS_MediaReceiverRegistrar
    </serviceId>
    <SCPDURL>/msrrSCPD.xml</SCPDURL>
    <eventSubURL>/MediaReceiverRegistrar/event</eventSubURL>
    <controlURL>/MediaReceiverRegistrar/control</controlURL>
    </service>
    </serviceList>
    </device>
    </root>


    Now I need to do the below:

    1) make a http get call on the above URL

    2) interact with the soap 1.1 services returned at 1 (above). the full documentation for the services are at: http://www.upnp.org/specs/av/upnp-av-mediaserver-v1-device.pdf 

    3) connect to the pnp server and media browser that will work with the pnp server. 

    The same code at above seems to be using string literals and while i can cut and paste that code, it seems a bit kludgy to me. 

    my goal is to do everything as cleaning and using best practices as possible as i am trying to learn windows store coding.

    I tried to search and am a bit overwhelmed with the options and its never clear what the right approach is. the above call doesn't seem to have wsdl defined so i cannot use the wcf apis.

    Sunday, November 3, 2013 12:53 AM

All replies

  • Hi Rumman,

    Welcome here!

    According to your description, I would like to change this thread type as discussion.

    Thanks for your understanding!

    Regards!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, November 4, 2013 3:04 AM
    Moderator