webservices 错误
org.xml.sax.SAXException 新手求救!!~~~
写了个客户端,可是运行的时候报org.xml.sax.
SAXException :operation description is missing parameter description!
工具:myeclipes
语言:java
client::::::----------------------------------------
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import javax.xml.namespace.QName;
public class Test {
public static void main(String [] args) {
try {
String fileName = "welcome.wav";
String endpoint =
"http://localhost:8080/JTTS_WS/services/JTTS";
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress( new java.net.URL(endpoint) );
call.setOperationName(new QName("http://service.jttsws.sinovoice.com", "jTTS_PlayToFile"));
//String ret = (String) call.invoke( new Object[] { "Hello!" } );
String ret = (String) call.invoke( new Object[] {"欢迎使用",fileName, 0, 0, null, 0,"84316E85-143E-4410-B00B-9DF681684C6C", (short) -1,(short) -1, (short) -1, (short) 9, (short) -1, (short) -1,(short) -1, (short) -1, (short) -1, (short) -1, (short) -1,(short) -1, (short) -1, (short) -1} );
System.out.println("Sent 'Hello!', got '" + ret + "'");
} catch (Exception e) {
System.err.println(e.toString());
}
}
}
----------------------------------wsdl--------------------------------------------
<?xml version="1.0" encoding="UTF-8" ?>
- <wsdl:definitions targetNamespace="http://service.jttsws.sinovoice.com" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://service.jttsws.sinovoice.com" xmlns:intf="http://service.jttsws.sinovoice.com" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <!--
WSDL created by Apache Axis version: 1.4
Built on Apr 22, 2006 (06:55:48 PDT)
-->
- <wsdl:types>
- <schema elementFormDefault="qualified" targetNamespace="http://service.jttsws.sinovoice.com" xmlns="http://www.w3.org/2001/XMLSchema">
- <element name="jTTS_PlayToFile">
- <complexType>
- <sequence>
<element name="text" type="xsd:string" />
<element name="fileName" type="xsd:string" />
<element name="format" type="xsd:int" />
<element name="flag" type="xsd:long" />
<element name="playToFileCallBackable" type="xsd:string" />
<element name="userData" type="xsd:long" />
<element name="voiceId" type="xsd:string" />
<element name="domain" type="xsd:short" />
<element name="pitch" type="xsd:short" />
<element name="volume&quo