简体   繁体   中英

How to specify address location in axis2-java2wsdl-maven-plugin?

I use to generate wsdl from java calss axis2-java2wsdl-maven-plugin. Below I cited a passage pom.xml:

<plugin>
                <groupId>org.apache.axis2</groupId>
                <artifactId>axis2-java2wsdl-maven-plugin</artifactId>
                <version>1.6.2</version>
                <configuration>
                    <className>Path_to_ws_class</className>
                <outputFileName>src/main/webapp/webservice.wsdl</outputFileName>
        <schemaTargetNamespace>http://test.test/xsd</schemaTargetNamespace>
                    <wsdlVersion>${project.version}</wsdlVersion>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>java2wsdl</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

But it generates in the bottom of wsdl file:

<wsdl:port name="WebServiceHttpSoap11Endpoint" binding="axis2:WebServiceSoap11Binding">
<soap:address location="http://localhost:8080/axis2/services/MerchantWebService"/>
</wsdl:port>

I don't need following part, because my web service is not available by this link:

<soap:address location="http://localhost:8080/axis2/services/MerchantWebService"/>

Is it possible to specify location as parameter in plugin configuration? locationUri doesn't work :(

Add

<locationUri>http://localhost:8080/AppRootContext/services/MerchantWebService</locationUri>

to your

<configuration> 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM