[英]Can we use different Java web frameworks in one web application?
[英]Can we use php web services in java?
I have a web application in JAVA (Spring MVC framework) and I want to connect to a website and use its web services which wrote in php, is it possible? 如果是的話,我該怎么做?
使用什么語言來創建 Web 服務並不重要。 您可以通過同意它如何交換消息來與任何網絡服務交談。
使用CWSDLGeneratorDocument.php以 DOCUMENT/LITERAl 樣式生成 WSDL 文件,並在 java 1 中使用標准庫 JAX-WS。
Yes, Spring integrates well with Apache Axis: http://axis.apache.org/axis2/java/core/docs/spring.html
To consume web services with Spring you can use JaxWsPortProxyFactoryBean to create a client proxy: http://musingsofaprogrammingaddict.blogspot.com/2009/03/writing-and-testing-jax-ws-clients.html
從 Spring in Action 開始,以下是配置示例 web 服務代理 bean 的方法:
<bean id="spitterService" class="org.springframework.remoting.jaxws.JaxWsPortProxyFactoryBean"
p:wsdlDocumentUrl="http://localhost:8080/services/SpitterService?wsdl"
p:serviceName="spitterService" p:portName="spitterServiceHttpPort"
p:serviceInterface="com.habuma.spitter.service.SpitterService"
p:namespaceUri="http://spitter.com"/>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.