Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>JDK 6 comes with jax-ws, everything you need to develop a client for a web service.</p> <p>I'm unable to find some simple enough examples to post , but start at <a href="https://jax-ws.dev.java.net/" rel="noreferrer">https://jax-ws.dev.java.net/</a> </p> <p>Edit: here's a simple example - a client for this web service: <a href="http://xmethods.com/ve2/ViewListing.po?key=427565" rel="noreferrer">http://xmethods.com/ve2/ViewListing.po?key=427565</a></p> <pre><code>C:\temp&gt; md generated C:\temp&gt;"c:\Program Files\Java\jdk1.6.0_17"\bin\wsimport -keep -d generated http://www50.brinkster.com/vbfacileinpt/np.asmx?wsdl </code></pre> <p>Create PrimeClient.java which look like:</p> <pre><code>import javax.xml.ws.WebServiceRef; import com.microsoft.webservices.*; //the above namespace is from the generated code from the wsdl. public class PrimeClient { //Cant get this to work.. @WebServiceRef(wsdlLocation="http://www50.brinkster.com/vbfacileinpt/np.asmx?wsdl") static PrimeNumbers service; public static void main(String[] args) { try { service = new PrimeNumbers(); PrimeClient client = new PrimeClient(); client.doTest(args); } catch(Exception e) { e.printStackTrace(); } } public void doTest(String[] args) { try { System.out.println("Retrieving the port from the following service: " + service); PrimeNumbersSoap pm = service.getPrimeNumbersSoap(); System.out.println("Invoking the getPrimeNumbersSoap operation "); System.out.println(pm.getPrimeNumbers(100)); } catch(Exception e) { e.printStackTrace(); } } } </code></pre> <p>Compile and run:</p> <pre><code>C:\temp&gt;"c:\Program Files\Java\jdk1.6.0_17"\bin\javac -cp generated PrimeClient.java C:\temp&gt;"c:\Program Files\Java\jdk1.6.0_17"\bin\java -cp .;generated PrimeClient Retrieving the port from the following service: com.microsoft.webservices.PrimeN umbers@19b5393 Invoking the getPrimeNumbersSoap operation 1,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97 </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload