java - Using multiple WSDLs with Axis2 wsdl2code Maven plugin -


i'm creating client maven2 uses several web services. i'm restricted using axis2 or other framework supporting apache httpclient http conduit because these services require integration managed certificate solution based on httpclient.

i'm familiar cxf's code-gen maven plugin allows multiple wsdls input during code generation. however, axis2 code-gen plugin can process 1 wsdl @ time.

how can make maven run wsdl2code each wsdl during code-gen phase? need multiple profiles this?

the build section of pom looks this:

<build>     <plugins>         <plugin>             <groupid>org.apache.axis2</groupid>             <artifactid>axis2-wsdl2code-maven-plugin</artifactid>             <version>1.6.0</version>             <executions>                 <execution>                     <goals>                         <goal>wsdl2code</goal>                     </goals>                 </execution>             </executions>             <configuration>                 <unpackclasses>true</unpackclasses>                 <databindingname>adb</databindingname>                 <packagename>org.example.stackoverflow.axis2-maven</packagename>                 <!-- 1 of these gets used code generator -->                 <wsdlfile>src/main/resources/service1.wsdl</wsdlfile>                 <wsdlfile>src/main/resources/service2.wsdl</wsdlfile>                 <outputdirectory>target/generated-sources</outputdirectory>                 <syncmode>sync</syncmode>             </configuration>         </plugin>     </plugins> </build> 

references

you can try this, not test right think should work

   <plugin>         <groupid>org.apache.axis2</groupid>         <artifactid>axis2-wsdl2code-maven-plugin</artifactid>         <version>1.6.0</version>         <executions>             <execution>                 <id>ws1</id>                 <goals>                     <goal>wsdl2code</goal>                 </goals>                 <configuration>                    <unpackclasses>true</unpackclasses>                    <databindingname>adb</databindingname>                    <packagename>org.example.stackoverflow.axis2-maven</packagename>                    <wsdlfile>src/main/resources/service1.wsdl</wsdlfile>                    <outputdirectory>target/generated-sources</outputdirectory>                    <syncmode>sync</syncmode>                 </configuration>             </execution>             <execution>                 <id>ws2</id>                 <goals>                     <goal>wsdl2code</goal>                 </goals>                 <configuration>                    <unpackclasses>true</unpackclasses>                    <databindingname>adb</databindingname>                    <packagename>org.example.stackoverflow.axis2-maven</packagename>                    <wsdlfile>src/main/resources/service2.wsdl</wsdlfile>                    <outputdirectory>target/generated-sources</outputdirectory>                    <syncmode>sync</syncmode>                 </configuration>             </execution>         </executions>     </plugin> 

Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -