IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  Problem with Java service Example

    Posted 09/27/02 06:49 PM

    Hi,

    Attach an example of problem

    Note: If you change the URL for http protocol the java service work properly.

    We created the following Java Service.

    In the share tab I have the following imports.

    import java.net.*
    import java.security.*
    import java.io.*
    import javax.net.ssl.*

    Java source code:

    String buffer = “”;

    try
    {

    System.setProperty(“java.protocol.handler.pkgs”, “com.sun.net.ssl.internal.www.protocol”);
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());

    HttpURLConnection conn;

    URL url = new URL(“https://www.microsoft.com”);
    conn = (HttpURLConnection)url.openConnection();
    InputStream in = conn.getInputStream();
    InputStreamReader reader = new InputStreamReader(in);
    BufferedReader br = new BufferedReader(reader);
    String theLine;
    while ((theLine = br.readLine()) != null)
    {
    buffer += theLine;
    }
    }catch(Exception e)
    {
    buffer = e.toString();
    }

    // pipeline
    IDataCursor pipelineCursor_1 = pipeline.getCursor();
    IDataUtil.put( pipelineCursor_1, “Msg”, “Hello There” );
    IDataUtil.put( pipelineCursor_1, “HTML”, buffer );
    pipelineCursor_1.destroy();


    #webMethods
    #Integration-Server-and-ESB
    #webMethods-General


  • 2.  RE: Problem with Java service Example

    Posted 11/01/04 09:53 AM

    Did you ever get this problem resolved? I’m encountering what I think is the same problem. webMethods displays the following error: ‘Illegal call to webMethods https protocol handler’. The code I’m trying to execute follows. Any help you can give would be greatly apprecitated. Thanks !!

    try {
    URL verisign = new URL("https://www.verisign.com/");
    
    BufferedReader in = new BufferedReader(
    new InputStreamReader(
    verisign.openStream()));
    
    String inputLine;
    
    while ((inputLine = in.readLine()) != null)
    System.out.println(inputLine);
    
    in.close();
    }
    catch(Exception e) {
    System.out.println(e);
    }
    

    #webMethods
    #webMethods-General
    #Integration-Server-and-ESB