7

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

sonia stanley
  • 71
  • 1
  • 2
  • 1
    Hi, welcome to StackOverflow. Could you edit your question please to provide more information concerning the context: what development tool are you using to generate the WSDL and what options are you taking? Thanks. – MandyShaw Aug 04 '18 at 18:03

1 Answers1

8

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>
Kayvan Tehrani
  • 3,070
  • 2
  • 32
  • 46