Topic: 急 求助:webservice发布问题 |
Print this page |
1.急 求助:webservice发布问题 | Copy to clipboard |
Posted by: netsmile Posted on: 2005-11-04 17:38 服务器端:BookSvc.jws import java.io.*; class Book implements Serializable{ private String name; private String ISDN; private int page; public String getISDN() { return ISDN; } public String getName() { return name; } public int getPage() { return page; } public void setISDN(String string) { ISDN = string; } public void setName(String string) { name = string; } public void setPage(int i) { page = i; } } public class BookSvc { public String addBook(Book str){ //here you save a book into database Book b=new Book(); b.setISDN("str"); System.out.println("Book has been added."+b.getISDN()); return str; } } 用浏览器访问时http://localhost:8080/jws/BookSvc.jws?wsdl 浏览器返回无法访问 tomcat控制端返回异常时: -Exception: java.lang.NoClassDefFoundError:Book ............ |
2.Re:急 求助:webservice发布问题 [Re: netsmile] | Copy to clipboard |
Posted by: qingbingge Posted on: 2005-11-09 07:44 问题解决了吗? 就你说的问题看来,应该是环境变量没有配置好,你再检查一下ClassPath和Path。 另外,你的程序本身是有问题的,你自己试试看,编译都通不过,我改了一下以后,没有什么问题的。 public String addBook(String str){ //here you save a book into database Book b=new Book(); b.setISDN(str); System.out.println("Book has been added."+b.getISDN()); return str; } } |
3.Re:急 求助:webservice发布问题 [Re: netsmile] | Copy to clipboard |
Posted by: netsmile Posted on: 2005-11-09 08:36 谢谢,已经解决了 |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |