当前位置: 代码迷 >> Java Web开发 >> 如何将wsdl文件插入数据库,文件如下
  详细解决方案

如何将wsdl文件插入数据库,文件如下

热度:286   发布时间:2016-04-14 21:06:26.0
怎么将wsdl文件插入数据库,文件如下

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://webservice.sjtu.edu" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ns="http://webservice.sjtu.edu" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/">
  <wsdl:documentation>
Please Type your service description here
  </wsdl:documentation>
  <wsdl:types>
    <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://webservice.sjtu.edu">
            <xs:element name="plus">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element minOccurs="0" name="x" type="xs:float"/>
                        <xs:element minOccurs="0" name="y" type="xs:float"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="plusResponse">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element minOccurs="0" name="return" type="xs:float"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="multiply">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element minOccurs="0" name="x" type="xs:float"/>
                        <xs:element minOccurs="0" name="y" type="xs:float"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="multiplyResponse">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element minOccurs="0" name="return" type="xs:float"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="minus">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element minOccurs="0" name="x" type="xs:float"/>
                        <xs:element minOccurs="0" name="y" type="xs:float"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="minusResponse">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element minOccurs="0" name="return" type="xs:float"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="divide">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element minOccurs="0" name="x" type="xs:float"/>
                        <xs:element minOccurs="0" name="y" type="xs:float"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="divideResponse">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element minOccurs="0" name="return" type="xs:float"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:schema>
  </wsdl:types>
  <wsdl:message name="minusRequest">
    <wsdl:part name="parameters" element="ns:minus">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="minusResponse">
    <wsdl:part name="parameters" element="ns:minusResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="divideRequest">
    <wsdl:part name="parameters" element="ns:divide">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="multiplyRequest">
    <wsdl:part name="parameters" element="ns:multiply">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="multiplyResponse">
    <wsdl:part name="parameters" element="ns:multiplyResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="plusResponse">
    <wsdl:part name="parameters" element="ns:plusResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="divideResponse">
    <wsdl:part name="parameters" element="ns:divideResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="plusRequest">
    <wsdl:part name="parameters" element="ns:plus">
    </wsdl:part>
  </wsdl:message>
  <wsdl:portType name="CalculateServicePortType">
    <wsdl:operation name="divide">
      <wsdl:input message="ns:divideRequest" wsaw:Action="urn:divide">
    </wsdl:input>
      <wsdl:output message="ns:divideResponse" wsaw:Action="urn:divideResponse">
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="plus">
      <wsdl:input message="ns:plusRequest" wsaw:Action="urn:plus">
    </wsdl:input>
      <wsdl:output message="ns:plusResponse" wsaw:Action="urn:plusResponse">
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="minus">
      <wsdl:input message="ns:minusRequest" wsaw:Action="urn:minus">
    </wsdl:input>
      <wsdl:output message="ns:minusResponse" wsaw:Action="urn:minusResponse">
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="multiply">
      <wsdl:input message="ns:multiplyRequest" wsaw:Action="urn:multiply">
    </wsdl:input>
      <wsdl:output message="ns:multiplyResponse" wsaw:Action="urn:multiplyResponse">
    </wsdl:output>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="CalculateServiceSoap11Binding" type="ns:CalculateServicePortType">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="divide">
      <soap:operation soapAction="urn:divide" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="plus">
      <soap:operation soapAction="urn:plus" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="minus">
      <soap:operation soapAction="urn:minus" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="multiply">
      <soap:operation soapAction="urn:multiply" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:binding name="CalculateServiceSoap12Binding" type="ns:CalculateServicePortType">
    <soap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="divide">
      <soap12:operation soapAction="urn:divide" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="plus">
      <soap12:operation soapAction="urn:plus" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="minus">
      <soap12:operation soapAction="urn:minus" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="multiply">
      <soap12:operation soapAction="urn:multiply" style="document"/>
      <wsdl:input>
        <soap12:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="CalculateService">
    <wsdl:port name="CalculateServiceHttpsSoap11Endpoint" binding="ns:CalculateServiceSoap11Binding">
      <soap:address location="https://localhost:8445/WebServiceProject/services/CalculateService.CalculateServiceHttpsSoap11Endpoint/"/>
    </wsdl:port>
    <wsdl:port name="CalculateServiceHttpsSoap12Endpoint" binding="ns:CalculateServiceSoap12Binding">
      <soap12:address location="https://localhost:8445/WebServiceProject/services/CalculateService.CalculateServiceHttpsSoap12Endpoint/"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

------解决思路----------------------
blob 字段不能用 insert 语句插入, 要单独插入
------解决思路----------------------
要确认里面没有单引号哦,否则sql肯定报错的
  相关解决方案