Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating client using Ws import not generating service and port class

I generated wsdl using Ws gen in my application. For that wsdl I tried to generate client so used Ws import with Maven. Client generation is successful but only request, response, exception, object factory and package classes are created.

There is no class for the service reference. What is the issue?

If service class not needed how to call the service from my client file

Thanks

like image 223
sonia stanley Avatar asked Aug 04 '18 17:08

sonia stanley


1 Answers

I have once seen this problem with Java SE 'wsimport' command. In my case service publisher's 'wsdl' SOAP port uses non-standard SOAP 1.2 binding. Also, it's Service does not contain any usable ports.
It might show you some warning messages like this:

[WARNING] Ignoring SOAP port "XXXSoap12HttpPort":
it uses non-standard SOAP 1.2 binding.
You must specify the "-extension" option to use this binding.
...
[WARNING] Service "XXXService" does not contain any usable ports.
try running wsimport with -extension switch.
...

Adding -extension switch to the 'wsimport' command did the magic in this case.

wsimport -keep -p com.samlpe.jaxws.client -extension <WSDL URL>
like image 178
Kayvan Tehrani Avatar answered Sep 22 '22 16:09

Kayvan Tehrani