Illegal call to webmethods https protocol

Hi all,
i am trying to login to a HTTPs site using a Java service.
i have a jar file that has the class to connect to the HTTPs site.
i created a java service that instantiates the class and uses the logon function to log to the site. but iam getting an error

General Exception:Illegal call to webMethods https protocol handler

but when i created a java class outside webmethods and tried to call the jar file it connected to the website.

is there any HTTPS isuue that i have to take care like the keystore

this is an urgent situation can anybody help me out.

thanks

This link will show the response:
http://advantage.webmethods.com/cgi-bin/advantage/main.jsp?w=0&targChanId=knowledgebase&oid=1611849088

In short download and install JSSE and amend the server.bat with the following:
Set JAVA_MEMSET=-ms%JAVA_MIN_MEM%-mx%JAVA_MAX_MEM%-Djava.protocol.handler.pkgs=“com.sun.net.ssl.internal.www.protocol”

Thanks Topster for the solution,
It did solve the problem.

What We did is , In the Java code added the line
System.getProperties().setProperty(“java.protocol.handler.pkgs”,
“com.sun.net.ssl.internal.www.protocol”);

In the webmethods service . After the call to the java class’s method is completed, we reset the above property back to the original value .
Hoping that the HTTPs Listner wont get messed up in this way.
System.getProperties().setProperty(“java.protocol.handler.pkgs”,
“com.wm.net.protocol”);

Hi All,
We are trying to hit a URL using https call using a third party API,but we get error “java.lang.RuntimeException: Illegal call to webMethods https protocol handler”.On the other hand same call using http is giving proper response.

Do we need to download JSSE.jar.If so where it is to be placed,from where to download and which version.After that is it required to change server.bat as above?

Is there any other solution?

-Amruta

read an action the thread link and all will work as shown above

  1. download and install JSSE
  2. in your custom code, using in-built service to set https protocol handler to com.sun.net.ssl.internal.www.protocol, after call has been made rest this to com.wm.net.protocol

hth

Thanks for help! It worked now . But now we are facing another problem.
When we try to run a java service from WebMethods we get “No trusted certificates found Error”.Same code is running if we are running as standalone java code.Attached is the code.

What could be the problem?

-Amruta


TestCRIF.java (2.6 k)

Hi,
I am facing same problem. I am trying to access https URL in java service using Web Method Developer.
I already have jsse.jar at location /Program Files/j2sdk1.4.2/jre/lib on my webmethod server and I am setting following values:

// Dynamic registration of JSSE provider
java.security.Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
// Need to be set
System.getProperties().setProperty(“java.protocol.handler.pkgs”,
“com.sun.net.ssl.internal.www.protocol”);

Is this right? I get the error as →
com.wm.app.b2b.server.ServiceException:
com.wm.app.b2b.server.ServiceSetupException:
java.lang.NoClassDeffoundError:
com/sun/net/ssl/Internal/ssl/Provider

Please suggest.

Thanks
SSA