Note that there are some explanatory texts on larger screens.

plurals
  1. POJava Web Service - Accepting XML Input
    primarykey
    data
    text
    <p>I'm having an issue with a Java Web Service in that I can't accept XML Input from a form (developed by another group).</p> <p>Not having worked with services like this before I am unsure whether I have setup it up correctly, currently all I want it to do is connect, so methods are empty.</p> <pre><code>package com.what.service; import java.io.File; import javax.jws.WebMethod; import javax.jws.WebParam; import javax.jws.WebService; import javax.swing.text.*; @WebService public class HouseGetForm { @WebMethod public String getRooms(String rooms) { return "Number of Rooms: " + rooms; } @WebMethod public String getHouseType(String house) { return "House Type " + house; } @WebMethod public String getKitchenAppliances(String appliance) { return "Appliances " + appliance; } </code></pre> <p>I also have my "Server" class, which was nabbed almost directly from a tutorial.</p> <pre><code>package com.what.service; import javax.xml.ws.Endpoint; public class Server { public static void main(String[] args) { Endpoint.publish("http://localhost:9898/HouseGetForm", new HouseGetForm()); System.out.println("House Get form Initailised."); System.out.println("Server Started..."); } } </code></pre> <p>You see, I'm not really sure how the whole process works so I'm stumbling around in the dark a bit. When the form is submitted, How is the XML delivered? As a whole document which I then have to find the individual field values on the Web Service? If so how is this done?</p> <p>I literally need to know in laymans terms how I can take XML input (Which is the form data) in a Java Web Service and then manipulate it in Java Web Service Methods.</p>
    singulars
    1. This table or related slice is empty.
    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.
 

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