This is the entire soap method as captured by etherpeek, from my C++
application that works...
Citation:
POST /uuid:dynsvc/WANIPConnection:1 HTTP/1.1
HOST: 192.168.1.1:5431
SOAPACTION: "urn:schemas-upnp-org:service:WANIPConnection:
1#GetExternalIPAddress"
CONTENT-TYPE: text/xml ; charset="utf-8"
Content-Length: 274
<?xml version="1.0"?>
<s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/
encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<u:GetExternalIPAddress xmlns:u="urn:schemas-upnp-
org:service:WANIPConnection:1" />
</s:Body>
</s:Envelope>
|
How do I create a SoapMethod to match this?
In particular the methodNamespace, action and url.
Code:
Dim sm as SoapMethod
Dim sr as SOAPResult
sm = New SoapMethod("http://192.168.1.1:5431/dynsvc/WANIPConnection:
1.xml")
sm.methodNamespace = "u"
sm.action = "u:GetExternalIPAddress xmlns:u=" + chr(34) +
"urn:schemas-upnp-org:service:WANIPConnection:1" + chr(34)
sm.url = location
sr = sm.invoke("GetExternalIPAddress")
MsgBox sr.result("NewExternalIPAddress")
// catch exceptions
Exception err as SOAPException
MsgBox "SOAP Error: " + err.message
This is what I'm trying but I'm fumbling in the dark...
Is there something wrong with this question? I don't seem to be
getting any responce..
Code:
sm = New SoapMethod("http://192.168.1.1:5431/dynsvc/WANIPConnection:
1.xml")
sm.GetExternalIPAddress()
That doesn't work either...