Questo sito utilizza cookies solo per scopi di autenticazione sul sito e nient'altro. Nessuna informazione personale viene tracciata. Leggi l'informativa sui cookies.
Username: Password: oppure
Java - Web Service ottenere ip del client
Forum - Java - Web Service ottenere ip del client

Avatar
micprog (Normal User)
Newbie


Messaggi: 1
Iscritto: 10/10/2009

Segnala al moderatore
Postato alle 10:23
Sabato, 10/10/2009
Ciao,
sto provando a realizzare un semplice WebService con Eclipse.
Avrei bisogno di prendere l'ip di un client del web service che fa la richiesta al server.

Come si fa?

Vi posto il mio file pom.xml (uso Maven) che contiene ciò che sto utilizzando.
Codice sorgente - presumibilmente Plain Text

  1. <dependencies>
  2.                 <dependency>
  3.                         <groupId>javax.xml.ws</groupId>
  4.                         <artifactId>jaxws-api</artifactId>
  5.                         <version>2.1</version>
  6.                 </dependency>
  7.                 <dependency>
  8.                         <groupId>org.apache.cxf</groupId>
  9.                         <artifactId>cxf-rt-ws-security</artifactId>
  10.                         <version>${cxf.version}</version>
  11.                 </dependency>
  12.                 <dependency>
  13.                         <groupId>org.apache.cxf</groupId>
  14.                         <artifactId>cxf-rt-core</artifactId>
  15.                         <version>${cxf.version}</version>
  16.                 </dependency>
  17.                 <dependency>
  18.                         <groupId>org.apache.cxf</groupId>
  19.                         <artifactId>cxf-rt-frontend-jaxws</artifactId>
  20.                         <version>${cxf.version}</version>
  21.                 </dependency>
  22.                 <dependency>
  23.                         <groupId>org.apache.cxf</groupId>
  24.                         <artifactId>cxf-rt-transports-http</artifactId>
  25.                         <version>${cxf.version}</version>
  26.                 </dependency>
  27.                 <dependency>
  28.                         <groupId>org.springframework</groupId>
  29.                         <artifactId>spring-core</artifactId>
  30.                         <version>2.0.8</version>
  31.                 </dependency>
  32.                 <dependency>
  33.                         <groupId>mysql</groupId>
  34.                         <artifactId>mysql-connector-java</artifactId>
  35.                         <version>5.0.5</version>
  36.                 </dependency>
  37.         </dependencies>
  38.                 <repositories>
  39.                 <repository>
  40.                         <name>Java Net</name>
  41.                         <id>dev-java-net</id>
  42.                         <layout>legacy</layout>
  43.                         <releases>
  44.                                 <enabled>true</enabled>
  45.                         </releases>
  46.                         <url>http://download.java.net/maven/1/</url>
  47.                 </repository>
  48.         </repositories>
  49.         <build>
  50.                 <plugins>
  51.                         <plugin>
  52.                                 <groupId>org.mortbay.jetty</groupId>
  53.                                 <artifactId>jetty-maven-plugin</artifactId>
  54.                                 <configuration>
  55.                                         <connectors>
  56.                                                 <connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
  57.                                                         <port>9090</port>
  58.                                                         <maxIdleTime>60000</maxIdleTime>
  59.                                                 </connector>
  60.                                         </connectors>
  61.                                         <scanIntervalSeconds>10</scanIntervalSeconds>
  62.                                 </configuration>
  63.                         </plugin>
  64.                         <plugin>
  65.                                 <artifactId>maven-compiler-plugin</artifactId>
  66.                                 <configuration>
  67.                                         <source>1.6</source>
  68.                                         <target>1.6</target>
  69.                                 </configuration>
  70.                         </plugin>



Grazie.

Ultima modifica effettuata da micprog il 10/10/2009 alle 10:24
PM Quote