用axis做客户端调用Oracle Application Server里的webservice失败

shenbaise000 shenbaise000 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
直接调用axis服务端发布的webservice没有问题,但是调用Oracle Application Server里的webservice就抛出异常,请高手解决。

Oracle Application Server里webservice的wsdl文件代码如下:


<?xml version="1.0" encoding="UTF-8" ?>
- <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns0="http://ws.gd.chinamobile.com/types/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://ws.gd.chinamobile.com/" name="ServiceModeService" targetNamespace="http://ws.gd.chinamobile.com/">
- <types>
- <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://ws.gd.chinamobile.com/types/" targetNamespace="http://ws.gd.chinamobile.com/types/" elementFormDefault="qualified">
- <element name="queryElement">
- <complexType>
- <sequence>
<element name="mobile" type="string" nillable="true" />
</sequence>
</complexType>
</element>
- <element name="queryResponseElement">
- <complexType>
- <sequence>
<element name="result" type="int" />
</sequence>
</complexType>
</element>
</schema>
</types>
- <message name="ServiceModeService_query">
<part name="parameters" element="tns0:queryElement" />
</message>
- <message name="ServiceModeService_queryResponse">
<part name="parameters" element="tns0:queryResponseElement" />
</message>
- <portType name="ServiceModeService">
- <operation name="query">
<input message="tns:ServiceModeService_query" />
<output message="tns:ServiceModeService_queryResponse" />
</operation>
</portType>
- <binding name="ServiceModeServiceSoapHttp" type="tns:ServiceModeService">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
- <operation name="query">
<soap:operation soapAction="http://ws.gd.chinamobile.com//query" />
- <input>
<soap:body use="literal" />
</input>
- <output>
<soap:body use="literal" />
</output>
</operation>
</binding>
- <service name="ServiceModeService">
- <port name="ServiceModeServiceSoapHttpPort" binding="tns:ServiceModeServiceSoapHttp">
<soap:address location="http://test1:7777/GMCC-GMCC_WS-context-root/ServiceModeServiceSoapHttpPort" />
</port>
</service>
</definitions>


客户端代码:

Service service = new Service();
Call call = (Call) service.createCall();
String endpoint = "http://test1:7777/GMCC-GMCC_WS-context-root/ServiceModeServiceSoapHttpPort";
call.setTargetEndpointAddress(new java.net.URL(endpoint));
QName getDescQn = new QName(endpoint, "query");
call.setOperationName(getDescQn);
String mobile = "";//手机号码
call.invoke(new Object[] {mobile});

异常信息:

AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client
faultSubcode:
faultString: Caught exception while handling request: unrecognized operation: {http://test1:7777/GMCC-GMCC_WS-context-root/ServiceModeServiceSoapHttpPort}query
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:Caught exception while handling request: unrecognized operation: {http://test1:7777/GMCC-GMCC_WS-context-root/ServiceModeServiceSoapHttpPort}query
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.chinamobile.gd.ws.WebServiceServlet.doService(WebServiceServlet.java:227)
at com.chinamobile.gd.ws.WebServiceServlet.main(WebServiceServlet.java:236)

{http://xml.apache.org/axis/}hostname:cary-pc

Caught exception while handling request: unrecognized operation: {http://test1:7777/GMCC-GMCC_WS-context-root/ServiceModeServiceSoapHttpPort}query
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.chinamobile.gd.ws.WebServiceServlet.doService(WebServiceServlet.java:227)
at com.chinamobile.gd.ws.WebServiceServlet.main(WebServiceServlet.java:236)
...全文

相关推荐

NHibernate调用Oracle存储过程的生产级集成方案

Oracle存储过程是传统企业级应用的核心数据逻辑载体,其调用需遵循CallableStatement协议,涉及参数方向、SYS_REFCURSOR游标处理等底层机制。NHibernate通过OracleDataClientDriver实现对Oracle特有类型的支持,但因Oracle官方驱动未继承DbConnection基类,导致hbm2ddl.keywords校验失败、SchemaExport中断等兼容性问题。该技术方案不仅解决驱动适配与语法映射,更覆盖参数契约设计、字段显式声明、异常安全游标管理及RA

chuji3953

在VirtualBox上部署Oracle Grid Infrastructure和Oracle Real Application Clusters(G RAC)

在VirtualBox上部署Oracle Grid Infrastructure和Oracle Real Application Clusters(G RAC)时,可能会遇到一些常见的问题。这些是在VirtualBox上部署Oracle G RAC时可能遇到的一些常见问题及其解决方法。通过遵循这些建议,您应该能够克服这些问题,并成功部署和运行Oracle G RAC环境。请注意,上述解决方法是基于一般情况提供的,具体问题的解决方法可能因您的环境和配置而异。问题2:无法启动Oracle数据库实例。

ThDebug

高校技术转移办公室人员如何高效开展技术需求挖掘工作?.docx

科易网基于AI模型+行业大数据,在技术转移、成果转化、技术经纪、知识产权、产业创新、科技招商等垂直领域的多样化应用场景,推出科技创新领域的AI+工具与数智化解决方案,推动科技创新与产业创新智能化发展。

BIZKEEN

科技中介服务机构如何提升服务的专业性与用户粘性?.docx

科技中介服务机构如何提升服务的专业性与用户粘性?

BIZKEEN

高校技术转移办公室人员在组织科研成果展示时,如何提升推介材料的专业性与吸引力?.docx

科易网基于AI模型+行业大数据,在技术转移、成果转化、技术经纪、知识产权、产业创新、科技招商等垂直领域的多样化应用场景,推出科技创新领域的AI+工具与数智化解决方案,推动科技创新与产业创新智能化发展。

BIZKEEN
评论 1
收藏 已收藏
分享
返回顶部
shenbaise000
Web Services 12,164 成员 16,322 内容