| |

VerySource

 Forgot password?
 Register
Search
View: 8|Reply: 1

Java uses wsdd to deploy services (classes) with * .jar packages, and all its services cannot be displayed!

[Copy link]

5

Threads

11

Posts

11

Credits

Newbie

Rank: 1

Credits
11

 China

Post time: 2020-2-22 12:30:02
| Show all posts |Read mode
The service deployment without * .jar is:
Class name: HelloService.class
Where it is stored: webapps\axis\WEB-INF\classes\
public class HelloService
{
public String sayHello (String username)
{
return "Hello:" + username;
}
}
Write in the server-config.wsdd file:
Where it is stored: webapps\axis\WEB-INF
 ...
 <service name = "HelloService" provider = "java: RPC">
 <parameter name = "className" value = "HelloService" />
 <parameter name = "allowedMethods" value = "*" />
 </ service>
 ...

Problem: When the class HelloService needs to be supported by * .jar package, all services cannot be displayed by doing so. Cannot find * .jar package when deploying with jws. Please ask how this situation is deployed?
Reply

Use magic Report

5

Threads

11

Posts

11

Credits

Newbie

Rank: 1

Credits
11

 China

 Author| Post time: 2020-5-19 21:30:01
| Show all posts
Get it done:
With the * .jar package in the code, put all the * .jar packages used in the right "WEB-INF\lib" directory.

If the code contains the package in the project written by yourself, copying the entire directory where the package is located to "WEB-INF\classes" is equivalent to treating the package in the project as a class.

If the service is in a package, such as:
package myexcel;

import jxl. *;
import jxl.format.UnderlineStyle;
import jxl.write. *;
import jxl.write.Number;
import jxl.write.Boolean;
import java.io. *;
import java.util. *;
import myBean. *;
import java.io.File;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.apache.log4j.PatternLayout;
import org.apache.log4j.RollingFileAppender;
import org.apache.log4j. *;


public class MyExcel {
/ **
     * Read Excel
     * @param filePath
     * /
static final Logger logger = (Logger) Logger.getLogger (MyExcel.class);
The
    public ArrayList readExcel (String filePath)
    {
    ArrayList _myExA = new ArrayList ();
    ...

Then you can only copy this package (that is, the entire directory in the project corresponding to this myexcel package: myexcel) to the "WEB-INF\classes" directory.

It should be written like this in server-config.wsdd:
 <service name = "MyExcel" provider = "java: RPC">
  <parameter name = "className" value = "myexcel.MyExcel" />
  <parameter name = "allowedMethods" value = "*" />
 </ service>

Or do the reverse, and put the * .jar package of axis under the "WEB-INF\lib" directory corresponding to the project. The effect is the same.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2020|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list