Hi All WM users

Hi WM user’s,

First letme introduce my self, I am a java, J2ee developer. having certifications on SCJP, SCWCD, SCBCD, SCDJWS…

But i am preety much new to WM, and its development environment…
So, please help me out in learning and getting things solved…
Also i’ll be helping you people on any of the other java related problem…

Thanks Friends,
Prakash…

Welcome to wMUsers!!..Prakash

Please review this posting for more help…
http://wmusers.com/forum/showthread.php?t=11670

-RMG

Welcome Prakash:

One bit of advice I would offer is to resist the urge/temptation to write Java services. Your certifications are good to have but they won’t help much with wM Integration Server development–IS is Java based but it is not a Java development environment.

This thread provides additional info and rationale for this point:
http://wmusers.com/forum/showthread.php?t=7965

Welcome to the group!

Ohh okay… but WebMethods also provide us with Webmethod Developer along with IS… is that not a development environment… :confused:

It is–but it’s not a Java development environment. It is used to create services. The primary language used to create services is FLOW. You can create services using Java, but that’s a relatively small part of the work you’ll be doing.

Hi All,

I have a question…
I recently tried one simple POJO for a file copy operation a kind of replicating file polling service in WM.The program copies the files from one directory to another and then deletes the original file (So a kind of cut/paste)…

Now i had already tried the file polling service using flow language…

*** Here is my real question… Can some one help me in writing the java service for the same POJO … in WM …

I am providing you the POJO for polling operation :

package test;

import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;

public class Copy {

public static String copyFile(File inputFile,File outputFile){

    String a="";
    try{
    FileReader in = new FileReader(inputFile);
    FileWriter out = new FileWriter(outputFile);
    int c;

    while ((c = in.read()) != -1)
    out.write(c);
    inputFile.deleteOnExit();
    in.close();
    out.close();
    System.out.println("Copying files....");
    }catch(Exception e){
    }
    return a;
    }
/**
 * @param args
 */
public static void main(String[] args) throws IOException {
        
    String input_folder = "C:/inputfolder";
    String outputfolder = "C:/outputfolder";
    File inputFile = new File(input_folder);
    File outputFile = new File(outputfolder);

    File dir = new File(input_folder);

    String[] children = dir.list();
    if (children == null) {
    // Either dir does not exist or is not a directory
    } else {
    for (int i=0; i<children.length; i++) {
    // Get filename of file or directory
    String filename = children[i];
    System.out.println("Filename of the file/directory : "+filename);
    }
    }
    for(int p=0;p<children.length;p++){
    File f = new File(inputFile+"/"+children[p]);
    File f1 = new File(outputFile+"/"+children[p]);
    Copy.copyFile(f,f1);
    System.out.println(f+"==="+outputFile);
    }
}

}

Your help will definitely teach me… something new…:talker:

Use the file polling port. That way, you don’t have to write any file manipulation services at all. Refer to the Administrator’s Guide for setting up the file polling port and its operation.

My advice remains the same as before–avoid the urge to write things in Java simply because you know Java. Take the time to research the docs to figure out how almost everything can be done in IS without Java.