在我当前的项目中,我必须从 .net 连接到 JAX-WS Web 服务 客户端。
JAX-WS Web 服务在tomcat 服务器上运行。我可以通过简单的 ruby 脚本测试和使用 Web 服务:
# test_web_services.rb
require 'rubygems'
require 'soap/wsdlDriver'
def get_driver
wsdl_url = 'http://localhost:8080/services/RPCService?WSDL'
return SOAP::WSDLDriverFactory.new(wsdl_url).create_rpc_driver
end
driver = get_driver
driver.createOrganization ARGV[0], "organization-name-parameter"
我还可以使用 SoapUI(一个 SOAP gui 测试工具),但无论我如何努力,我似乎都无法使用任何类型的 .net Soap 客户端访问 Web 服务。
我也无法使用浏览器查看 wsdl。几乎所有错误都是 404s。我什至尝试精确模仿来自我的 ruby 脚本的 请求标头 .net代码,但无济于事。我还停用了我的防火墙,以防万一。
当网站启动时,JAX-WS 服务从 bean 启动:
<bean class="org.springframework.remoting.jaxws.SimpleJaxWsServiceExporter">
<property name="baseAddress" value="http://localhost:8080/services/"/>
</bean>
<bean id="RPCServiceEndpoint" class="com.package.RPCServiceEndpoint"/>
这是 RPCServiceEndpoint.java 使用的注释:
@WebService(serviceName="RPCService")
@SOAPBinding(style=Style.RPC)
@Autowired applied to constructor
@WebMethod applied to each SOAP method
自 1999 年以来,我已经尝试了几乎所有 SOAP 客户端 .net 库。 .net 框架,但我仍然收到 404。
如何使用 .net SOAP 客户端访问此 JAX-WS Web 服务?
注意:我尝试使用 wsdl .microsoft.com/en-us/library/7h3ystb6%28v=vs.80%29.aspx" rel="nofollow">wsdl.exe 和WCF 的 svcutil.exe,但他们和我的自制客户端一样对 Web 服务视而不见。
In my current project I have to connect to a JAX-WS web service from a .net client.
The JAX-WS web service runs on a tomcat server. I'm able to test and use the Web Service with a simple ruby script:
# test_web_services.rb
require 'rubygems'
require 'soap/wsdlDriver'
def get_driver
wsdl_url = 'http://localhost:8080/services/RPCService?WSDL'
return SOAP::WSDLDriverFactory.new(wsdl_url).create_rpc_driver
end
driver = get_driver
driver.createOrganization ARGV[0], "organization-name-parameter"
I can also connect with SoapUI (a SOAP gui testing tool), but no matter how hard I try I cannot seem to hit the web service with a .net Soap Client of any kind.
Also I am unable to view the wsdl with the browser. Almost all errors are 404s. I even went so far as to try and precisely mimic the request headers coming from the ruby script in my .net code, but to no avail. I also deactivated my firewall, just in case.
The JAX-WS service is started from a bean when the website starts up:
<bean class="org.springframework.remoting.jaxws.SimpleJaxWsServiceExporter">
<property name="baseAddress" value="http://localhost:8080/services/"/>
</bean>
<bean id="RPCServiceEndpoint" class="com.package.RPCServiceEndpoint"/>
Here’s the annotations RPCServiceEndpoint.java uses:
@WebService(serviceName="RPCService")
@SOAPBinding(style=Style.RPC)
@Autowired applied to constructor
@WebMethod applied to each SOAP method
I’ve tried almost every SOAP client .net library since the beginning of the .net framework and I still get 404s.
How can I hit this JAX-WS web service with a .net SOAP client?
Note: I've tried to hit the wsdl with wsdl.exe and WCF's svcutil.exe, but they are just as blind to the web service as my homemade clients are.
发布评论