各位写Web Services都是怎么写的?
看看Web Services版人不多,就到这里来问了~
初学Web Services,写Web ervices的服务和调用都是直接写的,还是用了其它工具?
比如下面的一个SoapBindingStub里的一个函数:
public void add(java.lang.String in0, int in1) throws java.rmi.RemoteException, hero.net.ProjectSession.HeroException {
if (super.cachedEndpoint == null) {
throw new org.apache.axis.NoEndPointException();
}
org.apache.axis.client.Call _call = createCall();
_call.setOperation(_operations[14]);
_call.setUseSOAPAction(true);
_call.setSOAPActionURI("");
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
_call.setOperationName(new javax.xml.namespace.QName("http://interfaces.hero", "add"));
setRequestHeaders(_call);
setAttachments(_call);
java.lang.Object _resp = _call.invoke(new java.lang.Object[] {in0, new java.lang.Integer(in1)});
if (_resp instanceof java.rmi.RemoteException) {
throw (java.rmi.RemoteException)_resp;
}
extractAttachments(_call);
}
-----------
象这种函数,以及象SoapBindingStub本身这种全部的代码都是怎么写出来的?直接写,还是用其它工具?好像有说用WSDLtoJava exec file这种方法转换而来,这个的话是不是要写WSDL?怎么回事?
3x!