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”.... 还提供了wsdl文件的URL ...如何生成/解决此导入问题
答案 0 :(得分:2)
如果你有J2EE 5 SDK或JDK 6,它们会附带一个名为wsimport的工具,可用于从wsdl文件或url生成JAX-WS代理类。< / p>
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可以是网址或文件。
巧合上面使用的目录是Eclipse用于其项目的源文件和二进制文件的目录。 ;)
答案 1 :(得分:0)
在WSDL上使用Axis'WSDL2Java来创建类。
答案 2 :(得分:0)
正如stevedbrown所说,WSDL2Java将为你完成这项工作: - )
答案 3 :(得分:0)
我试图从wsdl链接生成java类,它给出了解析错误...所以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.
答案 4 :(得分:0)
使用axis2-1.5.5 \ bin \ wsdl2java或apache-cxf-2.5.2 \ bin \ wsdl2java -autoNameResolution可以解决您的问题。 但是,我不知道关于这个名称冲突的发动机关。