stubby4jとstubby-dbはどちらもHTTP呼び出しをスタブするために使用できます。 SOAPサービスは、XMLペイロードを使用したPOST HTTPコールとして考えることができます。
StubbyDBまたはStubby4jを使用する必要があるかどうかは、必要に応じて異なります。
2つのプロジェクトに分割する必要はありません。それでも、両方のスタブコールを1つのリポジトリに入れることができます。ただし、stubby4jを使用すると、マッピングを2つのファイルに分割することはできません。 stubby-dbには、任意の数のマッピングファイルを置くことができます。
編集
SOAP
- request:
method: POST
url: /soap-simulator/services/ServiceName
post: actionName[\s\S]*mobile.([0-9]+)
response:
status: 200
latency: 0
headers:
content-type: text/xml
strategy: "first-found"
files: ["stubs/<% post.1 %>/response.xml","stubs/ServiceName/actionName/default.xml"]
REST
- request:
method: POST
url: /soap-simulator/services/ServiceName/actionName
post: mobile.([0-9]+)
response:
status: 200
latency: 0
headers:
content-type: text/xml
strategy: "first-found"
files: ["stubs/<% post.1 %>/response.xml","stubs/ServiceName/actionName/default.xml"]
これをチェックアウトします。https://github.com/jwagenleitner/groovy-wslite – Rao
おかげ@Rao .But Iあなたのコードがスタブサーバーを書くために使用できると感じる。しかし、それは上記の2つのツールのようではない? – anil
私はこの[ここ](https://naturalintelligence.github.io/Stubmatic/#examples)の詳細な例を追加しました –