Example usage for javax.xml.ws WebServiceException WebServiceException

List of usage examples for javax.xml.ws WebServiceException WebServiceException

Introduction

In this page you can find the example usage for javax.xml.ws WebServiceException WebServiceException.

Prototype

public WebServiceException(Throwable cause) 

Source Link

Document

Constructs a new WebServiceException with the specified cause and a detail message of (cause==null ?

Usage

From source file:to.networld.fbtosemweb.ws.FacebookToSemanticWeb.java

@WebMethod
public String convertFacebookProfileToFOAF(@WebParam(name = "access_token") String _accessToken)
        throws IOException, JSONException {
    if (_accessToken == null)
        throw new WebServiceException("Please specify the 'access_token' parameter");
    FacebookAgentHandler currentAgentHandler = new FacebookAgentHandler("access_token=" + _accessToken);
    FacebookToFOAF foafFile = new FacebookToFOAF(currentAgentHandler);
    return foafFile.toString();
}

From source file:to.networld.fbtosemweb.ws.FacebookToSemanticWeb.java

@WebMethod
public String convertFacebookWallToSIOC(@WebParam(name = "access_token") String _accessToken)
        throws IOException, JSONException {
    if (_accessToken == null)
        throw new WebServiceException("Please specify the 'access_token' parameter");
    FacebookAgentHandler currentAgentHandler = new FacebookAgentHandler("access_token=" + _accessToken);
    FacebookToSIOC siocFile = new FacebookToSIOC(currentAgentHandler.getFacebookWallFeed());
    return siocFile.toString();
}

From source file:uk.ac.ebi.metabolomes.webservices.EUtilsWebServiceConnection.java

/**
 * Makes sure that we don't submit more entries than the imposed by the NCBI. It throws an exception if more than
 * 5000 entities are being submitted at once.
 * //w  w w.ja  v  a 2 s .  c  o  m
 * @param dbFromIds
 * @throws javax.xml.ws.WebServiceException
 */
private void checkNumberOfSubmittedEntries(Collection<String> dbFromIds) throws WebServiceException {
    if (dbFromIds.size() > MAX_RECORDS_PER_QUERY)
        throw new WebServiceException("More than 5000 entries submitted, this is not permitted.... submitted "
                + dbFromIds.size() + " entries.");
}