You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by Rathna N <NR...@novell.com> on 2002/10/08 12:39:35 UTC

Address family not supported by protocol family...

Hi All,
I have a program running on a windows 95 japanese m\c, which sends SOAP
HTTP request to a server.
But it always get an error stating 
[SOAPException: faultCode=SOAP-ENV:Client ; msg=Error opening socket :
Address family not supported by protocol family : create;
targetException=java.lang.IllegalArgumentException : Error opening
socket : Address family not supported by protocol family : create ]
at
org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.java:324)
at org.apache.soap.messaging.Message.send(Message.java :123)

Any help as to why i am getting this error, is greatly appreciated.
Thanx in advance,
Rathna N.

--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


Re: Address family not supported by protocol family...

Posted by Scott Nichol <sn...@scottnichol.com>.
Wow.  This error would come from the underlying socket() call.  Can that
machine and JVM establish any TCP/IP connection?  For example, does
something like the following work:

import java.io.InputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.net.Socket;
import java.net.URL;

public class SocketTest {
 public static void main(String[] args) throws Exception {
  URL url = new URL("http://xml.apache.org:80/soap/index.html");
  Socket s = new Socket(url.getHost(), url.getPort());
  System.out.println("Socket connected.");
  s.setTcpNoDelay(true);
  OutputStream os = s.getOutputStream();
  OutputStreamWriter osw = new OutputStreamWriter(os, "ASCII");
  osw.write("GET " + url.getFile() + " HTTP/1.1\r\nHost: " +
url.getHost() + ":" + url.getPort() + "\r\nContent-Length: 0\r\n\r\n");
  osw.flush();
  System.out.println("Request sent, read response.");
  InputStream is = s.getInputStream();
  byte[] buf = new byte[2048];
  int len;
  while ((len = is.read(buf, 0, 2048)) > 0)
   System.out.write(buf, 0, len);
  is.close();
  os.close();
 }
}

Scott Nichol

----- Original Message -----
From: "Rathna N" <NR...@novell.com>
To: <so...@xml.apache.org>
Sent: Tuesday, October 08, 2002 6:39 AM
Subject: Address family not supported by protocol family...


> Hi All,
> I have a program running on a windows 95 japanese m\c, which sends
SOAP
> HTTP request to a server.
> But it always get an error stating
> [SOAPException: faultCode=SOAP-ENV:Client ; msg=Error opening socket :
> Address family not supported by protocol family : create;
> targetException=java.lang.IllegalArgumentException : Error opening
> socket : Address family not supported by protocol family : create ]
> at
>
org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnectio
n.java:324)
> at org.apache.soap.messaging.Message.send(Message.java :123)
>
> Any help as to why i am getting this error, is greatly appreciated.
> Thanx in advance,
> Rathna N.
>
> --
> To unsubscribe, e-mail:
<ma...@xml.apache.org>
> For additional commands, e-mail:
<ma...@xml.apache.org>
>
>


Re: Address family not supported by protocol family...

Posted by Scott Nichol <sn...@scottnichol.com>.
Wow.  This error would come from the underlying socket() call.  Can that
machine and JVM establish any TCP/IP connection?  For example, does
something like the following work:

import java.io.InputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.net.Socket;
import java.net.URL;

public class SocketTest {
 public static void main(String[] args) throws Exception {
  URL url = new URL("http://xml.apache.org:80/soap/index.html");
  Socket s = new Socket(url.getHost(), url.getPort());
  System.out.println("Socket connected.");
  s.setTcpNoDelay(true);
  OutputStream os = s.getOutputStream();
  OutputStreamWriter osw = new OutputStreamWriter(os, "ASCII");
  osw.write("GET " + url.getFile() + " HTTP/1.1\r\nHost: " +
url.getHost() + ":" + url.getPort() + "\r\nContent-Length: 0\r\n\r\n");
  osw.flush();
  System.out.println("Request sent, read response.");
  InputStream is = s.getInputStream();
  byte[] buf = new byte[2048];
  int len;
  while ((len = is.read(buf, 0, 2048)) > 0)
   System.out.write(buf, 0, len);
  is.close();
  os.close();
 }
}

Scott Nichol

----- Original Message -----
From: "Rathna N" <NR...@novell.com>
To: <so...@xml.apache.org>
Sent: Tuesday, October 08, 2002 6:39 AM
Subject: Address family not supported by protocol family...


> Hi All,
> I have a program running on a windows 95 japanese m\c, which sends
SOAP
> HTTP request to a server.
> But it always get an error stating
> [SOAPException: faultCode=SOAP-ENV:Client ; msg=Error opening socket :
> Address family not supported by protocol family : create;
> targetException=java.lang.IllegalArgumentException : Error opening
> socket : Address family not supported by protocol family : create ]
> at
>
org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnectio
n.java:324)
> at org.apache.soap.messaging.Message.send(Message.java :123)
>
> Any help as to why i am getting this error, is greatly appreciated.
> Thanx in advance,
> Rathna N.
>
> --
> To unsubscribe, e-mail:
<ma...@xml.apache.org>
> For additional commands, e-mail:
<ma...@xml.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>