Web services 获取/读取Axis1.4中的Webservice响应时出现问题

Web services 获取/读取Axis1.4中的Webservice响应时出现问题,web-services,exception,axis,Web Services,Exception,Axis,我使用Axis1.4创建webservice客户端,因为该服务使用RPC编码。我已经根据提供的wsdl文件使用wsdl2java自动生成了客户机代码。我无法使用附加到服务URL的?wsdl从服务本身获取wsdl,因为它不接受get请求 当我尝试通过客户端访问服务时,它首先记录此异常: DEBUG org.apache.axis.ConfigurationException - Exception: org.apache.axis.ConfigurationException: No serv

我使用Axis1.4创建webservice客户端,因为该服务使用RPC编码。我已经根据提供的wsdl文件使用wsdl2java自动生成了客户机代码。我无法使用附加到服务URL的?wsdl从服务本身获取wsdl,因为它不接受get请求

当我尝试通过客户端访问服务时,它首先记录此异常:

DEBUG org.apache.axis.ConfigurationException  - Exception: 
org.apache.axis.ConfigurationException: No service named GetSettings is available
我在其他帖子中读到,这不值得担心。然而,如果我能摆脱它,那就太好了。我的客户端类如下所示(try/catch已删除):

启用调试级别loggin时,此异常之前会记录请求和以下行:

DEBUG org.apache.axis.transport.http.HTTPSender  - POST /ToolsServlet/ HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.4
Host: <IP>
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: "GetSettings"
Content-Length: 479
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><ns1:GetSettings soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:tools"><value xsi:type="xsd:string">value</value></ns1:GetSettings></soapenv:Body></soapenv:Envelope>
DEBUG org.apache.axis.transport.http.HTTPSender  - HTTP/1.1 200 OK
DEBUG org.apache.axis.transport.http.HTTPSender  - Date Mon, 08 Nov 2010 20:59:12 GMT
DEBUG org.apache.axis.transport.http.HTTPSender  - Server Apache/2.0.53 (Unix) DAV/2
DEBUG org.apache.axis.transport.http.HTTPSender  - Connection close
DEBUG org.apache.axis.transport.http.HTTPSender  - Content-Type text/xml
DEBUG org.apache.axis.SOAPPart  - Enter: SOAPPart ctor(FORM_INPUTSTREAM)
DEBUG org.apache.axis.i18n.ProjectResourceBundle  - org.apache.axis.i18n.resource::handleGetObject(setMsgForm)
DEBUG org.apache.axis.SOAPPart  - Setting current message form to: FORM_INPUTSTREAM (currentMessage is now org.apache.axis.transport.http.SocketInputStream)
DEBUG org.apache.axis.SOAPPart  - Exit: SOAPPart ctor()
DEBUG org.apache.axis.i18n.ProjectResourceBundle  - org.apache.axis.i18n.resource::handleGetObject(no00)
DEBUG org.apache.axis.transport.http.HTTPSender  - 
no Content-Length
DEBUG org.apache.axis.i18n.ProjectResourceBundle  - org.apache.axis.i18n.resource::handleGetObject(xmlRecd00)
DEBUG org.apache.axis.transport.http.HTTPSender  - 
XML received:
DEBUG org.apache.axis.transport.http.HTTPSender-POST/ToolsServlet/http/1.0
内容类型:text/xml;字符集=utf-8
接受:应用程序/soap+xml、应用程序/dime、多部分/相关、文本/*
用户代理:Axis/1.4
主持人:
缓存控制:没有缓存
Pragma:没有缓存
SOAPAction:“GetSettings”
内容长度:479
价值
调试org.apache.axis.transport.http.HTTPSender-http/1.1 200 OK
调试org.apache.axis.transport.http.HTTPSender-日期:2010年11月8日星期一20:59:12 GMT
调试org.apache.axis.transport.http.HTTPSender-服务器apache/2.0.53(Unix)DAV/2
调试org.apache.axis.transport.http.HTTPSender-连接关闭
调试org.apache.axis.transport.http.HTTPSender-内容类型text/xml
调试org.apache.axis.SOAPPart-输入:SOAPPart-ctor(FORM\u INPUTSTREAM)
调试org.apache.axis.i18n.ProjectResourceBundle-org.apache.axis.i18n.resource::handleGetObject(setMsgForm)
调试org.apache.axis.SOAPPart-将当前消息表单设置为:form_INPUTSTREAM(当前消息现在是org.apache.axis.transport.http.SocketInputStream)
调试org.apache.axis.SOAPPart-退出:SOAPPart
调试org.apache.axis.i18n.ProjectResourceBundle-org.apache.axis.i18n.resource::handleGetObject(no00)
调试org.apache.axis.transport.http.HTTPSender-
无内容长度
调试org.apache.axis.i18n.ProjectResourceBundle-org.apache.axis.i18n.resource::handleGetObject(xmlRecd00)
调试org.apache.axis.transport.http.HTTPSender-
收到的XML:
在我看来,我没有得到适当的回应。我使用Firefox和Poster插件针对Web服务测试了direct post。我使用了由我的客户机生成的SOAP消息/请求,并得到了一个有效的响应

在Axis认为存在空响应的情况下,我是否正确读取了日志?如果是这样的话,有没有人对Axis为什么没有得到回应或没有正确阅读有什么建议?我在日志中看不到任何其他线索

开始更新一个

看起来我正在返回一个响应,尽管它没有记录在那个地方,但是进一步的日志语句显示了通过反序列化上下文解析响应的尝试。Axis正在抛出NumberFormatException,因为它期望
'0'、'f'或'f'
为false,而
'1'、't'或't'
为true。它不喜欢真正扭曲的'true'或'false',因为wsdl将元素定义为xsd:boolean,允许的值是
'true'
'false'

除了更新源代码以正确处理“true”和“false”之外,还有什么建议可以让Axis工作吗

短暂性脑缺血发作

结束一次更新

启动第二次更新

第二天新鲜的眼睛会有帮助。Axis代码处理
true
false
,因为它获取字符串的第一个字符。问题是我收到了错误的数据


结束更新二

您编辑问题的方式让人无法理解。请重新编辑,并将原始问题放在第一位,然后按顺序更新。您编辑问题的方式使其无法理解。请再次编辑,并将原始问题放在第一位,然后按顺序更新。
INFO: 13:59:17,361 [http-thread-pool-8080-(2)] ERROR org.apache.axis.client.Call  - Exception:
java.lang.NumberFormatException: Invalid boolean
    at org.apache.axis.encoding.ser.SimpleDeserializer.onEndElement(SimpleDeserializer.java:180)
    at org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.java:502)
...

Caused by: java.lang.NumberFormatException: Invalid boolean
    at org.apache.axis.encoding.ser.SimpleDeserializer.makeBasicValue(SimpleDeserializer.java:270)
    at org.apache.axis.encoding.ser.SimpleDeserializer.makeValue(SimpleDeserializer.java:209)
    at org.apache.axis.encoding.ser.SimpleDeserializer.onEndElement(SimpleDeserializer.java:172)
    ... 40 more
DEBUG org.apache.axis.transport.http.HTTPSender  - POST /ToolsServlet/ HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.4
Host: <IP>
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: "GetSettings"
Content-Length: 479
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><ns1:GetSettings soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:tools"><value xsi:type="xsd:string">value</value></ns1:GetSettings></soapenv:Body></soapenv:Envelope>
DEBUG org.apache.axis.transport.http.HTTPSender  - HTTP/1.1 200 OK
DEBUG org.apache.axis.transport.http.HTTPSender  - Date Mon, 08 Nov 2010 20:59:12 GMT
DEBUG org.apache.axis.transport.http.HTTPSender  - Server Apache/2.0.53 (Unix) DAV/2
DEBUG org.apache.axis.transport.http.HTTPSender  - Connection close
DEBUG org.apache.axis.transport.http.HTTPSender  - Content-Type text/xml
DEBUG org.apache.axis.SOAPPart  - Enter: SOAPPart ctor(FORM_INPUTSTREAM)
DEBUG org.apache.axis.i18n.ProjectResourceBundle  - org.apache.axis.i18n.resource::handleGetObject(setMsgForm)
DEBUG org.apache.axis.SOAPPart  - Setting current message form to: FORM_INPUTSTREAM (currentMessage is now org.apache.axis.transport.http.SocketInputStream)
DEBUG org.apache.axis.SOAPPart  - Exit: SOAPPart ctor()
DEBUG org.apache.axis.i18n.ProjectResourceBundle  - org.apache.axis.i18n.resource::handleGetObject(no00)
DEBUG org.apache.axis.transport.http.HTTPSender  - 
no Content-Length
DEBUG org.apache.axis.i18n.ProjectResourceBundle  - org.apache.axis.i18n.resource::handleGetObject(xmlRecd00)
DEBUG org.apache.axis.transport.http.HTTPSender  - 
XML received: