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.

 View Only
  • 1.  Java Compiler Error

    Posted Thu September 27, 2007 10:52 PM

    Hi All ,

    any one know what is this means

    C:\Program Files\webMethods6\IntegrationServer\packages\Test\code\source\Test.java:71: cannot resolve symbol
    symbol : class PostMethod
    location: class Test
    PostMethod mPost = new PostMethod(postURL);


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: Java Compiler Error

    Posted Fri September 28, 2007 12:33 AM

    Are you sure you should be writing Java? :wink:

    The class PostMethod cannot be found. You either need to import the class with an import configuration on the service or use the fully-qualified classname.

    In my humble opinion, you are headed down the wrong path in trying to do an HTTP post using Java code within IS. There are two reasons for this statement: 1) IS can perform HTTP posts just fine and provides services to do so–you are reinventing the wheel; 2) you are apparently new to Java as this error is a very, very basic problem. I would advise strongly against continuing down this path.


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 3.  RE: Java Compiler Error

    Posted Fri September 28, 2007 03:22 PM

    Hi Rob ,

    Just I am trying , Yes I am not a Java programmer but have some little knowledge on .

    Thank for your reply.

    Raj


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 4.  RE: Java Compiler Error

    Posted Mon October 08, 2007 08:58 PM

    PostMethod is a class from Apache commons-httpclient
    [url]http://jakarta.apache.org/httpcomponents/httpclient-3.x/methods/post.html[/url]
    All You need to do is to download [url]Apache Downloads
    unpack and copy the libraries:

    • commons-httpclient-3.1.jar
    • commons-codec-1.2.jar
    • commons-logging-1.0.4.jar
      to $WM_HOME/IntegrationServer/packages//code/jars/ directory or for global scope of visibility of classes to /code/jars/static/ or $WM_HOME/IntegrationServer/lib/jars/

    commons-httpclient is also in Maven2 repository:

    commons-httpclient
    commons-httpclient
    3.1


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 5.  RE: Java Compiler Error

    Posted Mon October 08, 2007 09:13 PM

    Or just use the services provided by IS. No need to download and use any of that stuff.


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 6.  RE: Java Compiler Error

    Posted Tue October 09, 2007 09:06 PM

    Of course, but somebody already had used some Apache classes (PostMethod) in code and other person try to find out what a problem is.

    IMHO and experience: better solution is to do complex things and almost anything else than documents mappings and easy logic in Java code - it’s easier and easier is to find malfunction. Independent of container (IS in this case) Java code may be tested outside of the container - faster and easier. Sorry Rob :slight_smile:


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 7.  RE: Java Compiler Error

    Posted Tue October 09, 2007 10:36 PM

    No need to be sorry. We simply disagree on the approach. You feel that writing Java would be good thing to do in this case. My opinion is that if you want to write Java for the bulk of your work (and reinvent a service to do HTTP posts when a quite capable service already exists) then you shouldn’t be using Integration Server in the first place.


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services