我最近开始使用wiremock,我对以下问题感到震惊
我使用以下扩展作为pom中的依赖项 ```
<dependencies>
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock-standalone</artifactId>
<version>2.6.0</version>
</dependency>
<dependency>
<groupId>org.wiremock</groupId>
<artifactId>wiremock-webhooks-extension</artifactId>
<version>0.0.1</version>
</dependency>
<dependency>
<groupId>com.opentable</groupId>
<artifactId>wiremock-body-transformer</artifactId>
<version>1.1.6</version>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<resources>
<resource>
<directory>${basedir}</directory>
<includes>
<include>**/*.xml</include>
<include>**/*.json</include>
</includes>
<excludes>
<exclude>pom.xml</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>com.github.tomakehurst.wiremock.standalone.WireMockServerRunner</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<finalName>${project.artifactId}-${project.version}</finalName>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
```
我尝试使用webhook扩展程序运行线程,如下面两种方式
```
java -jar target/wiremock-1.0-SNAPSHOT.jar -verbose --extensions com.opentable.extension.BodyTransformer, org.wiremock.webhooks.Webhooks
java -cp "wiremock-standalone-2.6.0.jar:wiremock-webhooks-extension-0.0.1.jar" com.github.tomakehurst.wiremock.standalone.WireMockServerRunner --verbose --extensions org.wiremock.webhooks.Webhooks
```
```
{
"priority":1,
"request":{
"url":"/services/cv",
"method":"POST",
"headers":{
"SOAPAction":{
"contains":"PutMessage-CV"
}
},
"bodyPatterns":[
{
"matchesXPath":"//pcc:FamilyName[text()='FRITZ']",
"xPathNamespaces":{
"pcc":"http://www.starstandards.org/STAR"
}
}
]
},
"response":{
"status":200,
"headers":{
"Content-Type":"text/xml; charset=utf-8"
},
"bodyFileName":"cv/verified.xml",
"transformers":[
"body-transformer"
]
},
"postServeActions":{
"webhook":{
"headers":{
"Content-Type":"text/xml; charset=utf-8"
},
"method":"POST",
"bodyFileName":"cv/verified.xml",
"transformers":[
"body-transformer"
],
"url":"//pcc:serviceUrl"
}
}
}
```
您能否建议我如何使用wiremock实现这一目标。
谢谢,