• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Please help, need an expert in java.policy

 
Gopi Krishna
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am trying to access a Webmethod B2B service from a jsp page.
and getting an error HttpURLConnection. Unable to connect to server.
I have a Webmethods B2B server classes which basically will create a context and will help you to connect to server. If I write that code in a stand alone java class and run it from my PC it is able to invoke the Webmethod service. But was failing if I include the same code inside a jsp page and access that page from browser. I am using Weblogic 5.1 to run my jsp page.
I am wondering whether permissions in weblogic.policy is not allowing me to make a socket connection to webmethod server.
weblogic server is running on my pc. and webmethod server is running on different machine over network.
Here is code written in jsp
<%
com.wm.app.b2b.client.Context ctx = new com.wm.app.b2b.client.Context();
try {
ctx.connect("macinename ort#", "Administrator", "password");
} catch (Exception e) {
e.printStackTrace();
}
alues out1 = ctx.invoke("Sandbox.Gopi", "Hello", in);
%>

thnaks in advance
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic