This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Services and the fly likes Cannot find a function in the generated Web Service stub Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Cannot find a function in the generated Web Service stub" Watch "Cannot find a function in the generated Web Service stub" New topic
Author

Cannot find a function in the generated Web Service stub

Manoj Paul
Ranch Hand

Joined: Jan 18, 2007
Posts: 112
Hello all,

I am developing an application which calls a web service from "http://jupiter.webspiders.com/event2mobile/services/entityservice.asmx?WSDL".

The genereted stub(EntityService_Stub.java) is:




The main problem in this generated stub is that the method GetAllEntity()
gives an error. It says "Cannot find symbol method ArrayOfEntity_fromObject((Object[])((Object[]) resultObj)[0])". And there is no method named ArrayOfEntity_fromObject() in the generated stub.

Can someone please throw some lights over this. Please Help!!

warm regards,
Manoj Raj Paul
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
I just tried to generate a JAX-WS web service client using the WSDL for which you provided a link and it works like a charm.
I used NetBeans 6.7 beta running under Java 6.
Note that I generated a JAX-WS web service client, while you have generated a JAX-RPC client. Perhaps this is the cause of the problems you are having.
Best wishes!
Manoj Paul
Ranch Hand

Joined: Jan 18, 2007
Posts: 112
Hi,
Thanks for the reply.
Actually I am using Java ME midlet. My application will be installed in a mobile device. When I am running it in a web browser(not using the Java ME (Midlet) technology), its absolutely working fine. Can you explain?

Warm regards,
Manoj Raj Paul
Manoj Paul
Ranch Hand

Joined: Jan 18, 2007
Posts: 112
hi Ivan Krizsan,
I used the same environment that you used like NetBeans 6.7. The error that i mentioned above has gone. There's no more compile time error anymore. But whiling running the program it gives an exception saying "java.lang.ClassCastException
" in the line .

Can you tell me why its happening?

Thanks & regards,

Manoj Paul
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
First, I have no experience with Java ME, so I cannot help you there.
Second, why do you cast the result of getSingleEntity to Entity? This is not necessary and lead me to believe that you have imported the wrong Entity.
The code should read:

I just tried it here and it works without problems.
Best regards!
Manoj Paul
Ranch Hand

Joined: Jan 18, 2007
Posts: 112
Hi
Thank you Ivan for the help.

Regards!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Cannot find a function in the generated Web Service stub
 
Similar Threads
Don't know why I am getting this expections
Mapping to an xml typed column (PostgreSQL) on an EJB3 entity in JBoss 5.1
MTOM not working in Axis2
ClassCastException in J2ME web service client.
CallBack Handler Pattern