Software agents need to combine information from a variety of heterogeneous sources in the course of automating a task, such as planning a trip. In order to be able to use a source, an agent must have a model of it, i.e., understand the semantics of the input and output data it uses, as well as its functionality. Currently, source modeling is done by the user, but as large numbers of sources come online, it is impractical to expect the user to manually model them. To address this problem, it has been proposed that service providers use common ontologies. However, it appears to be equally impractical to expect service providers to conform to a standard, as there is very little incentive for them to do so. Instead, we propose to automatically learn the semantics of information sources by labeling the input and output parameters used by the source with semantic types of the user's domain model. We describe two machine learning techniques for semantic labeling: one that uses source's metadata, such as that contained in a Web Service Definition file, and one that uses the source's content to classify the semantic types it uses. We go beyond previous works by verifying the classifier's predictions by invoking the source with some sample data of the predicted type. We provide performance results of both classification methods and validate our approach on several live Web source -both Web services and HTML-form based sources. We also describe application of the semantic mapping technology within the CALO project.