Discussion:
MapPointArgumentNullException
(too old to reply)
Jason Brown - KCPL
2009-09-11 19:12:01 UTC
Permalink
I am trying to use the GetLocationInfo web service to do some reverse
geocoding, but I get a MapPointArgumentNullException "The value for the
specified argument cannot be null. Argument: dataSourceName". The SOAP
packet I send has a dataSourceName defined so I'm not sure what the problem
is. The request packet:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/1999/XMLSchema"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<GetLocationInfo xmlns="">
<location xsi:type="tns:LatLong">
<Latitude xsi:type="xsd:double">38.9194030901493</Latitude>
<Longitude xsi:type="xsd:double">-94.7408312946997</Longitude>
</location>
<dataSourceName xsi:type="xsd:string">MapPoint.NA</dataSourceName>
<options/>
</GetLocationInfo>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

And the return packet:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<soap:Fault>
<faultcode>soap:Client</faultcode>
<faultstring>The value for the specified argument cannot be null.
Argument: dataSourceName</faultstring>
<faultactor>http://s.mappoint.net/mappoint-30/</faultactor>
<detail MapPointArgumentException="">
<Type
xmlns="http://s.mappoint.net/mappoint-30/">MapPointArgumentNullException</Type>
<Message xmlns="http://s.mappoint.net/mappoint-30/">The value for
the specified argument cannot be null. Argument: dataSourceName</Message>
<Argument
xmlns="http://s.mappoint.net/mappoint-30/">dataSourceName</Argument>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>
Derek Chan
2009-09-14 18:13:04 UTC
Permalink
Hi,

Is this the only FindServiceSoap method that you're experiencing issues?
Can you do a FindAddress can get results? I entered your parameters and the
reverse geocode query ran fine using Mappoint.NA

Regards,
--
Infusion Development
http://www.infusion.com
Post by Jason Brown - KCPL
I am trying to use the GetLocationInfo web service to do some reverse
geocoding, but I get a MapPointArgumentNullException "The value for the
specified argument cannot be null. Argument: dataSourceName". The SOAP
packet I send has a dataSourceName defined so I'm not sure what the problem
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/1999/XMLSchema"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<GetLocationInfo xmlns="">
<location xsi:type="tns:LatLong">
<Latitude xsi:type="xsd:double">38.9194030901493</Latitude>
<Longitude xsi:type="xsd:double">-94.7408312946997</Longitude>
</location>
<dataSourceName xsi:type="xsd:string">MapPoint.NA</dataSourceName>
<options/>
</GetLocationInfo>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<soap:Fault>
<faultcode>soap:Client</faultcode>
<faultstring>The value for the specified argument cannot be null.
Argument: dataSourceName</faultstring>
<faultactor>http://s.mappoint.net/mappoint-30/</faultactor>
<detail MapPointArgumentException="">
<Type
xmlns="http://s.mappoint.net/mappoint-30/">MapPointArgumentNullException</Type>
<Message xmlns="http://s.mappoint.net/mappoint-30/">The value for
the specified argument cannot be null. Argument: dataSourceName</Message>
<Argument
xmlns="http://s.mappoint.net/mappoint-30/">dataSourceName</Argument>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>
Jason Brown - KCPL
2009-09-14 18:32:01 UTC
Permalink
The problem was that Perl defaults to a RPC/encoding SOAP format and .Net
expects a document/literal format. Specificly, the GetLocationInfo tag had
an empty xmlns attribute, which should have been
'http://s.mappoint.net/mappoint-30/'. I rearranged my Perl code a little bit
and added the needed attribute. Everything works fine now.
Post by Derek Chan
Hi,
Is this the only FindServiceSoap method that you're experiencing issues?
Can you do a FindAddress can get results? I entered your parameters and the
reverse geocode query ran fine using Mappoint.NA
Regards,
--
Infusion Development
http://www.infusion.com
Post by Jason Brown - KCPL
I am trying to use the GetLocationInfo web service to do some reverse
geocoding, but I get a MapPointArgumentNullException "The value for the
specified argument cannot be null. Argument: dataSourceName". The SOAP
packet I send has a dataSourceName defined so I'm not sure what the problem
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/1999/XMLSchema"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<GetLocationInfo xmlns="">
<location xsi:type="tns:LatLong">
<Latitude xsi:type="xsd:double">38.9194030901493</Latitude>
<Longitude xsi:type="xsd:double">-94.7408312946997</Longitude>
</location>
<dataSourceName xsi:type="xsd:string">MapPoint.NA</dataSourceName>
<options/>
</GetLocationInfo>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<soap:Fault>
<faultcode>soap:Client</faultcode>
<faultstring>The value for the specified argument cannot be null.
Argument: dataSourceName</faultstring>
<faultactor>http://s.mappoint.net/mappoint-30/</faultactor>
<detail MapPointArgumentException="">
<Type
xmlns="http://s.mappoint.net/mappoint-30/">MapPointArgumentNullException</Type>
<Message xmlns="http://s.mappoint.net/mappoint-30/">The value for
the specified argument cannot be null. Argument: dataSourceName</Message>
<Argument
xmlns="http://s.mappoint.net/mappoint-30/">dataSourceName</Argument>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>
Loading...