Maven Jetty插件配置

时间:2014-04-16 16:17:45

标签: java plugins jetty maven-3

我正在阅读本教程:https://camel.apache.org/tutorial-example-reportincident-part1.html。我正在运行我们的网络服务"并尝试输入

> mvn jetty:run

但是,我有以下错误:

[ERROR] Failed to execute goal org.mortbay.jetty:jetty-maven-plugin:8.0.0.M3:run
(default-cli) on project camel-example-reportincident: Execution default-cli of
goal org.mortbay.jetty:jetty-maven-plugin:8.0.0.M3:run failed: A required class
was missing while executing org.mortbay.jetty:jetty-maven-plugin:8.0.0.M3:run:
org/objectweb/asm/ClassVisitor

我不确定该怎么做。我尝试添加/安装一些依赖项和JAR,并感谢您的帮助。

@Marius这里是指定创建类ReportIncidentEndpoint的WSDL:

<?xml version="1.0" encoding="iso-8859-1"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:tns="http://reportincident.example.camel.apache.org"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    targetNamespace="http://reportincident.example.camel.apache.org">

  <!-- Type definitions for input- and output parameters for webservice -->
  <wsdl:types>
    <xs:schema targetNamespace="http://reportincident.example.camel.apache.org">
      <xs:element name="inputReportIncident">
        <xs:complexType name="inputReportIncident">
          <xs:sequence>
            <xs:element type="xs:string"  name="incidentId"/>
            <xs:element type="xs:string"  name="incidentDate"/>
            <xs:element type="xs:string"  name="givenName"/>
            <xs:element type="xs:string"  name="familyName"/>
            <xs:element type="xs:string"  name="summary"/>
            <xs:element type="xs:string"  name="details"/>
            <xs:element type="xs:string"  name="email"/>
            <xs:element type="xs:string"  name="phone"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="outputReportIncident">
        <xs:complexType>
          <xs:sequence>
            <xs:element type="xs:string" name="code"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:schema>
  </wsdl:types>

  <!-- Message definitions for input and output -->
  <wsdl:message name="inputReportIncident">
    <wsdl:part name="parameters" element="tns:inputReportIncident"/>
  </wsdl:message>
  <wsdl:message name="outputReportIncident">
    <wsdl:part name="parameters" element="tns:outputReportIncident"/>
  </wsdl:message>

  <!-- Port (interface) definitions -->
  <wsdl:portType name="ReportIncidentEndpoint">
    <wsdl:operation name="ReportIncident">
      <wsdl:input message="tns:inputReportIncident"/>
      <wsdl:output message="tns:outputReportIncident"/>
    </wsdl:operation>
  </wsdl:portType>

  <!-- Port bindings to transports and encoding - HTTP, document literal encoding is used -->
  <wsdl:binding name="ReportIncidentBinding" type="tns:ReportIncidentEndpoint">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="ReportIncident">
      <soap:operation
          soapAction="http://reportincident.example.camel.apache.org/ReportIncident"
          style="document"/>
      <wsdl:input>
        <soap:body parts="parameters" use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body parts="parameters" use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>

  <!-- Service definition -->
  <wsdl:service name="ReportIncidentService">
    <wsdl:port name="ReportIncidentPort" binding="tns:ReportIncidentBinding">
      <soap:address location="http://reportincident.example.camel.apache.org"/>
    </wsdl:port>
  </wsdl:service>

</wsdl:definitions>

0 个答案:

没有答案