Posting XML To HTTPS
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Good afternoon,
I am looking to query a private web server by uploading an XML request and reading the XML response. In VBA I use code similar to this:
Dim oWinhttp As WinHttpRequest
Set oWinhttp = New WinHttpRequest
Dim result As Variant
With oWinhttp
Call .SetTimeouts(300000, 300000, 300000, 300000)
Call .Open("POST", "https://xml.service.com/comm/xml/submit")
Call .SetCredentials("username", "password", 0)
Call .SetRequestHeader("POST", "/comm/xml/submit HTTP/1.1")
Call .SetRequestHeader("HOST", "xmltrn.xml.com")
Call .SetRequestHeader("Content-Type", "text/xml")
Call .SetRequestHeader("Content-Length", Len(sXML))
Call .SetRequestHeader("SOAPAction", "/comm/xml/submit")
Call .Send(sXML)
'Wait for the response asynchronously.
Call .WaitForResponse
result = .ResponseText
Where sXML contains the XML file to be submitted.
Is there any way to perform this operation easily from MatLab?
0 comentarios
Respuestas (1)
Guillaume
el 19 de Mzo. de 2015
If you're on the latest version of matlab (2015a), then I believe webwrite will do exactly the same.
In older versions of matlab, I don't believe there's anything, but you could always delegate to java or .Net
0 comentarios
Ver también
Categorías
Más información sobre Call Web Services from MATLAB Using HTTP en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!