2012-12-06 2 views
0

에 extraarg 설정 나는 Maven 프로젝트에 개미에서 마이그레이션을했다 그리고 난 조각 나 떨어져 문제가 없습니다 내가 WSDL2Java가의 TASC에 인수 다음이 내 개미 bild.xml에서WSDL2Java의는 메이븐

  1. 를 :

    <arg value="-ns2p" /> 
        <arg value="${wsdl-ns-binding}" /> 
    

    그리고 내 pom.xml에서 동일한 작업을 수행하려고합니다. 그러나 그것은 일하지 않았다!! 아무리 노력해도 .. 내가 뭘 잘못하고 있니? 여기 WSDL2Java의 플러그인 정의의 예 :

    <plugin> 
         <groupId>org.apache.axis2</groupId> 
         <artifactId>axis2-wsdl2code-maven-plugin</artifactId> 
         <version>1.6.2</version> 
         <executions> 
          <execution> 
           <phase>generate-sources</phase> 
           <goals> 
            <goal>wsdl2code</goal> 
           </goals> 
           <configuration> 
            <packageName>ru.domain.ws.services.persistence.etb.mortgage.axis2.jaxb.server</packageName> 
            <wsdlFile>${wsdl-home}/ETB_MortgagePersistence.wsdl</wsdlFile> 
            <outputDirectory>${basedir}/src/main/generated</outputDirectory>   
            <flattenFiles>true</flattenFiles> 
            <databindingName>jaxbri</databindingName> 
            <overWrite>true</overWrite> 
          <!-- <namespaceToPackage> 
             http://ws.domain.ru/persistence/ETB/mortgage/wsdl=ru.domain.ws.services.persistence.etb.mortgage.wsdl 
            </namespaceToPackage> --> 
    
            <wsdlOptions> 
             <wsdlOption> 
              <extraargs> 
               <extraarg>-ns2p</extraarg> 
               <extraarg>http://ws.domain.ru/persistence/ETB/mortgage/wsdl=ru.domain.ws.services.persistence.etb.mortgage.wsdl</extraarg> 
              </extraargs>         
             </wsdlOption> 
            </wsdlOptions> 
    
            <options> 
             <property> 
              <name>bindingFileName</name> 
              <value>${jaxb-binding-path}</value> 
             </property> 
            </options> 
    
           </configuration> 
          </execution> 
         </executions> 
         <dependencies> 
          <dependency> 
           <groupId>org.apache.axis2</groupId> 
           <artifactId>axis2-jaxbri</artifactId> 
           <version>1.6.2</version> 
          </dependency> 
         </dependencies> 
        </plugin> 
    

$ {WSDL - NS - 결합} 변수 http://ws.domain.ru/persistence/ETB/mortgage/wsdl=ru.domain.ws.services.persistence.etb.mortgage.wsdl

답변

0

<plugin> 
    <groupId>org.apache.axis2</groupId> 
    <artifactId>axis2-wsdl2code-maven-plugin</artifactId> 
     <version>1.6.2</version> 
    <executions> 
     <execution> 
      <id>generate-sources</id> 
      <phase>generate-sources</phase> 
      <configuration> 
       <sourceRoot>${basedir}/src/main/java</sourceRoot> 
       <wsdlOptions> 
        <wsdlOption> 
         <wsdl>${wsdl-home}/ETB_MortgagePersistence.wsdl</wsdl> 
         <extraargs> 
          <extraarg>-ns2p</extraarg> 
          <extraarg>http://ws.domain.ru/persistence/ETB/mortgage/wsdl=ru.domain.ws.services.persistence.etb.mortgage.wsdl</extraarg> 
         </extraargs> 
        </wsdlOption> 
       </wsdlOptions> 
      </configuration> 
      <goals> 
       <goal>wsdl2java</goal> 
      </goals> 
     </execution> 
    </executions> 
</plugin> 
합니다 (wsdlOptions 내부 WSDL 파일을 지정)이 레이아웃을 시도이며