怎么没人回答,高手呢????

解决方案 »

  1.   

    我也想要啊,正急需这类例子啊!
      

  2.   

    I feel like you have a misunderstand in the Axis or the SOAP.It's said,You have written a WebServices in the JB,but someone often wrote down classes and then wrote down deploy.wsdd to deploy Web Server.other simply way:
    write down your class and then rename yourclass.jws,
    put down your.jws in root of directory/*
    Publishing Web Services with Axis
    Let's say we have a simple class like the following: 
    public class Calculator {
      public int add(int i1, int i2)
      {
        return i1 + i2; 
      }
      
      public int subtract(int i1, int i2)
      {
        return i1 - i2;
      }
    }
    (You'll find this very class in samples/userguide/example2/Calculator.java.) 
    How do we go about making this class available via SOAP? There are a couple of answers to that question, but we'll start with the easiest way Axis provides to do this, which takes almost no effort at all! JWS (Java Web Service) Files - Instant Deployment
    OK, here's step 1 : copy the above .java file into your webapp directory, and rename it "Calculator.jws". So you might do something like this: 
    % copy Calculator.java <your-webapp-root>/axis/Calculator.jws
    Now for step 2... hm, wait a minute. You're done! You should now be able to access the service at the following URL (assuming your Axis web application is on port 8080): 
    http://localhost:8080/axis/Calculator.jws */so maybe I feel like you'd better refer to Axis' documents.