Changing parameters in a JAX-WS web service
I'm creating some web services using JAX-WS and the java SE build-in server. Every time I add a new parameter on a web service i need to change the URL it's published to. Otherwise the new parameters always get a null value. How can I make this work without changing the URL?
Here's the main class code with the publishing code:
import javax.xml.ws.Endpoint;
import pickate.AmazonMail;
import pickate.FacebookStream;
class Main {
public static void main(String[] ar开发者_JS百科gs) {
Endpoint.publish("http://localhost:8888/pickate/amazonmail", new AmazonMail());
Endpoint.publish("http://localhost:8888/pickate/facebookstream", new FacebookStream());
}
}
And the implementation of one of the webservices
package pickate;
import java.util.List;
import javax.jws.Oneway;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
// Other imports go here
@WebService
public class FacebookStream
{
public FacebookStream()
{
}
@WebMethod
@Oneway
public void sendNotification(
@WebParam(name = "receivers") List<String> receivers,
@WebParam(name = "fbtoken") String fbtoken,
@WebParam(name = "body") String body,
)
{
// Some interesting stuff goes here
}
}
It was indeed the client caching up the WSDL file. It seems the PHP Soap Extension (which is what i'm using on the client-side) does it by default.
精彩评论