我正在尝试连接到外部Web服务并且无法控制它。 wsdl有一些未解析的URL。 Soap UI不是svcutil都不能使用它。 所以我浏览了这个wsdl并对xml文档进行了“另存为”。然后我去手动将这几个改为正确的。
例如: https://b2borexatest.oracleoutsourcing.com/soa-infra/services/default/MMISSOAPRequestReceiver!1.0 * soa_d48cf4e0-5e7b-43ad-b430-727180d48841 / RouteEDITransactions_ep?WSDL。 Ť 这是Wsdl给出的原始Web服务。然后他们改成了 https://orserviceb2btest.oracleoutsourcing.com/soa-infra/services/default/MMISSOAPRequestReceiver!1.0/CORERule220.wsdl
我可以浏览到第二个网址,但它仍然包含一些旧网址'b2b ....'的痕迹。 所以我去手动改变这些痕迹以反映到正确的痕迹。 通过这样做,我能够使用svcutil创建代理。
问题:这可能是获取Web服务代理返回null的可能原因 SOAP UI请求
<soapenv:Envelope xmlns:cor="http://www.caqh.org/SOAP/WSDL/CORERule2.2.0.xsd" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<cor:COREEnvelopeRealTimeRequest>
<PayloadType>123</PayloadType>
<ProcessingMode>XXX</ProcessingMode>
<PayloadID>72</PayloadID>
<TimeStamp>2013-07-13:T23:30:29:45</TimeStamp>
<SenderID>MID</SenderID>
<ReceiverID>OID</ReceiverID>
<CORERuleVersion>2.2.0</CORERuleVersion>
<Payload>MY Input string</Payload>
</cor:COREEnvelopeRealTimeRequest>
</soapenv:Body>
This is the working SOAP UI response
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing">
<env:Body>
<COREEnvelopeRealTimeResponse xmlns:cor="http://www.caqh.org/SOAP/WSDL/CORERule2.2.0.xsd" xmlns="http://www.caqh.org/SOAP/WSDL/CORERule2.2.0.xsd">
<cor:PayloadType>XXX</cor:PayloadType>
<cor:ProcessingMode>23</cor:ProcessingMode>
<cor:PayloadID>372</cor:PayloadID>
<cor:TimeStamp>2013-08-04T23:38:32.083-05:00</cor:TimeStamp>
<cor:SenderID>OID</cor:SenderID>
<cor:ReceiverID>RID</cor:ReceiverID>
<cor:CORERuleVersion>2.2.0</cor:CORERuleVersion>
<cor:Payload>Response String</cor:Payload>
<cor:ErrorCode>Success</cor:ErrorCode>
<cor:ErrorMessage></cor:ErrorMessage>
</COREEnvelopeRealTimeResponse>
</env:Body>
我没有在请求/响应中看到任何冲突 这些是wsdl的一些相关部分
<?xml version='1.0' encoding='UTF-8'?>
<wsdl:definitions xmlns:CORE="http://www.caqh.org/SOAP/WSDL/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:CORE-XSD="http://www.caqh.org/SOAP/WSDL/CORERule2.2.0.xsd" xmlns="http://schemas.xmlsoap.org/wsdl/" name="CORE" targetNamespace="http://www.caqh.org/SOAP/WSDL/">
<wsdl:types>
<xsd:schema xmlns="http://schemas.xmlsoap.org/wsdl/" elementFormDefault="qualified" targetNamespace="http://www.caqh.org/SOAP/WSDL/">
<xsd:import namespace="http://www.caqh.org/SOAP/WSDL/CORERule2.2.0.xsd" schemaLocation="xsd/CORERule2.2.0.xsd"></xsd:import>
</xsd:schema>
</wsdl:types>
<wsdl:message name="RealTimeRequestMessage">
<wsdl:part name="body" element="CORE-XSD:COREEnvelopeRealTimeRequest"></wsdl:part>
</wsdl:message>
<wsdl:message name="RealTimeResponseMessage">
<wsdl:part name="body" element="CORE-XSD:COREEnvelopeRealTimeResponse"></wsdl:part>
</wsdl:message>
<wsdl:portType name="CORETransactions">
<wsdl:operation name="RealTimeTransaction">
<wsdl:input message="CORE:RealTimeRequestMessage"></wsdl:input>
<wsdl:output message="CORE:RealTimeResponseMessage"></wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="CoreSoapBinding" type="CORE:CORETransactions">
<soap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"></soap12:binding>
<wsdl:operation name="RealTimeTransaction">
<soap12:operation soapAction="RealTimeTransaction" style="document"></soap12:operation>
<wsdl:input>
<soap12:body use="literal"></soap12:body>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"></soap12:body>
</wsdl:output>
</wsdl:operation>
虽然Fiddler捕获了正确的响应,但我没有看到代理类可以松开它的位置。
这是我使用代理客户端类
调用服务方法的部分var ORrealTimeTrans = new COREEnvelopeRealTimeRequest() { PayloadType =“blabla”, ProcessingMode = bla, PayloadID = bla, CORERuleVersion = bla, SenderID = sid, ReceiverID = rid, TimeStamp = DateTime.UtcNow.ToString(“yyyy-MM-ddThh:mm:22Z”), 有效负载=输入 };
_ORclient.ClientCredentials.UserName.UserName = UserID;
_ORclient.ClientCredentials.UserName.Password = Password;
var resp = _ORclient.RealTimeTransaction(ORrealTimeTrans);
这是一个_ORclient.RealTimeTransaction(ORrealTimeTrans)出现null。
我是否有可能将某些b2b更改为orservice并且此代理返回null? 请建议