WSDL Java проблема импорта - PullRequest
1 голос
/ 17 июня 2009
import com.premiereconnect.premconn.FaxNumberAvailableListRequest;
import com.premiereconnect.premconn.FaxNumberAvailableListResult;
import com.premiereconnect.premconn.GroupListResult;
import com.premiereconnect.premconn.UserCreateRequest;
import com.premiereconnect.premconn.UserCreateResult;
import com.premiereconnect.premconn.UserUpdateRequest;
import com.premiereconnect.premconn.UserUpdateResult;

Вышеуказанные импортированные классы находятся в файле wsdl .. как сгенерировать пакеты "comm.premiereconnect.premconn" .... URL для файла wsdl также приводится ... Как создать / решить эту проблему импорта

Ответы [ 5 ]

2 голосов
/ 18 июня 2009

Если у вас есть J2EE 5 SDK или JDK 6 , они поставляются с инструментом с именем wsimport , который можно использовать для создания прокси JAX-WS классы из файла wsdl или URL.

wsimport -s src -d build -p com.premiereconnect.premconn -keep my.wsdl

обработает my.wsdl и создаст исходные файлы в src/com/priemiereconnect/premconn и двоичные файлы в build/com/premiereconnect/premconn в пакете com.premiereconnect.premconn

my.wsdl может быть URL-адресом или файлом.

По совпадению каталоги, использованные выше, используются Eclipse для исходных и двоичных файлов своих проектов. ;)

0 голосов
/ 30 января 2012

Использование axis2-1.5.5 \ bin \ wsdl2java или apache-cxf-2.5.2 \ bin \ wsdl2java -autoNameResolution может решить вашу проблему. Тем не менее, я не знаю подкован об этом конфликте имен.

0 голосов
/ 18 июня 2009

Я попытался сгенерировать Java-класс по ссылке wsdl, которая выдает ошибку синтаксического анализа ... так что это проблема с файлом wsdl, верно?

[

~/workspace/provisioning_tool_1.0.0_dev_dist/ProvisioningTool$]wsimport.exe -s src -d build -p com.premiereconnect.premconn -keep http://premconn.premiereconnect.com/2007/09/AM?WSDL

        parsing WSDL...


        [ERROR] Failed to generate Java signature: duplicate parameter names parameter. Use JAXWS binding customization to rename the wsdl:part "parameter"
        line 1055 of file:/D:/Profiles/pdk473/workspace/Provisioning%20Tool/test.wsdl

        [ERROR] Failed to generate Java signature: duplicate parameter names parameter. Use JAXWS binding customization to rename the wsdl:part "parameter"
        line 1051 of file:/D:/Profiles/pdk473/workspace/Provisioning%20Tool/test.wsdl

        [ERROR] Failed to generate Java signature: duplicate parameter names parameter. Use JAXWS binding customization to rename the wsdl:part "parameter"
        line 1063 of file:/D:/Profiles/pdk473/workspace/Provisioning%20Tool/test.wsdl

        [ERROR] Failed to generate Java signature: duplicate parameter names parameter. Use JAXWS binding customization to rename the wsdl:part "parameter"
        line 1059 of file:/D:/Profiles/pdk473/workspace/Provisioning%20Tool/test.wsdl

        [ERROR] Failed to generate Java signature: duplicate parameter names parameter. Use JAXWS binding customization to rename the wsdl:part "parameter"
        line 1071 of file:/D:/Profiles/pdk473/workspace/Provisioning%20Tool/test.wsdl

        [ERROR] Failed to generate Java signature: duplicate parameter names parameter. Use JAXWS binding customization to rename the wsdl:part "parameter"
        line 1067 of file:/D:/Profiles/pdk473/workspace/Provisioning%20Tool/test.wsdl

        [ERROR] Failed to generate Java signature: duplicate parameter names parameter. Use JAXWS binding customization to rename the wsdl:part "parameter"
        line 1079 of file:/D:/Profiles/pdk473/workspace/Provisioning%20Tool/test.wsdl

        [ERROR] Failed to generate Java signature: duplicate parameter names parameter. Use JAXWS binding customization to rename the wsdl:part "parameter"
        line 1075 of file:/D:/Profiles/pdk473/workspace/Provisioning%20Tool/test.wsdl

        [ERROR] Failed to generate Java signature: duplicate parameter names parameter. Use JAXWS binding customization to rename the wsdl:part "parameter"
        line 1087 of file:/D:/Profiles/pdk473/workspace/Provisioning%20Tool/test.wsdl

        [ERROR] Failed to generate Java signature: duplicate parameter names parameter. Use JAXWS binding customization to rename the wsdl:part "parameter"
        line 1083 of file:/D:/Profiles/pdk473/workspace/Provisioning%20Tool/test.wsdl

        [ERROR] Failed to generate Java signature: duplicate parameter names parameter. Use JAXWS binding customization to rename the wsdl:part "parameter"
        line 1095 of file:/D:/Profiles/pdk473/workspace/Provisioning%20Tool/test.wsdl

        [ERROR] Failed to generate Java signature: duplicate parameter names parameter. Use JAXWS binding customization to rename the wsdl:part "parameter"
        line 1091 of file:/D:/Profiles/pdk473/workspace/Provisioning%20Tool/test.wsdl

        [ERROR] Failed to generate Java signature: duplicate parameter names parameter. Use JAXWS binding customization to rename the wsdl:part "parameter"
        line 1103 of file:/D:/Profiles/pdk473/workspace/Provisioning%20Tool/test.wsdl

        [ERROR] Failed to generate Java signature: duplicate parameter names parameter. Use JAXWS binding customization to rename the wsdl:part "parameter"
        line 1099 of file:/D:/Profiles/pdk473/workspace/Provisioning%20Tool/test.wsdl

        [ERROR] Failed to generate Java signature: duplicate parameter names parameter. Use JAXWS binding customization to rename the wsdl:part "parameter"
        line 1111 of file:/D:/Profiles/pdk473/workspace/Provisioning%20Tool/test.wsdl

        [ERROR] Failed to generate Java signature: duplicate parameter names parameter. Use JAXWS binding customization to rename the wsdl:part "parameter"
        line 1107 of file:/D:/Profiles/pdk473/workspace/Provisioning%20Tool/test.wsdl

        [ERROR] Failed to generate Java signature: duplicate parameter names parameter. Use JAXWS binding customization to rename the wsdl:part "parameter"
        line 1119 of file:/D:/Profiles/pdk473/workspace/Provisioning%20Tool/test.wsdl

        [ERROR] Failed to generate Java signature: duplicate parameter names parameter. Use JAXWS binding customization to rename the wsdl:part "parameter"
        line 1115 of file:/D:/Profiles/pdk473/workspace/Provisioning%20Tool/test.wsdl

        [ERROR] Failed to generate Java signature: duplicate parameter names parameter. Use JAXWS binding customization to rename the wsdl:part "parameter"
        line 1127 of file:/D:/Profiles/pdk473/workspace/Provisioning%20Tool/test.wsdl

        [ERROR] Failed to generate Java signature: duplicate parameter names parameter. Use JAXWS binding customization to rename the wsdl:part "parameter"
        line 1123 of file:/D:/Profiles/pdk473/workspace/Provisioning%20Tool/test.wsdl

        [ERROR] Failed to generate Java signature: duplicate parameter names parameter. Use JAXWS binding customization to rename the wsdl:part "parameter"
        line 1135 of file:/D:/Profiles/pdk473/workspace/Provisioning%20Tool/test.wsdl

        [ERROR] Failed to generate Java signature: duplicate parameter names parameter. Use JAXWS binding customization to rename the wsdl:part "parameter"
        line 1131 of file:/D:/Profiles/pdk473/workspace/Provisioning%20Tool/test.wsdl

        [ERROR] Failed to generate Java signature: duplicate parameter names parameter. Use JAXWS binding customization to rename the wsdl:part "parameter"
        line 1143 of file:/D:/Profiles/pdk473/workspace/Provisioning%20Tool/test.wsdl

        [ERROR] Failed to generate Java signature: duplicate parameter names parameter. Use JAXWS binding customization to rename the wsdl:part "parameter"
        line 1139 of file:/D:/Profiles/pdk473/workspace/Provisioning%20Tool/test.wsdl

        [ERROR] Failed to generate Java signature: duplicate parameter names parameter. Use JAXWS binding customization to rename the wsdl:part "parameter"
        line 1151 of file:/D:/Profiles/pdk473/workspace/Provisioning%20Tool/test.wsdl

        [ERROR] Failed to generate Java signature: duplicate parameter names parameter. Use JAXWS binding customization to rename the wsdl:part "parameter"
        line 1147 of file:/D:/Profiles/pdk473/workspace/Provisioning%20Tool/test.wsdl

        [ERROR] Failed to generate Java signature: duplicate parameter names parameter. Use JAXWS binding customization to rename the wsdl:part "parameter"
        line 1159 of file:/D:/Profiles/pdk473/workspace/Provisioning%20Tool/test.wsdl

        [ERROR] Failed to generate Java signature: duplicate parameter names parameter. Use JAXWS binding customization to rename the wsdl:part "parameter"
        line 1155 of file:/D:/Profiles/pdk473/workspace/Provisioning%20Tool/test.wsdl

        [ERROR] Failed to generate Java signature: duplicate parameter names parameter. Use JAXWS binding customization to rename the wsdl:part "parameter"
        line 1167 of file:/D:/Profiles/pdk473/workspace/Provisioning%20Tool/test.wsdl

        [ERROR] Failed to generate Java signature: duplicate parameter names parameter. Use JAXWS binding customization to rename the wsdl:part "parameter"
        line 1163 of file:/D:/Profiles/pdk473/workspace/Provisioning%20Tool/test.wsdl

        [ERROR] Failed to generate Java signature: duplicate parameter names parameter. Use JAXWS binding customization to rename the wsdl:part "parameter"
        line 1175 of file:/D:/Profiles/pdk473/workspace/Provisioning%20Tool/test.wsdl

        [ERROR] Failed to generate Java signature: duplicate parameter names parameter. Use JAXWS binding customization to rename the wsdl:part "parameter"
        line 1171 of file:/D:/Profiles/pdk473/workspace/Provisioning%20Tool/test.wsdl

        Failed to parse the WSDL.
0 голосов
/ 18 июня 2009

Как сказал скакун WSDL2Java сделает всю работу за вас: -)

0 голосов
/ 17 июня 2009

Используйте WSDL2Java Axis на WSDL для создания классов.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...