CM_Mappings Configuration Service Provider

  • Thread starter Thread starter MDB
  • Start date Start date
M

MDB

Hello all, I am trying to set / remove the work url exceptions
programmatically and have been told in previous post that I need to look at
this and the DMProcessConfigXML. So far I have had no luck and was
wondering if anyone else has done this and if so, could you show me how or
give me some pointers?

TIA
 
It's basically the way it is described in the SDK
You call DMProcessConfigXml and pass it the following XML:

<wap-provisioningdoc>
<characteristic type="CM_Mappings">
<characteristic type="1005">
<parm name="pattern" value="*://*.msn.com/*"/>
<parm name="network"
value="{C1D06580-B364-45ec-8421-5ACF34129C58}"/>
</characteristic>
</characteristic>
</wap-provisioningdoc>
The pattern needs to be replaced with your exception - e.g.
"http://*.mycompany.com"
The network is one of the newtork guids:
Internet: {436EF144-B4FB-4863-A041-8F905A62C572}
Work: {A1182988-0D73-439e-87AD-2A5B369F808B}
WAP: {7022E968-5A97-4051-BC1C-C578E2FBA5D9}
 
Okay, I will try it again. Thanks


Alex Feinman said:
It's basically the way it is described in the SDK
You call DMProcessConfigXml and pass it the following XML:

<wap-provisioningdoc>
<characteristic type="CM_Mappings">
<characteristic type="1005">
<parm name="pattern" value="*://*.msn.com/*"/>
<parm name="network"
value="{C1D06580-B364-45ec-8421-5ACF34129C58}"/>
</characteristic>
</characteristic>
</wap-provisioningdoc>
The pattern needs to be replaced with your exception - e.g.
"http://*.mycompany.com"
The network is one of the newtork guids:
Internet: {436EF144-B4FB-4863-A041-8F905A62C572}
Work: {A1182988-0D73-439e-87AD-2A5B369F808B}
WAP: {7022E968-5A97-4051-BC1C-C578E2FBA5D9}
 
Alex,

I am using the example I found here:
http://www.smartphonethoughts.com/articles.php?action=expand,4397

by passing in this:
string strXml = "<wap-provisioningdoc><characteristic
type=''CM_Mappings''><characteristic type=''1005''><parm name=''pattern''
value=''*://*.msn.com/*''/><parm name=''network''
value=''{436EF144-B4FB-4863-A041-8F905A62C572}''/></characteristic></characteristic></wap-provisioningdoc>";

string x = PMMobile.Classes.ConfigWrapper.ProcessXml(strXml);

And I get this error number: 2147753993 which I can not seem to find
anywhere. Do you have any idea what it means?
 
The xml seems correct (although the quotes look like they are not escaped).
Two things:
1) Before passing xml to DMProcessConfigXml try validating it by calling
XmlDocument.LoadXml()
2) Test your xml using RapiConfig tool (SDK, Tools directory). Run it as:
RapiConfig /P yourconfigfile.xml
 
Thanks Alex, I think I have it working now.

Alex Feinman said:
The xml seems correct (although the quotes look like they are not
escaped). Two things:
1) Before passing xml to DMProcessConfigXml try validating it by calling
XmlDocument.LoadXml()
2) Test your xml using RapiConfig tool (SDK, Tools directory). Run it as:
RapiConfig /P yourconfigfile.xml
 
Hi Alex, MDB,

I try to setup an URL exception but it still does not work.
What I want to do: I have a PC with 2 network interfaces (one ethernet
and the other one through an usb device). My PPC is connected to my PC
through USB activesync.
I want to be able to connect to internet from my PPC. To do so, I have
configured an HTTP proxy in my PPC (to connect internet though my PC
ethernet interface). It works. I also want to be able to connect to my
(local) 2nd network interface from the PPC. To do so, I indicate this
local interface as an HTTP exception (through
settings/connection/exception). It works well.

Now I want to setup all that stuff programmatically. I succedded into
setup the proxy (DMProcessConfigXML with a CM_ProxyEntries:
SrcId=18AD9FBD-F716-ACB6-FD8A-1965DB95B814 and
DestId=436EF144-B4FB-4863-A041-8F905A62C572). I did not succed into
setup an URL exception ... In fact, I do not know which network GUID
should be indicated. I tried almost all known GUID and the exceptions
list is still empty ...

Thank for your support
Frederic
 
Back
Top