Hi all,again:
     Now,I want write a simple test example by myself using kandula.So I
must write a Webservice first.I choose using the tool --"java2wsdl".But It
always appear the warning:
"警告: The class org.apache.axis.message.addressing.AttributedQName does not
cont
ain a default constructor, which is a requirement for a bean class.  The
class c
annot be converted into an xml schema type.  An xml schema anyType will be
used
to define this class in the wsdl file.
2007-8-6 17:58:49 org.apache.axis.wsdl.fromJava.Types isBeanCompatible
警告: The class org.apache.axis.message.addressing.ServiceNameType does not
cont
ain a default constructor, which is a requirement for a bean class.  The
class c
annot be converted into an xml schema type.  An xml schema anyType will be
used
to define this class in the wsdl file."
I don't know How to solve it.Anyone can help me ?thank you very much.
 following is the sourcecode :
It have 4 classes
--------------------

1.ContextChoiceType ----------the problem class

package rzw.computer;

public class ContextChoiceType {
 private org.apache.kandula.wscoor.CoordinationContext coordinationContext;

 public ContextChoiceType() {
 }

 public ContextChoiceType(
   org.apache.kandula.wscoor.CoordinationContext coordinationContext) {
  this.coordinationContext = coordinationContext;
 }

 public org.apache.kandula.wscoor.CoordinationContextgetCoordinationContext() {
  return coordinationContext;
 }

 public void setCoordinationContext(
   org.apache.kandula.wscoor.CoordinationContext coordinationContext) {
  this.coordinationContext = coordinationContext;
 }
}

2.KeyBoardRequest

package rzw.computer;

public class KeyBoardRequest {
 private int num = 0;
 ContextChoiceType contextChoiceType = null;

 public KeyBoardRequest() {

 }

 public KeyBoardRequest(int num, ContextChoiceType context) {
  this.num = num;
  this.contextChoiceType = context;
 }

 public int getNum() {
  return num;
 }

 public void setNum(int num) {
  this.num = num;
 }

 public ContextChoiceType getContextChoiceType() {
  return contextChoiceType;
 }

 public void setContextChoiceType(ContextChoiceType contextChoiceType) {
  this.contextChoiceType = contextChoiceType;
 }

}

3. KeyBoardResponse

package rzw.computer;

public class KeyBoardResponse {
 public boolean deal = false;

 public int resultnum = 0;

 public KeyBoardResponse() {

 }

 public boolean isDeal() {
  return deal;
 }

 public void setDeal(boolean deal) {
  this.deal = deal;
 }

 public int getResultnum() {
  return resultnum;
 }

 public void setResultnum(int resultnum) {
  this.resultnum = resultnum;
 }

}

4.KeyBoardService

package rzw.computer;

public interface KeyBoardService {
 public KeyBoardResponse doActive(KeyBoardRequest request);
}

5. the .bat file is :

java org.apache.axis.wsdl.Java2WSDL -okeyboard.wsdl -l"
http://localhost:8180/axis/services/KeyBoardService"; -n "urn:computer.rzw"
-p" rzw.computer" "urn:computer.rzw" rzw.computer.KeyBoardService



-------------------------------------------------------------------------------------------

And the attached file is my whole demo .And it can not run if  I add
CoordinationContext in class ContextChoiceType.But if I don't add add
CoordinationContext in class ContextChoiceType,it will run very well.

I hope some one can help me.thank you .

------------------------------------------------------------------------------------------------

Another problem is about  _call.setSOAPActionURI("?????") in class
KeyBoardServiceSoapBindingStub .What should I write in it replace the "???"?
-- 
               饶竹伟
北京邮电大学 PCN&CAD中心

Reply via email to