Hi,
Thanks for the kind reply,
Executed the script..,

JVM is not able to establish any TCP/IP connection:

For JDK1.4, the below error is thrown :
Exception in thread "main" java.net.SocketException: Address family not
supporte
d by protocol family: create
        at java.net.Socket.createImpl(Socket.java:312)
        at java.net.Socket.<init>(Socket.java:285)
        at java.net.Socket.<init>(Socket.java:118)
        at SocketTest.main(SocketTest.java:11)



For JDK1.3, the below error is thrown,
Exception in thread "main" java.net.UnknownHostException:
xml.apache.org
        at java.net.InetAddress.getAllByName0(InetAddress.java:571)
        at java.net.InetAddress.getAllByName0(InetAddress.java:540)
        at java.net.InetAddress.getByName(InetAddress.java:449)
        at java.net.Socket.<init>(Socket.java:100)
        at SocketTest.main(SocketTest.java:11)


Thanx in advance,
Rathna N.

>>> [EMAIL PROTECTED] 10/8/2002 6:44:16 PM >>>
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" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
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:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>


--
To unsubscribe, e-mail:  
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to