私はこの記事プレイSOAPクライアント
https://playframework.github.io/play-soap/SbtWsdl.html
これに基づいてを読んでいます。私はsbt compile
を行うと、私は、プラグインがいくつかのコードを生成し、次のbuild.sbtファイル
name := "PlaySOAPClient"
version := "1.0"
scalaVersion := "2.11.8"
libraryDependencies ++= Seq(
"com.typesafe.play" % "play-soap-client_2.11" % "1.1.3"
)
WsdlKeys.packageName := Some("com.foo")
WsdlKeys.wsdlTasks in Compile := Seq(
WsdlKeys.WsdlTask((sourceDirectory.value/"main"/"wsdl"/"foo.wsdl").toURI.toURL)
)
とplugins.sbt
resolvers += Resolver.url("play-sbt-plugins", url("https://dl.bintray.com/playframework/sbt-plugin-releases/"))(Resolver.ivyStylePatterns)
addSbtPlugin("com.typesafe.sbt" % "sbt-play-soap" % "1.1.3")
を書きました。そのコードはコンパイルされません。
Error:scalac: missing or invalid dependency detected while loading class file 'PlaySoapClient.class'.
Could not access type Configuration in value play.api,
because it (or its dependencies) are missing. Check your build definition for
missing or conflicting dependencies. (Re-run with `-Ylog-classpath` to see the problematic classpath.)
A full rebuild may help if 'PlaySoapClient.class' was compiled against an incompatible version of play.api.
Warning:scalac: Class javax.inject.Singleton not found - continuing with a stub.
/Users/User/IdeaProjects/PlaySOAPClient/target/scala-2.11/wsdl/main/sources/com/foo/webservices/FooWebService.scala
Error:(13, 8) object inject is not a member of package javax
@javax.inject.Singleton
Error:(14, 107) object api is not a member of package play
class FooWebService @javax.inject.Inject() (apacheCxfBus: play.soap.ApacheCxfBus, configuration: play.api.Configuration) extends play.soap.PlaySoapClient(apacheCxfBus, configuration) {
Error:(14, 32) object inject is not a member of package javax
class FooWebService @javax.inject.Inject() (apacheCxfBus: play.soap.ApacheCxfBus, configuration: play.api.Configuration) extends play.soap.PlaySoapClient(apacheCxfBus, configuration) {
依存関係が不明な人はいませんか?これは、クライアント側アプリケーションであり、このライブラリーを使用してSOAP呼び出しを行うことに注意してください。私は、プレイフレームワークのサーバーサイドの依存関係は望んでいません。
私の希望は、コンソールアプリケーションでプレイソープをスタンドアロンライブラリとして使用して石鹸呼び出しを行うことができるということです。
あなたのバージョンは何ですか? 'src/main/wsdl/foo.wsdl'には何が入っていますか? –
sbt.version = 0.13.16。 foo.wsdlはSOAPエンドポイントを説明します。プラグインはこのファイルを見て、SOAPプロキシコードを生成します。 –