com.sun.xml.internal.ws.resources.DispatchMessages Java Examples

The following examples show how to use com.sun.xml.internal.ws.resources.DispatchMessages. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DispatchImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private static String checkQuery(@Nullable String query) {
    if (query == null) return null;

    if (query.indexOf('?') == 0)
       throw new WebServiceException(DispatchMessages.INVALID_QUERY_LEADING_CHAR(query));
    return query;
}
 
Example #2
Source File: DispatchImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private static String checkQuery(@Nullable String query) {
    if (query == null) return null;

    if (query.indexOf('?') == 0)
       throw new WebServiceException(DispatchMessages.INVALID_QUERY_LEADING_CHAR(query));
    return query;
}
 
Example #3
Source File: WSServiceDelegate.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public void addPort(QName portName, String bindingId, String endpointAddress) throws WebServiceException {
    if (!ports.containsKey(portName)) {
        BindingID bid = (bindingId == null) ? BindingID.SOAP11_HTTP : BindingID.parse(bindingId);
        ports.put(portName,
                new PortInfo(this, (endpointAddress == null) ? null :
                        EndpointAddress.create(endpointAddress), portName, bid));
    } else
        throw new WebServiceException(DispatchMessages.DUPLICATE_PORT(portName.toString()));
}
 
Example #4
Source File: SOAPMessageDispatch.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
SOAPMessage toReturnValue(Packet response) {
    try {

        //not sure if this is the correct way to deal with this.
        if ( response ==null || response.getMessage() == null )
                 throw new WebServiceException(DispatchMessages.INVALID_RESPONSE());
        else
            return response.getMessage().readAsSOAPMessage();
    } catch (SOAPException e) {
        throw new WebServiceException(e);
    }
}
 
Example #5
Source File: DispatchImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
static void checkNullAllowed(@Nullable Object in, RequestContext rc, WSBinding binding, Service.Mode mode) {

        if (in != null)
            return;

        //With HTTP Binding a null invocation parameter can not be used
        //with HTTP Request Method == POST
        if (isXMLHttp(binding)){
            if (methodNotOk(rc))
                throw new WebServiceException(DispatchMessages.INVALID_NULLARG_XMLHTTP_REQUEST_METHOD(HTTP_REQUEST_METHOD_POST, HTTP_REQUEST_METHOD_GET));
        } else { //soapBinding
              if (mode == Service.Mode.MESSAGE )
                   throw new WebServiceException(DispatchMessages.INVALID_NULLARG_SOAP_MSGMODE(mode.name(), Service.Mode.PAYLOAD.toString()));
        }
    }
 
Example #6
Source File: DispatchImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public static void checkValidSOAPMessageDispatch(WSBinding binding, Service.Mode mode) {
    // Dispatch<SOAPMessage> is only valid for soap binding and in Service.Mode.MESSAGE
    if (DispatchImpl.isXMLHttp(binding))
        throw new WebServiceException(DispatchMessages.INVALID_SOAPMESSAGE_DISPATCH_BINDING(HTTPBinding.HTTP_BINDING, SOAPBinding.SOAP11HTTP_BINDING + " or " + SOAPBinding.SOAP12HTTP_BINDING));
    if (DispatchImpl.isPAYLOADMode(mode))
        throw new WebServiceException(DispatchMessages.INVALID_SOAPMESSAGE_DISPATCH_MSGMODE(mode.name(), Service.Mode.MESSAGE.toString()));
}
 
Example #7
Source File: DispatchImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public static void checkValidDataSourceDispatch(WSBinding binding, Service.Mode mode) {
    // Dispatch<DataSource> is only valid with xml/http binding and in Service.Mode.MESSAGE
    if (!DispatchImpl.isXMLHttp(binding))
        throw new WebServiceException(DispatchMessages.INVALID_DATASOURCE_DISPATCH_BINDING("SOAP/HTTP", HTTPBinding.HTTP_BINDING));
    if (DispatchImpl.isPAYLOADMode(mode))
        throw new WebServiceException(DispatchMessages.INVALID_DATASOURCE_DISPATCH_MSGMODE(mode.name(), Service.Mode.MESSAGE.toString()));
}
 
Example #8
Source File: DispatchImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private static String checkQuery(@Nullable String query) {
    if (query == null) return null;

    if (query.indexOf('?') == 0)
       throw new WebServiceException(DispatchMessages.INVALID_QUERY_LEADING_CHAR(query));
    return query;
}
 
Example #9
Source File: WSServiceDelegate.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public void addPort(QName portName, String bindingId, String endpointAddress) throws WebServiceException {
    if (!ports.containsKey(portName)) {
        BindingID bid = (bindingId == null) ? BindingID.SOAP11_HTTP : BindingID.parse(bindingId);
        ports.put(portName,
                new PortInfo(this, (endpointAddress == null) ? null :
                        EndpointAddress.create(endpointAddress), portName, bid));
    } else
        throw new WebServiceException(DispatchMessages.DUPLICATE_PORT(portName.toString()));
}
 
Example #10
Source File: SOAPMessageDispatch.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
SOAPMessage toReturnValue(Packet response) {
    try {

        //not sure if this is the correct way to deal with this.
        if ( response ==null || response.getMessage() == null )
                 throw new WebServiceException(DispatchMessages.INVALID_RESPONSE());
        else
            return response.getMessage().readAsSOAPMessage();
    } catch (SOAPException e) {
        throw new WebServiceException(e);
    }
}
 
Example #11
Source File: DispatchImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
static void checkNullAllowed(@Nullable Object in, RequestContext rc, WSBinding binding, Service.Mode mode) {

        if (in != null)
            return;

        //With HTTP Binding a null invocation parameter can not be used
        //with HTTP Request Method == POST
        if (isXMLHttp(binding)){
            if (methodNotOk(rc))
                throw new WebServiceException(DispatchMessages.INVALID_NULLARG_XMLHTTP_REQUEST_METHOD(HTTP_REQUEST_METHOD_POST, HTTP_REQUEST_METHOD_GET));
        } else { //soapBinding
              if (mode == Service.Mode.MESSAGE )
                   throw new WebServiceException(DispatchMessages.INVALID_NULLARG_SOAP_MSGMODE(mode.name(), Service.Mode.PAYLOAD.toString()));
        }
    }
 
Example #12
Source File: DispatchImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public static void checkValidSOAPMessageDispatch(WSBinding binding, Service.Mode mode) {
    // Dispatch<SOAPMessage> is only valid for soap binding and in Service.Mode.MESSAGE
    if (DispatchImpl.isXMLHttp(binding))
        throw new WebServiceException(DispatchMessages.INVALID_SOAPMESSAGE_DISPATCH_BINDING(HTTPBinding.HTTP_BINDING, SOAPBinding.SOAP11HTTP_BINDING + " or " + SOAPBinding.SOAP12HTTP_BINDING));
    if (DispatchImpl.isPAYLOADMode(mode))
        throw new WebServiceException(DispatchMessages.INVALID_SOAPMESSAGE_DISPATCH_MSGMODE(mode.name(), Service.Mode.MESSAGE.toString()));
}
 
Example #13
Source File: DispatchImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public static void checkValidDataSourceDispatch(WSBinding binding, Service.Mode mode) {
    // Dispatch<DataSource> is only valid with xml/http binding and in Service.Mode.MESSAGE
    if (!DispatchImpl.isXMLHttp(binding))
        throw new WebServiceException(DispatchMessages.INVALID_DATASOURCE_DISPATCH_BINDING("SOAP/HTTP", HTTPBinding.HTTP_BINDING));
    if (DispatchImpl.isPAYLOADMode(mode))
        throw new WebServiceException(DispatchMessages.INVALID_DATASOURCE_DISPATCH_MSGMODE(mode.name(), Service.Mode.MESSAGE.toString()));
}
 
Example #14
Source File: WSServiceDelegate.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public void addPort(QName portName, String bindingId, String endpointAddress) throws WebServiceException {
    if (!ports.containsKey(portName)) {
        BindingID bid = (bindingId == null) ? BindingID.SOAP11_HTTP : BindingID.parse(bindingId);
        ports.put(portName,
                new PortInfo(this, (endpointAddress == null) ? null :
                        EndpointAddress.create(endpointAddress), portName, bid));
    } else
        throw new WebServiceException(DispatchMessages.DUPLICATE_PORT(portName.toString()));
}
 
Example #15
Source File: WSServiceDelegate.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public void addPort(QName portName, String bindingId, String endpointAddress) throws WebServiceException {
    if (!ports.containsKey(portName)) {
        BindingID bid = (bindingId == null) ? BindingID.SOAP11_HTTP : BindingID.parse(bindingId);
        ports.put(portName,
                new PortInfo(this, (endpointAddress == null) ? null :
                        EndpointAddress.create(endpointAddress), portName, bid));
    } else
        throw new WebServiceException(DispatchMessages.DUPLICATE_PORT(portName.toString()));
}
 
Example #16
Source File: SOAPMessageDispatch.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
SOAPMessage toReturnValue(Packet response) {
    try {

        //not sure if this is the correct way to deal with this.
        if ( response ==null || response.getMessage() == null )
                 throw new WebServiceException(DispatchMessages.INVALID_RESPONSE());
        else
            return response.getMessage().readAsSOAPMessage();
    } catch (SOAPException e) {
        throw new WebServiceException(e);
    }
}
 
Example #17
Source File: DispatchImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
static void checkNullAllowed(@Nullable Object in, RequestContext rc, WSBinding binding, Service.Mode mode) {

        if (in != null)
            return;

        //With HTTP Binding a null invocation parameter can not be used
        //with HTTP Request Method == POST
        if (isXMLHttp(binding)){
            if (methodNotOk(rc))
                throw new WebServiceException(DispatchMessages.INVALID_NULLARG_XMLHTTP_REQUEST_METHOD(HTTP_REQUEST_METHOD_POST, HTTP_REQUEST_METHOD_GET));
        } else { //soapBinding
              if (mode == Service.Mode.MESSAGE )
                   throw new WebServiceException(DispatchMessages.INVALID_NULLARG_SOAP_MSGMODE(mode.name(), Service.Mode.PAYLOAD.toString()));
        }
    }
 
Example #18
Source File: DispatchImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public static void checkValidSOAPMessageDispatch(WSBinding binding, Service.Mode mode) {
    // Dispatch<SOAPMessage> is only valid for soap binding and in Service.Mode.MESSAGE
    if (DispatchImpl.isXMLHttp(binding))
        throw new WebServiceException(DispatchMessages.INVALID_SOAPMESSAGE_DISPATCH_BINDING(HTTPBinding.HTTP_BINDING, SOAPBinding.SOAP11HTTP_BINDING + " or " + SOAPBinding.SOAP12HTTP_BINDING));
    if (DispatchImpl.isPAYLOADMode(mode))
        throw new WebServiceException(DispatchMessages.INVALID_SOAPMESSAGE_DISPATCH_MSGMODE(mode.name(), Service.Mode.MESSAGE.toString()));
}
 
Example #19
Source File: DispatchImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public static void checkValidDataSourceDispatch(WSBinding binding, Service.Mode mode) {
    // Dispatch<DataSource> is only valid with xml/http binding and in Service.Mode.MESSAGE
    if (!DispatchImpl.isXMLHttp(binding))
        throw new WebServiceException(DispatchMessages.INVALID_DATASOURCE_DISPATCH_BINDING("SOAP/HTTP", HTTPBinding.HTTP_BINDING));
    if (DispatchImpl.isPAYLOADMode(mode))
        throw new WebServiceException(DispatchMessages.INVALID_DATASOURCE_DISPATCH_MSGMODE(mode.name(), Service.Mode.MESSAGE.toString()));
}
 
Example #20
Source File: DispatchImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
private static String checkQuery(@Nullable String query) {
    if (query == null) return null;

    if (query.indexOf('?') == 0)
       throw new WebServiceException(DispatchMessages.INVALID_QUERY_LEADING_CHAR(query));
    return query;
}
 
Example #21
Source File: WSServiceDelegate.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public void addPort(QName portName, String bindingId, String endpointAddress) throws WebServiceException {
    if (!ports.containsKey(portName)) {
        BindingID bid = (bindingId == null) ? BindingID.SOAP11_HTTP : BindingID.parse(bindingId);
        ports.put(portName,
                new PortInfo(this, (endpointAddress == null) ? null :
                        EndpointAddress.create(endpointAddress), portName, bid));
    } else
        throw new WebServiceException(DispatchMessages.DUPLICATE_PORT(portName.toString()));
}
 
Example #22
Source File: SOAPMessageDispatch.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
SOAPMessage toReturnValue(Packet response) {
    try {

        //not sure if this is the correct way to deal with this.
        if ( response ==null || response.getMessage() == null )
                 throw new WebServiceException(DispatchMessages.INVALID_RESPONSE());
        else
            return response.getMessage().readAsSOAPMessage();
    } catch (SOAPException e) {
        throw new WebServiceException(e);
    }
}
 
Example #23
Source File: DispatchImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
static void checkNullAllowed(@Nullable Object in, RequestContext rc, WSBinding binding, Service.Mode mode) {

        if (in != null)
            return;

        //With HTTP Binding a null invocation parameter can not be used
        //with HTTP Request Method == POST
        if (isXMLHttp(binding)){
            if (methodNotOk(rc))
                throw new WebServiceException(DispatchMessages.INVALID_NULLARG_XMLHTTP_REQUEST_METHOD(HTTP_REQUEST_METHOD_POST, HTTP_REQUEST_METHOD_GET));
        } else { //soapBinding
              if (mode == Service.Mode.MESSAGE )
                   throw new WebServiceException(DispatchMessages.INVALID_NULLARG_SOAP_MSGMODE(mode.name(), Service.Mode.PAYLOAD.toString()));
        }
    }
 
Example #24
Source File: DispatchImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public static void checkValidSOAPMessageDispatch(WSBinding binding, Service.Mode mode) {
    // Dispatch<SOAPMessage> is only valid for soap binding and in Service.Mode.MESSAGE
    if (DispatchImpl.isXMLHttp(binding))
        throw new WebServiceException(DispatchMessages.INVALID_SOAPMESSAGE_DISPATCH_BINDING(HTTPBinding.HTTP_BINDING, SOAPBinding.SOAP11HTTP_BINDING + " or " + SOAPBinding.SOAP12HTTP_BINDING));
    if (DispatchImpl.isPAYLOADMode(mode))
        throw new WebServiceException(DispatchMessages.INVALID_SOAPMESSAGE_DISPATCH_MSGMODE(mode.name(), Service.Mode.MESSAGE.toString()));
}
 
Example #25
Source File: DispatchImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public static void checkValidDataSourceDispatch(WSBinding binding, Service.Mode mode) {
    // Dispatch<DataSource> is only valid with xml/http binding and in Service.Mode.MESSAGE
    if (!DispatchImpl.isXMLHttp(binding))
        throw new WebServiceException(DispatchMessages.INVALID_DATASOURCE_DISPATCH_BINDING("SOAP/HTTP", HTTPBinding.HTTP_BINDING));
    if (DispatchImpl.isPAYLOADMode(mode))
        throw new WebServiceException(DispatchMessages.INVALID_DATASOURCE_DISPATCH_MSGMODE(mode.name(), Service.Mode.MESSAGE.toString()));
}
 
Example #26
Source File: DispatchImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private static String checkQuery(@Nullable String query) {
    if (query == null) return null;

    if (query.indexOf('?') == 0)
       throw new WebServiceException(DispatchMessages.INVALID_QUERY_LEADING_CHAR(query));
    return query;
}
 
Example #27
Source File: DispatchImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private static String checkQuery(@Nullable String query) {
    if (query == null) return null;

    if (query.indexOf('?') == 0)
       throw new WebServiceException(DispatchMessages.INVALID_QUERY_LEADING_CHAR(query));
    return query;
}
 
Example #28
Source File: SOAPMessageDispatch.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
SOAPMessage toReturnValue(Packet response) {
    try {

        //not sure if this is the correct way to deal with this.
        if ( response ==null || response.getMessage() == null )
                 throw new WebServiceException(DispatchMessages.INVALID_RESPONSE());
        else
            return response.getMessage().readAsSOAPMessage();
    } catch (SOAPException e) {
        throw new WebServiceException(e);
    }
}
 
Example #29
Source File: DispatchImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
static void checkNullAllowed(@Nullable Object in, RequestContext rc, WSBinding binding, Service.Mode mode) {

        if (in != null)
            return;

        //With HTTP Binding a null invocation parameter can not be used
        //with HTTP Request Method == POST
        if (isXMLHttp(binding)){
            if (methodNotOk(rc))
                throw new WebServiceException(DispatchMessages.INVALID_NULLARG_XMLHTTP_REQUEST_METHOD(HTTP_REQUEST_METHOD_POST, HTTP_REQUEST_METHOD_GET));
        } else { //soapBinding
              if (mode == Service.Mode.MESSAGE )
                   throw new WebServiceException(DispatchMessages.INVALID_NULLARG_SOAP_MSGMODE(mode.name(), Service.Mode.PAYLOAD.toString()));
        }
    }
 
Example #30
Source File: DispatchImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public static void checkValidSOAPMessageDispatch(WSBinding binding, Service.Mode mode) {
    // Dispatch<SOAPMessage> is only valid for soap binding and in Service.Mode.MESSAGE
    if (DispatchImpl.isXMLHttp(binding))
        throw new WebServiceException(DispatchMessages.INVALID_SOAPMESSAGE_DISPATCH_BINDING(HTTPBinding.HTTP_BINDING, SOAPBinding.SOAP11HTTP_BINDING + " or " + SOAPBinding.SOAP12HTTP_BINDING));
    if (DispatchImpl.isPAYLOADMode(mode))
        throw new WebServiceException(DispatchMessages.INVALID_SOAPMESSAGE_DISPATCH_MSGMODE(mode.name(), Service.Mode.MESSAGE.toString()));
}