Quantcast
Channel: SCN : Discussion List - SAP NetWeaver Application Server
Viewing all articles
Browse latest Browse all 3078

exception in P4-HTTP

$
0
0

Hi

I have this P4-HTTP example

 

import javax.naming.InitialContext;

import javax.naming.NamingException;

import java.util.Properties;

 

public class ExampleTransportTypesSwitching {

 

   private static InitialContext ctx = null;

 

   public static void main(String[] args) {

   init ("P4HTTP://", "172.16.10.65", "50004", "administrator", "123QWEasd", "httptunneling");

  }

 

   public static void init(String schema, String host, String port, String user, String pass, String transportType) {

   try {

  Properties p = new Properties();

   if (schema == null) {

  schema = "P4://";

  }

  p.put("java.naming.factory.initial", "com.sap.engine.services.jndi.InitialContextFactoryImpl");

  p.put("java.naming.provider.url", host+":"+port);

  p.put("java.naming.security.principal", user);

  p.put("java.naming.security.credentials", pass);

   // Parameter transportType for Transport Layer Queue has value
  // "None", "ssl", "httptunneling_ssl" or "httptunneling".
   p.put("TransportLayerQueue", transportType);

   ctx = new InitialContext(p);

  System.out.println("NamingClient context: " + ctx);

  } catch(NamingException e) {

  e.printStackTrace();

  }

  }

 

on my server SAP NW 7.4 listen 50004,50007,50008 ports. I can send and receive successfully RMI requests, but over HTTP don't can. I got this exception

 

java.net.SocketException: Connection reset

  at java.net.SocketInputStream.read(SocketInputStream.java:209)

  at java.net.SocketInputStream.read(SocketInputStream.java:141)

  at java.net.SocketInputStream.read(SocketInputStream.java:223)

  at com.sap.engine.services.httptunneling.HttpLib.readLine(HttpLib.java:159)

  at com.sap.engine.services.httptunneling.HttpLib.readHeader(HttpLib.java:182)

  at com.sap.engine.services.httptunneling.HttpTunnelingSocket.createConnection(HttpTunnelingSocket.java:208)

  at com.sap.engine.services.httptunneling.HttpTunnelingSocket.<init>(HttpTunnelingSocket.java:113)

  at com.sap.engine.services.httptunneling.HttpTunnelingTransportFactory.getSocket

 

Please help, what I do wrong?

 

tnx


Viewing all articles
Browse latest Browse all 3078

Trending Articles