Web services SOAPUI中未填充Soap请求元素

Web services SOAPUI中未填充Soap请求元素,web-services,soap,axis2,soapui,wsdl2java,Web Services,Soap,Axis2,Soapui,Wsdl2java,由于这些空请求元素,我们的客户无法使用WSDL生成java客户机。因此,我非常重视这个问题。WSDL如下所示: <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <soap:Header/> <soap:Body> <xs:QueryProductionCa

由于这些空请求元素,我们的客户无法使用WSDL生成java客户机。因此,我非常重视这个问题。WSDL如下所示:

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xs="http://www.w3.org/2001/XMLSchema">
   <soap:Header/>
   <soap:Body>
      <xs:QueryProductionCalendarRequest/>
   </soap:Body>
</soap:Envelope>

灵活服务

有人能告诉我发生这种情况的原因吗?

这是因为WSDL无效,首先服务缺少端口绑定,并且您的请求和响应定义不正确。我也遇到了同样的问题。我的WS是用ApacheCXF2.5.7实现的,最后它在这个版本的CXF中成了一个bug。见票:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:axis2="http://ws.apache.org/axis2" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://ws.apache.org/axis2">
    <wsdl:documentation>FlexisService</wsdl:documentation>
    <wsdl:types>
      <xs:element name="QueryProductionCalendarRequest" type="QueryProductionCalendarRequestType"/>
      <xs:complexType name="QueryProductionCalendarRequestType">
        <xs:sequence>
          <xs:element name="Plant" type="xs:string"/>
          <xs:element name="Line" type="xs:string"/>
          <xs:element name="StartDate" type="xs:date" minOccurs="0"/>
          <xs:element name="EndDate" type="xs:date" minOccurs="0"/>
        </xs:sequence>
      </xs:complexType>
      <xs:element name="QueryProductionCalendarResponse" type="QueryProductionCalendarResponseType"/>
      <xs:complexType name="QueryProductionCalendarResponseType">
        <xs:sequence>
          <xs:element name="Plant" type="xs:string"/>
          <xs:element name="Line" type="xs:string"/>
          <xs:element name="ProductionDayList" type="ProductionDayListType"/>
        </xs:sequence>
      </xs:complexType>
      <xs:complexType name="ProductionDayListType">
        <xs:sequence>
          <xs:element name="ProductionDay" type="ProductionDayType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
      </xs:complexType>
      <xs:complexType name="ProductionDayType">
        <xs:sequence>
          <xs:element name="ProductionDate" type="xs:date"/>
          <xs:element name="ProductionRate" type="xs:integer"/>
          <xs:element name="ProductionShiftList" type="ProductionShiftListType" minOccurs="0"/>
        </xs:sequence>
      </xs:complexType>
      <xs:complexType name="ProductionShiftListType">
        <xs:sequence>
          <xs:element name="ProductionShift" type="ProductionShiftType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
      </xs:complexType>
      <xs:complexType name="ProductionShiftType">
        <xs:sequence>
          <xs:element name="Name" type="xs:string"/>
          <xs:element name="ShiftRate" type="xs:integer"/>
          <xs:element name="StartDateTime" type="xs:dateTime"/>
          <xs:element name="EndDateTime" type="xs:dateTime"/>
        </xs:sequence>
      </xs:complexType>
    </wsdl:types>
    <wsdl:message name="QueryProductionCalendarRequestMessage">
      <wsdl:part name="parameters" element="xs:QueryProductionCalendarRequest"/>
    </wsdl:message>
    <wsdl:message name="QueryProductionCalendarResponseMessage">
      <wsdl:part name="parameters" element="xs:QueryProductionCalendarResponse"/>
    </wsdl:message>
    <wsdl:portType name="FlexisServicePortType">
        <wsdl:operation name="QueryProductionCalendar">
            <wsdl:input message="axis2:QueryProductionCalendarRequestMessage" wsaw:Action="urn:QueryProductionCalendar"/>
            <wsdl:output message="axis2:QueryProductionCalendarResponseMessage" wsaw:Action="urn:QueryProductionCalendarResponse"/>
        </wsdl:operation>    
    </wsdl:portType>
    <wsdl:binding name="FlexisServiceSoap11Binding" type="axis2:FlexisServicePortType">
        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
        <wsdl:operation name="QueryProductionCalendar">
            <soap:operation soapAction="urn:QueryProductionCalendar" 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="FlexisServiceSoap12Binding" type="axis2:FlexisServicePortType">
        <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
        <wsdl:operation name="QueryProductionCalendar">
            <soap12:operation soapAction="urn:QueryProductionCalendar" style="document"/>
            <wsdl:input>
                <soap12:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap12:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:binding name="FlexisServiceHttpBinding" type="axis2:FlexisServicePortType">
        <http:binding verb="POST"/>
        <wsdl:operation name="QueryProductionCalendar">
            <http:operation location="FlexisService/QueryProductionCalendar"/>
            <wsdl:input>
                <mime:content type="text/xml" part="QueryProductionCalendar"/>
            </wsdl:input>
            <wsdl:output>
                <mime:content type="text/xml" part="QueryProductionCalendar"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="FlexisService">
        <soap:address location='http://localhost:8080/axis2/services/FlexisService'/>
    </wsdl:service>
</wsdl:definitions>