Avatar billede fredand Forsker
08. juni 2017 - 22:13 Der er 2 kommentarer

How to create a maven project of type wsdl?

Hello Guys!

We have a history of mistakes when developing web service client and server side. We used to send the wsdl-files through email a lot during the development phase often ending up with confusion of which version is the latest.

Since we are a pretty big company we now a days got a internal maven-repo of our own where we are supposed to publish such things as wsdl.

Now it is our (my team) to create a new web service and of course we would like to expose our wsdl in our repo.

We already have a couple of maven projects:
our-new-interface-with-wsdl-and-generated-classes
our-new-web-service-facade (serverside)

We do not want to expose the project our-new-interface-with-wsdl-and-generated-classes since this got classes that might not be relevant to the client (I have heard, I guess if the client is a DOT-net, we use Java)

So now I need to figure out how to automatically create a maven project that got dependcy to our-new-interface-with-wsdl-and-generated-classes but just extract the wsdl is like:
      <groupId>com.mycompany</groupId>
      <artifactId>our-new-wsd-interfacel</artifactId>
      <version>1.0.0</version>
      <type>wsdl</type>

    Do you guys got any experience of this approach?
Best regards
Fredrik
Avatar billede arne_v Ekspert
09. juni 2017 - 15:52 #1
I don't understand the idea behind this.

Maven is for managing libraries used by the project - source code is managed via source control.

Maven is Java only.

Using Maven for distributing WSDL seems highly unusual and very problematic in a polyglot environment.

I can see a couple of better approaches:

1)

assuming "contract first" (server code also generated from WSDL)

WSDL is put in source control

static languages (Java, C# etc.) pull WSDL from source control and generate client classes in their build

dynamic languages (PHP, Python etc.) access WSDL at runtime and does everything dynamic

2)

assuming "code first" (WSDL generated from server code)

static languages (Java, C# etc.) access WSDL from test server and and generate client classes in their build

dynamic languages (PHP, Python etc.) access WSDL at runtime and does everything dynamic

3)

server team take on responsibility for client libs

static languages (Java, C# etc.) the server team generates client libs as part of their build and other projects use those
- Java client lib goes into Maven repo
- .NET client lib goes into NuGet repo

dynamic languages (PHP, Python etc.) access WSDL at runtime and does everything dynamic
Avatar billede fredand Forsker
13. juni 2017 - 17:16 #2
Hello Arne!
Thanks for your reply, we having a discusion about it right now.
I will get back to you asap!
Best regards
Fredrik
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester