0

i`m trying to reproduce a SOAP request produced with the intel upnp developer tools stack.

with the device sniffer i was able to capture the following request

can someone point out to me what would be the easiest way to reproduce this?

the source of the packet:

POST /_urn-upnp-org-serviceId-SwitchPower.0001_control HTTP/1.1
SOAPACTION: "urn:schemas-upnp-org:service:SwitchPower:1#SetTarget"
CONTENT-TYPE: text/xml; charset="utf-8"
HOST: 192.168.1.18:1451
Content-Length: 347

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"      xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Body>
  <u:SetTarget xmlns:u="urn:schemas-upnp-org:service:SwitchPower:1">
     <newTargetValue>0</newTargetValue>
  </u:SetTarget>
</s:Body>
</s:Envelope>HTTP/1.1 200 OK
EXT: 
CONTENT-TYPE: text/xml; charset="utf-8"
SERVER: Windows NT/5.0, UPnP/1.0
Content-Length: 290

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"     xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Body>
    <u:SetTargetResponse xmlns:u="urn:schemas-upnp-org:service:SwitchPower:1" />
  </s:Body>
</s:Envelope>
Tobrun
  • 17,781
  • 10
  • 62
  • 78

1 Answers1

1

One easy way is to just open a stream to the system on port 80, then just write the characters out literally. You can get the response that way, as well. This is, however, not the best way to actually process anything that comes back. You can send a normal request via How to send HTTP request in java?, where you can also interpret the response.

Community
  • 1
  • 1
0xCAFEBABE
  • 5,280
  • 5
  • 30
  • 54