tags:

views:

584

answers:

4
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;

The above imported classes are in wsdl file.. how to generate packages "comm.premiereconnect.premconn".... A url for wsdl file is also given... How to generate/ resolve this import issue

A: 

Use Axis' WSDL2Java on the WSDL to create the classes.

stevedbrown
A: 

As stevedbrown said WSDL2Java will do the job for you :-)

SourceRebels
+1  A: 

If you have the J2EE 5 SDK or the JDK 6, they comes with a tool named wsimport that can be used to generate JAX-WS proxy classes from a wsdl file or url.

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

will process my.wsdl and create source files in src/com/priemiereconnect/premconn and binary files in build/com/premiereconnect/premconn both in the package com.premiereconnect.premconn

my.wsdl can be a url or a file.

Coincidentally the directories used above are the ones used by Eclipse for its projects' source and binary files. ;)

R. Bemrose
Cool, I didn't know that.
stevedbrown
A: 

Hi I tried to generate the java class from wsdl link it is giving parse error... so it is prob with the wsdl file right?

[

~/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.
suresh
It could be a problem with the WSDL, or it could be that JAX-WS is trying to create classes for each of those parameters, but they don't match. Unfortunately, I know very little about JAXWS binding customization, so I'm not sure how to work around this issue.
R. Bemrose