Estoy comenzando con Power BI y ahora me encuentro con el reto de conectarme a un origen de datos provenientes de un WebService realizado sobre asmx, la dirección de WebService es:
http://www.testws.com:65/com_InfoListAll.asmx
Al ingresar a la dirección anterior desde el navegador la información que contiene mi Web Service es la siguiente:
Com_InfoListAll
The following operations are supported. For a formal definition, please review the Service Description.
- InfoTravel
- ShowList
This web service is using http://tempuri.org/ as its default namespace.
Recommendation: Change the default namespace before the XML Web service is made public.
Each XML Web service needs a unique namespace in order for client applications to distinguish it from other services on the Web. http://tempuri.org/ is available for XML Web services that are under development, but published XML Web services should use a more permanent namespace.
Your XML Web service should be identified by a namespace that you control. For example, you can use your company's Internet domain name as part of the namespace. Although many XML Web service namespaces look like URLs, they need not point to actual resources on the Web. (XML Web service namespaces are URIs.)
For XML Web services creating using ASP.NET, the default namespace can be changed using the WebService attribute's Namespace property. The WebService attribute is an attribute applied to the class that contains the XML Web service methods. Below is a code example that sets the namespace to "http://microsoft.com/webservices/":
C#
[WebService(Namespace="http://microsoft.com/webservices/")]
public class MyWebService {
// implementation
}
Visual Basic
<WebService(Namespace:="http://microsoft.com/webservices/")> Public Class MyWebService
' implementation
End Class
C++
[WebService(Namespace="http://microsoft.com/webservices/")]
public ref class MyWebService {
// implementation
};
For more details on XML namespaces, see the W3C recommendation on Namespaces in XML.
For more details on WSDL, see the WSDL Specification.
For more details on URIs, see RFC 2396.
Claramente se evidencia que utilizo dos métodos, los cuales son InfoTravel
y ShowList
La dirección del método InfoTravel
es:
http://www.testws.com:65/com_InfoListAll.asmx?op=InfoTravel
La dirección del método ShowList
es:
http://www.testws.com:65/com_InfoListAll.asmx?op=ShowList
El contenido del método InfoTravel
es el siguiente:
Com_InfoListAll
Click here for a complete list of operations.
InfoTravel
Test
To test the operation using the HTTP POST protocol, click the 'Invoke' button.
Parameter Value
username:
password:
Type:
ID:
SOAP 1.1
The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.
POST /com_InfoListAll.asmx HTTP/1.1
Host: www.testws.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://tempuri.org/InfoTravel"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<InfoTravel xmlns="http://tempuri.org/">
<username>string</username>
<password>string</password>
<Type>int</Type>
<ID>string</ID>
</InfoTravel>
</soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<InfoTravelResponse xmlns="http://tempuri.org/">
<InfoTravelResult />
</InfoTravelResponse>
</soap:Body>
</soap:Envelope>
SOAP 1.2
The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.
POST /com_InfoListAll.asmx HTTP/1.1
Host: www.testws.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<InfoTravel xmlns="http://tempuri.org/">
<username>string</username>
<password>string</password>
<Type>int</Type>
<ID>string</ID>
</InfoTravel>
</soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<InfoTravelResponse xmlns="http://tempuri.org/">
<InfoTravelResult />
</InfoTravelResponse>
</soap12:Body>
</soap12:Envelope>
HTTP GET
The following is a sample HTTP GET request and response. The placeholders shown need to be replaced with actual values.
GET /com_InfoListAll.asmx/InfoTravel?username=string&password=string&Type=string&ID=string HTTP/1.1
Host: www.testws.com
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<anyType xmlns="http://tempuri.org/" />
HTTP POST
The following is a sample HTTP POST request and response. The placeholders shown need to be replaced with actual values.
POST /com_InfoListAll.asmx/InfoTravel HTTP/1.1
Host: www.testws.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
username=string&password=string&Type=string&ID=string
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<anyType xmlns="http://tempuri.org/" />
El contenido del metodo de ShowList
es:
Com_InfoListAll
Click here for a complete list of operations.
ShowList
Test
To test the operation using the HTTP POST protocol, click the 'Invoke' button.
Parameter Value
username:
password:
SOAP 1.1
The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.
POST /com_InfoListAll.asmx HTTP/1.1
Host: www.testws.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://tempuri.org/ShowList"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ShowList xmlns="http://tempuri.org/">
<username>string</username>
<password>string</password>
</ShowList>
</soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ShowListResponse xmlns="http://tempuri.org/">
<ShowListResult />
</ShowListResponse>
</soap:Body>
</soap:Envelope>
SOAP 1.2
The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.
POST /com_InfoListAll.asmx HTTP/1.1
Host: www.testws.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<ShowList xmlns="http://tempuri.org/">
<username>string</username>
<password>string</password>
</ShowList>
</soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<ShowListResponse xmlns="http://tempuri.org/">
<ShowListResult />
</ShowListResponse>
</soap12:Body>
</soap12:Envelope>
HTTP GET
The following is a sample HTTP GET request and response. The placeholders shown need to be replaced with actual values.
GET /com_InfoListAll.asmx/ShowList?username=string&password=string HTTP/1.1
Host: www.testws.com
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<anyType xmlns="http://tempuri.org/" />
HTTP POST
The following is a sample HTTP POST request and response. The placeholders shown need to be replaced with actual values.
POST /com_InfoListAll.asmx/ShowList HTTP/1.1
Host: www.testws.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
username=string&password=string
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<anyType xmlns="http://tempuri.org/" />
Como pueden visualizar cada método solicita unos parámetros
La fuente de datos en Power BI a la que me estoy conectando es Web y lo realizo de la siguiente manera agregando la URL principal de mi Web Service en el apartado básico:
Al intentar realizar la conexión de esta manera obtengo como mensaje de error lo siguiente:
También intente desde el apartado avanzado agregando la URL por partes con cada uno de los métodos de la siguiente manera:
Aquí con esta opción si se realiza la conexión pero los datos que se obtienen son los mismos parámetros y lo que se encuentra en el HTML.
No se si tenga que realizar alguna configuración previa en el apartado de avanzado con respecto a los parámetros, espero que alguien me pueda dar un poco de orientación en como hacerlo.
Actualización 1:
He intentado conectarme por medio del origen de datos consulta en blanco de la siguiente manera:
Y he agregado la siguiente consulta:
let
Source = Web.Contents(
"http://www.testws.com:84/com_InfoListAll.asmx",
[
RelativePath = "InfoTravel",
Query=
[
username = "username",
password = "password",
Type = "99",
ID = "1001"
]
])
in
Source
Al conectarme a esta fuente de datos obtengo el archivo binario de la siguiente manera:
Luego presiono sobre el y me carga toda la información en un solo campo de la tabla de la siguiente manera:
Quisiera saber si hay un paso previo a cargar los datos o los estoy cargando incorrectamente.