OSB建立企业标准接入SOAP模版

需求

​ 目前osb实现接口接入,不同的协议,不同的接口,请求的报文格式相对不一致,造成管理请求报文相对烦锁,资助根据企业要求,对于所有协议,所有接口最好统一使用统一的一个报文,一个接入协议。

技术分析

​ 根据企业需求,所以统一使用SOAP协议,xml报文的形式进行请求,并且统一会写好请求报文的header和body要求,相关要求如下:

序号 要求 统一标准
1 接入协议 SOAP
2 接入报文 xml报文
3 标准head 流水号:name="TxnID" type="xsd:string"
请求时间:name="TimeStamp" type="xsd:string"
目标系统 :name="Target" type="xsd:string"
请求系统 :name="Source" type="xsd:string"
4 标准body 参数全text传输

实现步骤

1、新建请求wsdl文件

image-20210521144255898

附件:

标准wsdl请求文件

<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions name="WebMethod" targetNamespace="http://www.oracle.com/esb" xmlns:tns="http://www.oracle.com/esb"
                  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema"
                  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wscos="http://www.cfesb.com/osb/soaHeader">
  <wsdl:types>
    <xs:schema targetNamespace="http://www.oracle.com/esb" elementFormDefault="qualified"
               xmlns:xs="http://www.w3.org/2001/XMLSchema">
      <xs:element name="ESBRequest" type="xs:string"/>
      <xs:element name="ESBResponse">
        <xs:complexType>
          <xs:sequence>
            <xs:element maxOccurs="1" name="STATUS" type="xs:string"/>
            <xs:element maxOccurs="1" name="MESSAGE" type="xs:string"/>
            <xs:element maxOccurs="1" name="data" type="xs:string"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:schema>
    <xs:schema>
      <xs:import schemaLocation="../../../COMMON/Resources/XSD/SoaHeader.xsd"
                 namespace="http://www.cfesb.com/osb/soaHeader"/>
    </xs:schema>
  </wsdl:types>
  <wsdl:message name="ESBRequest">
    <wsdl:part name="parametersRequest" element="tns:ESBRequest"/>
  </wsdl:message>
  <wsdl:message name="ESBRequestResponse">
    <wsdl:part name="parametersResponse" element="tns:ESBResponse"/>
  </wsdl:message>
  <wsdl:message name="ReqMsgHeader">
    <wsdl:part name="parametersHeader" element="wscos:SoaHeader"/>
  </wsdl:message>
  <wsdl:portType name="WebMethod_ptt">
    <wsdl:operation name="WebMethod">
      <wsdl:input message="tns:ESBRequest"/>
      <wsdl:output message="tns:ESBRequestResponse"/>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="WebMethod_ptt-binding" type="tns:WebMethod_ptt">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="WebMethod">
      <soap:operation soapAction="WebMethod" style="document"/>
      <wsdl:input>
        <soap:header message="tns:ReqMsgHeader" use="literal" part="parametersHeader"/>
        <soap:body use="literal" parts="parametersRequest"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" parts="parametersResponse"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
</wsdl:definitions>

results matching ""

    No results matching ""