Note that there are some explanatory texts on larger screens.

plurals
  1. POsoap communication using Java socket works, but switching over to java soapconnection does not
    primarykey
    data
    text
    <p>I recently asked a question about building a SOAP message using the java provided soap library <a href="https://stackoverflow.com/questions/10286209/cannot-change-soap-uri-in-envelope-using-java-soapmessage" title="Changing default soap URI">Changing default soap URI</a>, so that question may end up bleeding into this one a bit depending on what the answer to the last one may be (and in fact, the answer to this question may mean that I don't have to worry about my other question)</p> <p>I've connected to the device I am communicating with via the java socket library and passed messages back and forth, however today I decided that with all that is available to me from java in the way of SOAP stuff, why not just use its provided SOAP library? </p> <p>Well, it's a headache now, but I'm sure it will be beneficial once it is up and running. Either way, when I previously communicated with the device, I simply opened the socket at IP address <code>xxx.xxx.xxx.xxx</code> on <code>port 80</code>, but when I use the <code>SOAPConnection.call</code> method I get the following error:</p> <pre><code>Apr 23, 2012 3:47:06 PM com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection post SEVERE: SAAJ0008: Bad Response; null com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Bad response: (-1null at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.call(Unknown Source) at DeviceCommunicator.openConnection(DeviceCommunicator.java:184) at ClientRunner.main(ClientRunner.java:29) Caused by: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Bad response: (-1null at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.post(Unknown Source) ... 3 more </code></pre> <p>Here is the call, if that helps:</p> <pre><code>SOAPConnection sc = SOAPConnectionFactory.newInstance().createConnection(); SOAPMessage response = sc.call(sm, "http://xxx.xxx.xxx.xxx"); </code></pre> <p>Where the <code>xxx.xxx.xxx.xxx</code> is obviously the IP address of the device (and I've tried calls to the <code>SOAPConnection.call</code> method where the second argument was <code>http://xxx.xxx.xxx.xxx:80</code> without success as well).</p> <p>After some perusing of stackoverflow and general google searches, I've yet to find someone that has had a problem switching from socket communication to soap.</p> <p>EDIT:</p> <p>Unfortunately, I haven't solved the problem, however I did find using Wireshark that the message is being sent correctly <strong>and so is the response</strong>. I'm pretty perplexed as to why the response would see "null" - any takers?</p> <p>Thanks in advance,</p> <p>-M</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload