Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Problem using JAX-WS in Netbeans

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I have created a Client-Server using Web Services.

A method in the server (in the same package that Web Service Server) return an ArrayList<AP> where AP is the next class:

package Servidor;

import java.io.Serializable;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;

@WebService()
public class AP implements Serializable{

private static final long serialVersionUID = 1L;
float lat, longitud ;

String idDispositivo = "" ;


public AP(){}
... ... ...
}

, this class implements gets & sets methods for all attributes.


The Web Service called ServerImpl.java implements the method who use the "AP" class:

@WebMethod
public ArrayList<AP> obtenAPs(@WebParam(name = "user") String user){
...
}


When I call the method in the Client appears a compilation error:

Server.ServerImplService service = new servidor.ServerImplService();
Server.ServerImpl port = servicio.getServerImplPort();
List<AP> accessPoints = vc.port.obtenAPs(user); <-- , appears here the compilation error

"found: java.util.List<Server.Ap>
required: java.util.List<Client.AP>"

In the Client package stays the same class (with the same methods and attributes) but it isn't a Web Service.

Thanks a lot.



................................................

4th January:


Hi,

I organized the packages in Client & Server and I created a same package (and class) in the two project called AccessPoint with his class AP.java:

Project Client --> AccessPoint\AP.java
--> Client\*.java --> All class typical of the client

Project Server --> AccessPoint\AP.java
--> Server\*.java --> All class typical of the server

I have to say your that in Netbeans I saw that in the directory web\classes of the Client appeared a package of Server and in this package included the AP classes!!! (Project Client --> \web\classes\Server\ ??? <--- Here it generated call to AP and it named Server.AP?!?!?!? Why!?!? I thought that it would use the "universal package" AccessPoint!

So that I think the compilation error was for this. But ... what is the solution for these? how do I return of the Server to the Client an ArrayList<AP> without compilation error? without execution error ?

Thanks.
 
Legend has it that if you rub the right tiny ad, a genie comes out.
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic