[英]How to share wsdl and xsd files between different projects?
We use C# project as a server for soap web service and java project as a client.我们使用 C# 项目作为 soap web 服务的服务器和 Z93F725A0742331C889ZD448B 项目的客户端。
Could you tell me what is the best way to share WSDL
and XSD
files between these two projects?你能告诉我在这两个项目之间共享WSDL
和XSD
文件的最佳方式是什么? so we don't have to make a local copy of them in our java client every time these files change in C# project.因此,每次在 C# 项目中更改这些文件时,我们不必在 java 客户端中制作它们的本地副本。
I thought about creating maven project with only WSDL
and XSD
files in the resources folder, wrap it to the jar file and publish it to Artifactory or maven shared repo. I thought about creating maven project with only WSDL
and XSD
files in the resources folder, wrap it to the jar file and publish it to Artifactory or maven shared repo. But I don't know if it's the right way, cause C# doesn't support jars.但我不知道这是否正确,因为 C# 不支持 jars。
Thanks谢谢
Could you tell me what is the best way to share WSDL and XSD files between these two projects?你能告诉我在这两个项目之间共享 WSDL 和 XSD 文件的最佳方式是什么?
It's not necessary to place these files in a project at all because WSDL+XSD exists independant of any programming language or project and can be edited directly via tools such as Stylus Studio (which doesn't have a dependency on Java or .NET).根本不需要将这些文件放在项目中,因为 WSDL+XSD 独立于任何编程语言或项目而存在,并且可以通过Stylus Studio等工具直接编辑(它不依赖于 Java 或 .NET)。 This is important for schema-first methodologies.这对于模式优先的方法很重要。
Create a common folder in source control repo into which to place the WSDL and XSD.在源代码控制存储库中创建一个公共文件夹,将 WSDL 和 XSD 放入其中。 The repo can then house both C# and Java code and refer by whatever means to the common WSDL/XSD folder.然后,repo 可以容纳 C# 和 Java 代码,并以任何方式引用通用 WSDL/XSD 文件夹。
eg repo folder layout例如 repo 文件夹布局
bin
docs
schemas <--- place here
src
|-- common
|-- schemas <--- or perhaps here
|-- cpp
|-- java
The exact layout is not important so long as:确切的布局并不重要,只要:
That or create a second repo just for WSDL definitions或者为 WSDL 定义创建第二个仓库
For more great SOA ideas check out this book - SOA Design Patterns by Thomas Erl.有关更多伟大的 SOA 想法,请查看这本书 - Thomas Erl 的 SOA 设计模式。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.