简体   繁体   English

从WSDL生成服务器代码

[英]Generating server code from WSDL

I have a project which due to historical and complex reason requires a web service for testing. 我有一个项目,由于历史和复杂的原因需要一个Web服务进行测试。

On issue is that uses a web service which is not under our control but I do have the wsdl for that service. 问题在于使用不受我们控制的Web服务,但我确实拥有该服务的wsdl。

The wsdl is client only so we have generated the client code but now need a stub client for the integration testing. wsdl只是客户端,因此我们生成了客户端代码,但现在需要一个存根客户端来进行集成测试。

I had thought to generate a server from the wdsl and add log code and stub return values but have been unable to do that because its a client wdsl - at least thats what I think. 我曾想过从wdsl生成服务器并添加日志代码和存根返回值,但由于它是客户端wdsl而无法做到这一点 - 至少这就是我的想法。

Does anyone have any ideas on how I can test this without spending a lot of time and effort on development? 有没有人对我如何在不花费大量时间和精力进行开发的情况下进行测试有任何想法?

You don't state what language or frameworks you're using but, for example, in Eclipse you can select a new Web Services project, pick "Top down Java bean Web Service" from the dropdown and then supply a WSDL to generate the WS behind it. 您没有说明您正在使用的语言或框架,但是,例如,在Eclipse中您可以选择一个新的Web服务项目,从下拉列表中选择“自上而下的Java bean Web服务”,然后提供WSDL以生成WS在它背后。 This would quickly give you the bare bones that you could use to stub the server response. 这将很快为您提供可用于存根服务器响应的简单骨骼。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM