2

In Java8, Generated web service java classes by using

wsimport -keep http://sasikumar:8080/SimpleWebServiceServer/AdditionService?wsdl

I can't MyServicePort.java(AdditionPort.java) class from the generated files list

enter image description here

so anyone give me some idea about writing client stub without MyServicePort.java(AdditionPort.java) class

2 Answers 2

4

This answer goes a bit late. I had same issue while using maven plugin jaxws-maven-plugin. I was about to generate client code for some Microsoft service, everything went fine but Port and Service classes where missing. In debug enabled I saw the root cause, there was message:

[WARNING] Ignoring SOAP port "WSHttpBinding_IMyService": it uses non-standard SOAP 1.2 binding.
You must specify the "-extension" option to use this binding.
  line 1 of https://my.address.to.wsdl

[WARNING] Service "MyService" does not contain any usable ports. try running wsimport with -extension switch.
  line 1 of https://my.address.to.wsdl

Adding "-extension" resolved problem.

Sign up to request clarification or add additional context in comments.

Comments

0

I can't add a comment so I will add this here. For anyone searching how to add the "-extension" option to the , just add a:

<extension>true</extension>

xml tag to the configuration tag. Example:

<plugin>
    <groupId>com.sun.xml.ws</groupId>
    <artifactId>jaxws-maven-plugin</artifactId>
    <version>4.0.2</version>
    <executions>
        <execution>
            <goals>
                <goal>wsimport</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <extension>true</extension>
        <wsdlFiles>
            <wsdlFile>${project.basedir}/src/main/resources/wsdl/example.xsd</wsdlFile>
        </wsdlFiles>
        <packageName>com.example.soap.ws.client</packageName>
        <sourceDestDir>
            ${project.build.directory}/generated-sources/
        </sourceDestDir>
    </configuration>
</plugin>

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.