我的wsdl文件:<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://bean.ibatis.ideal.sh.cn" xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope" xmlns:soapenc11="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenc12="http://www.w3.org/2003/05/soap-encoding" xmlns:tns="http://app.ideal.sh.cn" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://app.ideal.sh.cn">
<wsdl:types>
<xsd:schema targetNamespace="http://app.ideal.sh.cn" elementFormDefault="qualified" attributeFormDefault="qualified">
<xsd:element name="login">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="in0" type="xsd:string" nillable="true" minOccurs="1" maxOccurs="1" />
<xsd:element name="in1" type="xsd:string" nillable="true" minOccurs="1" maxOccurs="1" />
<xsd:element name="in2" type="xsd:string" nillable="true" minOccurs="1" maxOccurs="1" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="loginResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="out" type="ns1:LoginUser" nillable="true" minOccurs="1" maxOccurs="1" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<xsd:schema targetNamespace="http://bean.ibatis.ideal.sh.cn" elementFormDefault="qualified" attributeFormDefault="qualified">
<xsd:complexType name="LoginUser">
<xsd:sequence>
<xsd:element name="action" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="areaId" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="errorUrl" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="flag" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="pwd" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="queuelist" type="ns1:ArrayOfQueueBean" minOccurs="0" nillable="true" />
<xsd:element name="realName" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="roleId" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="sortList" type="ns1:ArrayOfTSort" minOccurs="0" nillable="true" />
<xsd:element name="userId" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="userName" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="workId" type="xsd:string" minOccurs="0" nillable="true" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ArrayOfQueueBean">
<xsd:sequence>
<xsd:element name="QueueBean" type="ns1:QueueBean" nillable="true" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="QueueBean">
<xsd:sequence>
<xsd:element name="autoId" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="pid" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="queueName" type="xsd:string" minOccurs="0" nillable="true" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ArrayOfTSort">
<xsd:sequence>
<xsd:element name="TSort" type="ns1:TSort" nillable="true" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="TSort">
<xsd:sequence>
<xsd:element name="checkFlag" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="fkPostUserId" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="fkTemplateId" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="fkUpdateUserId" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="indexNum" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="isFinal" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="name" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="pid" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="pkAutoId" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="postTime" type="xsd:date" minOccurs="0" nillable="true" />
<xsd:element name="publicTag" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="sort" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="status" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="updateTime" type="xsd:date" minOccurs="0" nillable="true" />
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</wsdl:types>
<wsdl:message name="loginResponse">
<wsdl:part element="tns:loginResponse" name="parameters" />
</wsdl:message>
<wsdl:message name="loginRequest">
<wsdl:part element="tns:login" name="parameters" />
</wsdl:message>
<wsdl:portType name="userPortType">
<wsdl:operation name="login">
<wsdl:input message="tns:loginRequest" name="loginRequest" />
<wsdl:output message="tns:loginResponse" name="loginResponse" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="userHttpBinding" type="tns:userPortType">
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="login">
<wsdlsoap:operation soapAction="" />
<wsdl:input name="loginRequest">
<wsdlsoap:body use="literal" />
</wsdl:input>
<wsdl:output name="loginResponse">
<wsdlsoap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="user">
<wsdl:port binding="tns:userHttpBinding" name="userHttpPort">
<wsdlsoap:address location="http://132.159.156.54:8087/zjservice/services/user" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
调用java类:public class T1 { public T1() {
// TODO Auto-generated constructor stub
} /**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println(1);
UserPortType ut=new UserPortTypeProxy();
try {
System.out.println("ut:"+ut);
// 去数据库验证登陆用户
LoginUser lu=ut.login("265","1c395a8dce135849bd73c6dba3b54809","14");
System.out.println(lu.getAreaId());
System.out.println(lu.getRealName());
} catch (RemoteException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}}报错如下:And the stack trace is
{http://xml.apache.org/axis/}stackTrace:java.lang.NumberFormatException: Invalid date/time
at org.apache.axis.encoding.ser.CalendarDeserializer.makeValue(CalendarDeserializer.java:75)
at org.apache.axis.encoding.ser.SimpleDeserializer.onEndElement(SimpleDeserializer.java:172)
at org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.java:502)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:171)
at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:81)
at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://bean.ibatis.ideal.sh.cn" xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope" xmlns:soapenc11="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenc12="http://www.w3.org/2003/05/soap-encoding" xmlns:tns="http://app.ideal.sh.cn" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://app.ideal.sh.cn">
<wsdl:types>
<xsd:schema targetNamespace="http://app.ideal.sh.cn" elementFormDefault="qualified" attributeFormDefault="qualified">
<xsd:element name="login">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="in0" type="xsd:string" nillable="true" minOccurs="1" maxOccurs="1" />
<xsd:element name="in1" type="xsd:string" nillable="true" minOccurs="1" maxOccurs="1" />
<xsd:element name="in2" type="xsd:string" nillable="true" minOccurs="1" maxOccurs="1" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="loginResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="out" type="ns1:LoginUser" nillable="true" minOccurs="1" maxOccurs="1" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<xsd:schema targetNamespace="http://bean.ibatis.ideal.sh.cn" elementFormDefault="qualified" attributeFormDefault="qualified">
<xsd:complexType name="LoginUser">
<xsd:sequence>
<xsd:element name="action" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="areaId" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="errorUrl" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="flag" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="pwd" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="queuelist" type="ns1:ArrayOfQueueBean" minOccurs="0" nillable="true" />
<xsd:element name="realName" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="roleId" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="sortList" type="ns1:ArrayOfTSort" minOccurs="0" nillable="true" />
<xsd:element name="userId" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="userName" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="workId" type="xsd:string" minOccurs="0" nillable="true" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ArrayOfQueueBean">
<xsd:sequence>
<xsd:element name="QueueBean" type="ns1:QueueBean" nillable="true" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="QueueBean">
<xsd:sequence>
<xsd:element name="autoId" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="pid" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="queueName" type="xsd:string" minOccurs="0" nillable="true" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ArrayOfTSort">
<xsd:sequence>
<xsd:element name="TSort" type="ns1:TSort" nillable="true" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="TSort">
<xsd:sequence>
<xsd:element name="checkFlag" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="fkPostUserId" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="fkTemplateId" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="fkUpdateUserId" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="indexNum" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="isFinal" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="name" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="pid" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="pkAutoId" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="postTime" type="xsd:date" minOccurs="0" nillable="true" />
<xsd:element name="publicTag" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="sort" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="status" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="updateTime" type="xsd:date" minOccurs="0" nillable="true" />
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</wsdl:types>
<wsdl:message name="loginResponse">
<wsdl:part element="tns:loginResponse" name="parameters" />
</wsdl:message>
<wsdl:message name="loginRequest">
<wsdl:part element="tns:login" name="parameters" />
</wsdl:message>
<wsdl:portType name="userPortType">
<wsdl:operation name="login">
<wsdl:input message="tns:loginRequest" name="loginRequest" />
<wsdl:output message="tns:loginResponse" name="loginResponse" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="userHttpBinding" type="tns:userPortType">
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="login">
<wsdlsoap:operation soapAction="" />
<wsdl:input name="loginRequest">
<wsdlsoap:body use="literal" />
</wsdl:input>
<wsdl:output name="loginResponse">
<wsdlsoap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="user">
<wsdl:port binding="tns:userHttpBinding" name="userHttpPort">
<wsdlsoap:address location="http://132.159.156.54:8087/zjservice/services/user" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
调用java类:public class T1 { public T1() {
// TODO Auto-generated constructor stub
} /**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println(1);
UserPortType ut=new UserPortTypeProxy();
try {
System.out.println("ut:"+ut);
// 去数据库验证登陆用户
LoginUser lu=ut.login("265","1c395a8dce135849bd73c6dba3b54809","14");
System.out.println(lu.getAreaId());
System.out.println(lu.getRealName());
} catch (RemoteException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}}报错如下:And the stack trace is
{http://xml.apache.org/axis/}stackTrace:java.lang.NumberFormatException: Invalid date/time
at org.apache.axis.encoding.ser.CalendarDeserializer.makeValue(CalendarDeserializer.java:75)
at org.apache.axis.encoding.ser.SimpleDeserializer.onEndElement(SimpleDeserializer.java:172)
at org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.java:502)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:171)
at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:81)
at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
貌似wsdl文件里面的date类型格式不对。百度了下,google了下,找不到中文帖子,有几个英文帖子,还没有贴解决方法。唉
!
里面的 type="xsd:date" 换成 type="xsd:dateTime"试试看?
或者把这一行删除掉,看看结果如何?
确认一下你的数据表中的字段postTime是不是日期型!!