Reputation: 8391
I am trying to generate java file from wsdlurl. some of them are working fine but some have problem in that. here is the code.
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>1.12</version>
<executions>
<execution>
<id>ad1</id>
<goals>
<goal>wsimport</goal>
</goals>
<configuration>
<wsdlUrls>
<wsdlUrl>https://adcenterapi.microsoft.com/Api/Advertiser/v7/Reporting/ReportingService.svc?wsdl</wsdlUrl>
<wsdlUrl>https://adcenterapi.microsoft.com/Api/Advertiser/v7/Administration/AdministrationService.svc?wsdl</wsdlUrl>
<wsdlUrl>https://adcenterapi.microsoft.com/Api/Advertiser/v6/NotificationManagement/NotificationManagement.asmx?wsdl</wsdlUrl>
<wsdlUrl>https://adcenterapi.microsoft.com/Api/Advertiser/v7/CampaignManagement/CampaignManagementService.svc?wsdl</wsdlUrl>
<wsdlUrl>https://sharedservices.adcenterapi.microsoft.com/Api/Billing/v7/CustomerBillingService.svc?wsdl</wsdlUrl>
<wsdlUrl>https://sharedservices.adcenterapi.microsoft.com/Api/CustomerManagement/v7/CustomerManagementService.svc?wsdl</wsdlUrl>
</wsdlUrls>
<target>2.1</target>
<xjcArgs>
<xjcArg>-XautoNameResolution</xjcArg>
</xjcArgs>
<bindingDirectory>src/jaxws/wsdl/adCenter</bindingDirectory>
<keep>true</keep>
<packageName>com.microsoft.AdCenter.soap</packageName>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
I have did these before also but i don't have any issues. Am very much confused this time.
Can you guys try to generate Java source code using wsdl in a pom file. Since i have tried in my system am getting exceptions as
[ERROR] Two declarations cause a collision in the ObjectFactory class.
line 1 of https://adcenterapi.microsoft.com/Api/Advertiser/v7/CampaignManagement/CampaignManagementService.svc?xsd=xsd1
[ERROR] (Related to above error) This is the other declaration.
line 1 of https://adcenterapi.microsoft.com/Api/Advertiser/v7/CampaignManagement/CampaignManagementService.svc?xsd=xsd1
[ERROR] Two declarations cause a collision in the ObjectFactory class.
line 1 of https://adcenterapi.microsoft.com/Api/Advertiser/v7/CampaignManagement/CampaignManagementService.svc?xsd=xsd1
[ERROR] (Related to above error) This is the other declaration.
line 1 of https://adcenterapi.microsoft.com/Api/Advertiser/v7/CampaignManagement/CampaignManagementService.svc?xsd=xsd1
[ERROR] Two declarations cause a collision in the ObjectFactory class.
line 1 of https://adcenterapi.microsoft.com/Api/Advertiser/v7/CampaignManagement/CampaignManagementService.svc?xsd=xsd1
[ERROR] (Related to above error) This is the other declaration.
line 1 of https://adcenterapi.microsoft.com/Api/Advertiser/v7/CampaignManagement/CampaignManagementService.svc?xsd=xsd1
[ERROR] Two declarations cause a collision in the ObjectFactory class.
line 1 of https://adcenterapi.microsoft.com/Api/Advertiser/v7/CampaignManagement/CampaignManagementService.svc?xsd=xsd1
[ERROR] (Related to above error) This is the other declaration.
line 1 of https://adcenterapi.microsoft.com/Api/Advertiser/v7/CampaignManagement/CampaignManagementService.svc?xsd=xsd1
Any Ideas ?
thanks
Upvotes: 0
Views: 2567
Reputation: 3880
I'm just guessing, but it appears that there are naming collisions. You might try breaking your wsimport into multiple steps and using different <packageName>
sections for each.
Upvotes: 1