[WSDL2Java / Java2WSDL] java.IO.IOException "Type ... is referenced but not defined"

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[WSDL2Java / Java2WSDL] java.IO.IOException "Type ... is referenced but not defined"

BhaveshG
Hi,

I have seen many post with the similar issues posted here but could not find the answer to resolve my issue.

I am a newbie and creating a java webservice stub using Parlay webservice wsdl's and having issues creating them.

I have performaed the following steps to create the webservice
1. Used the following command to create source code
WSDL2Java -or -o .\source -ss -g -uri .\parlayx_sms_send_service_3_1.wsdl

2. Created a dynamic web project and then imported the source code to it.
3. Added Axis libraries as external JARS.
4. The project was successfully built without any errors.

While trying to create Webservice with service implementation as "org.csapi.www.wsdl.parlayx.sms.send.v3_1.service.SendSmsServiceStub" in eclipse, I received a warning stating that the service class "org.csapi.www.wsdl.parlayx.sms.send.v3_1.service.SendSmsServiceStub" does not comply to requirements of the JAX-RPC 1.1 specification.

Proceeding ahead I see the error "IWAB0399E Error in generating Java from WSDL:  java.io.IOException: Type {http://v3_0.sms.parlayx.schema.www.csapi.org}SmsFormat is referenced but not defined."

I checked up with the wsdl and schema's namespace and all that seems to be fine.

Any help in resolving this will be appreciated.

I have attached all the wsdl's and the schema files for reference.

The following are the tools and their versions installed on the system.
Eclipse - 3.3.1.1
JRE - jre1.5.0_14
Tomcat - 6.0.14
Axis2-1.3


===
Bhavesh

parlayx_sms_send_service_3_1.wsdl
parlayx_sms_receive_service_3_1.wsdl
parlayx_sms_notification_service_3_1.wsdl
parlayx_sms_notification_manager_service_3_2.wsdl
parlayx_sms_notification_manager_interface_3_2.wsdl
parlayx_sms_send_interface_3_1.wsdl
parlayx_sms_receive_interface_3_1.wsdl
parlayx_sms_notification_interface_3_1.wsdl
parlayx_common_faults_3_0.wsdl
parlayx_common_types_3_1.xsd
parlayx_sms_types_3_0.xsd
Reply | Threaded
Open this post in threaded view
|

Re: [WSDL2Java / Java2WSDL] java.IO.IOException "Type ... is referenced but not defined"

BhaveshG
Hi,

Is there an issue with Axis2 and hence I am getting these errors?

Regards,
Bhavesh


BhaveshG wrote
Hi,

I have seen many post with the similar issues posted here but could not find the answer to resolve my issue.

I am a newbie and creating a java webservice stub using Parlay webservice wsdl's and having issues creating them.

I have performaed the following steps to create the webservice
1. Used the following command to create source code
WSDL2Java -or -o .\source -ss -g -uri .\parlayx_sms_send_service_3_1.wsdl

2. Created a dynamic web project and then imported the source code to it.
3. Added Axis libraries as external JARS.
4. The project was successfully built without any errors.

While trying to create Webservice with service implementation as "org.csapi.www.wsdl.parlayx.sms.send.v3_1.service.SendSmsServiceStub" in eclipse, I received a warning stating that the service class "org.csapi.www.wsdl.parlayx.sms.send.v3_1.service.SendSmsServiceStub" does not comply to requirements of the JAX-RPC 1.1 specification.

Proceeding ahead I see the error "IWAB0399E Error in generating Java from WSDL:  java.io.IOException: Type {http://v3_0.sms.parlayx.schema.www.csapi.org}SmsFormat is referenced but not defined."

I checked up with the wsdl and schema's namespace and all that seems to be fine.

Any help in resolving this will be appreciated.

I have attached all the wsdl's and the schema files for reference.

The following are the tools and their versions installed on the system.
Eclipse - 3.3.1.1
JRE - jre1.5.0_14
Tomcat - 6.0.14
Axis2-1.3


===
Bhavesh

parlayx_sms_send_service_3_1.wsdl
parlayx_sms_receive_service_3_1.wsdl
parlayx_sms_notification_service_3_1.wsdl
parlayx_sms_notification_manager_service_3_2.wsdl
parlayx_sms_notification_manager_interface_3_2.wsdl
parlayx_sms_send_interface_3_1.wsdl
parlayx_sms_receive_interface_3_1.wsdl
parlayx_sms_notification_interface_3_1.wsdl
parlayx_common_faults_3_0.wsdl
parlayx_common_types_3_1.xsd
parlayx_sms_types_3_0.xsd
Reply | Threaded
Open this post in threaded view
|

Re: [WSDL2Java / Java2WSDL] java.IO.IOException "Type ... is referenced but not defined"

etonnelier
This post has NOT been accepted by the mailing list yet.
Hello BhaveshG,

I don't have the solution to your problem, but I have a workaround:
If you may remove the <types> part of your wsdl file(s), this error may disappear.
At least that is what happened to me when creating Web Service Client in Eclipse !

I have tried out the WSDL file in the blog http://stackoverflow.com/questions/9976560/wsdl-service-for-plain-xml-instead-of-soap (DRH's answer), it didn't work until I removed the <types> part of the wsdl (and of course I replace "tns:content" with a valid type, eg "xsd:string").

I hope it helps !!