をCXFのWebサービスクライアント(スカラ+ Javaの+ WSDL2Javaの)を作成する際にこれらの他の質問は、ソリューションのヒントが、私は仕事にこれを取得することができていない:
Could not resolve a binding for http://schemas.xmlsoap.org/wsdl/soap/
ServiceConstructionException when creating a CXF web service client
How to package an Apache CXF application into a monolithic JAR with the Maven "shade" pluginServiceConstructionException
java -Xdebug -jar myapp.jar
でアプリケーションを起動すると、アプリケーションがSOAP呼び出しを行うときにServiceConstructionException: Could not resolve a binding for null
と表示されます。アプリケーションとSOAP呼び出しは、IntelliJでアプリケーションを起動するとうまく動作します。ここでは、エラーを再現する最小限の例です:再現するhttps://github.com/stianlagstad/mainclass-and-jxf-problems-demo
ステップ:
- gradle clean build && java -Xdebug -jar build/libs/mainclass-and-jxf-problems-demo.jar
- http://localhost:4242/endpoint/に移動し、エラーに
を参照してください誰も私が私が作るためにしなければならないその変化を把握助けることができますSOAP呼び出しは動作しますか?私はMETA-INFを除外しないようにbuild.gradle
を編集した場合は、私が代わりにこのエラーが発生します(すなわち、代わりにconfigurations.compile.collect { it.isDirectory() ? it : zipTree(it).matching{exclude{it.path.contains('META-INF')}} }
のconfigurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
を持つ)
:
編集は、より多くの情報を提供するError: Could not find or load main class com.shadowjarcxfproblem.JettyLauncher
(jarファイルなどのアプリを起動します)。しかし、IntelliJでアプリを起動すると、SOAP呼び出しも同様に機能します。
CXFエラーのスタックトレース:これら二つを読んで、私は最終的に働く何かにつまずい異なるものの束を試した後
org.apache.cxf.service.factory.ServiceConstructionException: Could not resolve a binding for null
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createBindingInfo(AbstractWSDLBasedEndpointFactory.java:352)
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpointInfo(AbstractWSDLBasedEndpointFactory.java:259)
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:144)
at org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:91)
at org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:157)
at org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:142)
at com.shadowjarcxfproblem.SoapServiceFactory.create(SoapServiceFactory.java:36)
at com.shadowjarcxfproblem.service.CalculatorServiceComponent$CalculatorServiceImpl.<init>(CalculatorService.scala:17)
...
Caused by: org.apache.cxf.BusException: No binding factory for namespace http://schemas.xmlsoap.org/soap/ registered.
at org.apache.cxf.bus.managers.BindingFactoryManagerImpl.getBindingFactory(BindingFactoryManagerImpl.java:93)
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createBindingInfo(AbstractWSDLBasedEndpointFactory.java:339)
... 75 more
こんにちは、私は同じ問題を取得しています、私は私のビルドファイルにコードスニペットの上に追加することを試みたが、動作していません、あなたはplsを助けることができますか? – Dipti
再現可能なサンプルを作成してGitHubに置くと、私は助けてくれるかもしれません:) – L42
私はliferay dxpワークスペースを持っています。あなたがliferayに慣れていれば私はリポジトリを共有できます。 – Dipti