Java Code Examples for com.sun.xml.internal.ws.api.server.SDDocumentSource#getSystemId()

The following examples show how to use com.sun.xml.internal.ws.api.server.SDDocumentSource#getSystemId() . 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: EndpointFactory.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Verifies whether the given primaryWsdl contains the given serviceName.
 * If the WSDL doesn't have the service, it throws an WebServiceException.
 */
private static void verifyPrimaryWSDL(@NotNull SDDocumentSource primaryWsdl, @NotNull QName serviceName) {
    SDDocumentImpl primaryDoc = SDDocumentImpl.create(primaryWsdl,serviceName,null);
    if (!(primaryDoc instanceof SDDocument.WSDL)) {
        throw new WebServiceException(primaryWsdl.getSystemId()+
                " is not a WSDL. But it is passed as a primary WSDL");
    }
    SDDocument.WSDL wsdlDoc = (SDDocument.WSDL)primaryDoc;
    if (!wsdlDoc.hasService()) {
        if(wsdlDoc.getAllServices().isEmpty())
            throw new WebServiceException("Not a primary WSDL="+primaryWsdl.getSystemId()+
                    " since it doesn't have Service "+serviceName);
        else
            throw new WebServiceException("WSDL "+primaryDoc.getSystemId()
                    +" has the following services "+wsdlDoc.getAllServices()
                    +" but not "+serviceName+". Maybe you forgot to specify a serviceName and/or targetNamespace in @WebService/@WebServiceProvider?");
    }
}
 
Example 2
Source File: EndpointFactory.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Verifies whether the given primaryWsdl contains the given serviceName.
 * If the WSDL doesn't have the service, it throws an WebServiceException.
 */
private static void verifyPrimaryWSDL(@NotNull SDDocumentSource primaryWsdl, @NotNull QName serviceName) {
    SDDocumentImpl primaryDoc = SDDocumentImpl.create(primaryWsdl,serviceName,null);
    if (!(primaryDoc instanceof SDDocument.WSDL)) {
        throw new WebServiceException(primaryWsdl.getSystemId()+
                " is not a WSDL. But it is passed as a primary WSDL");
    }
    SDDocument.WSDL wsdlDoc = (SDDocument.WSDL)primaryDoc;
    if (!wsdlDoc.hasService()) {
        if(wsdlDoc.getAllServices().isEmpty())
            throw new WebServiceException("Not a primary WSDL="+primaryWsdl.getSystemId()+
                    " since it doesn't have Service "+serviceName);
        else
            throw new WebServiceException("WSDL "+primaryDoc.getSystemId()
                    +" has the following services "+wsdlDoc.getAllServices()
                    +" but not "+serviceName+". Maybe you forgot to specify a serviceName and/or targetNamespace in @WebService/@WebServiceProvider?");
    }
}
 
Example 3
Source File: EndpointFactory.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Verifies whether the given primaryWsdl contains the given serviceName.
 * If the WSDL doesn't have the service, it throws an WebServiceException.
 */
private static void verifyPrimaryWSDL(@NotNull SDDocumentSource primaryWsdl, @NotNull QName serviceName) {
    SDDocumentImpl primaryDoc = SDDocumentImpl.create(primaryWsdl,serviceName,null);
    if (!(primaryDoc instanceof SDDocument.WSDL)) {
        throw new WebServiceException(primaryWsdl.getSystemId()+
                " is not a WSDL. But it is passed as a primary WSDL");
    }
    SDDocument.WSDL wsdlDoc = (SDDocument.WSDL)primaryDoc;
    if (!wsdlDoc.hasService()) {
        if(wsdlDoc.getAllServices().isEmpty())
            throw new WebServiceException("Not a primary WSDL="+primaryWsdl.getSystemId()+
                    " since it doesn't have Service "+serviceName);
        else
            throw new WebServiceException("WSDL "+primaryDoc.getSystemId()
                    +" has the following services "+wsdlDoc.getAllServices()
                    +" but not "+serviceName+". Maybe you forgot to specify a serviceName and/or targetNamespace in @WebService/@WebServiceProvider?");
    }
}
 
Example 4
Source File: EndpointFactory.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Verifies whether the given primaryWsdl contains the given serviceName.
 * If the WSDL doesn't have the service, it throws an WebServiceException.
 */
private static void verifyPrimaryWSDL(@NotNull SDDocumentSource primaryWsdl, @NotNull QName serviceName) {
    SDDocumentImpl primaryDoc = SDDocumentImpl.create(primaryWsdl,serviceName,null);
    if (!(primaryDoc instanceof SDDocument.WSDL)) {
        throw new WebServiceException(primaryWsdl.getSystemId()+
                " is not a WSDL. But it is passed as a primary WSDL");
    }
    SDDocument.WSDL wsdlDoc = (SDDocument.WSDL)primaryDoc;
    if (!wsdlDoc.hasService()) {
        if(wsdlDoc.getAllServices().isEmpty())
            throw new WebServiceException("Not a primary WSDL="+primaryWsdl.getSystemId()+
                    " since it doesn't have Service "+serviceName);
        else
            throw new WebServiceException("WSDL "+primaryDoc.getSystemId()
                    +" has the following services "+wsdlDoc.getAllServices()
                    +" but not "+serviceName+". Maybe you forgot to specify a serviceName and/or targetNamespace in @WebService/@WebServiceProvider?");
    }
}
 
Example 5
Source File: EndpointFactory.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Verifies whether the given primaryWsdl contains the given serviceName.
 * If the WSDL doesn't have the service, it throws an WebServiceException.
 */
private static void verifyPrimaryWSDL(@NotNull SDDocumentSource primaryWsdl, @NotNull QName serviceName) {
    SDDocumentImpl primaryDoc = SDDocumentImpl.create(primaryWsdl,serviceName,null);
    if (!(primaryDoc instanceof SDDocument.WSDL)) {
        throw new WebServiceException(primaryWsdl.getSystemId()+
                " is not a WSDL. But it is passed as a primary WSDL");
    }
    SDDocument.WSDL wsdlDoc = (SDDocument.WSDL)primaryDoc;
    if (!wsdlDoc.hasService()) {
        if(wsdlDoc.getAllServices().isEmpty())
            throw new WebServiceException("Not a primary WSDL="+primaryWsdl.getSystemId()+
                    " since it doesn't have Service "+serviceName);
        else
            throw new WebServiceException("WSDL "+primaryDoc.getSystemId()
                    +" has the following services "+wsdlDoc.getAllServices()
                    +" but not "+serviceName+". Maybe you forgot to specify a serviceName and/or targetNamespace in @WebService/@WebServiceProvider?");
    }
}
 
Example 6
Source File: EndpointFactory.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Verifies whether the given primaryWsdl contains the given serviceName.
 * If the WSDL doesn't have the service, it throws an WebServiceException.
 */
private static void verifyPrimaryWSDL(@NotNull SDDocumentSource primaryWsdl, @NotNull QName serviceName) {
    SDDocumentImpl primaryDoc = SDDocumentImpl.create(primaryWsdl,serviceName,null);
    if (!(primaryDoc instanceof SDDocument.WSDL)) {
        throw new WebServiceException(primaryWsdl.getSystemId()+
                " is not a WSDL. But it is passed as a primary WSDL");
    }
    SDDocument.WSDL wsdlDoc = (SDDocument.WSDL)primaryDoc;
    if (!wsdlDoc.hasService()) {
        if(wsdlDoc.getAllServices().isEmpty())
            throw new WebServiceException("Not a primary WSDL="+primaryWsdl.getSystemId()+
                    " since it doesn't have Service "+serviceName);
        else
            throw new WebServiceException("WSDL "+primaryDoc.getSystemId()
                    +" has the following services "+wsdlDoc.getAllServices()
                    +" but not "+serviceName+". Maybe you forgot to specify a serviceName and/or targetNamespace in @WebService/@WebServiceProvider?");
    }
}
 
Example 7
Source File: EndpointFactory.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Verifies whether the given primaryWsdl contains the given serviceName.
 * If the WSDL doesn't have the service, it throws an WebServiceException.
 */
private static void verifyPrimaryWSDL(@NotNull SDDocumentSource primaryWsdl, @NotNull QName serviceName) {
    SDDocumentImpl primaryDoc = SDDocumentImpl.create(primaryWsdl,serviceName,null);
    if (!(primaryDoc instanceof SDDocument.WSDL)) {
        throw new WebServiceException(primaryWsdl.getSystemId()+
                " is not a WSDL. But it is passed as a primary WSDL");
    }
    SDDocument.WSDL wsdlDoc = (SDDocument.WSDL)primaryDoc;
    if (!wsdlDoc.hasService()) {
        if(wsdlDoc.getAllServices().isEmpty())
            throw new WebServiceException("Not a primary WSDL="+primaryWsdl.getSystemId()+
                    " since it doesn't have Service "+serviceName);
        else
            throw new WebServiceException("WSDL "+primaryDoc.getSystemId()
                    +" has the following services "+wsdlDoc.getAllServices()
                    +" but not "+serviceName+". Maybe you forgot to specify a serviceName and/or targetNamespace in @WebService/@WebServiceProvider?");
    }
}
 
Example 8
Source File: EndpointFactory.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Verifies whether the given primaryWsdl contains the given serviceName.
 * If the WSDL doesn't have the service, it throws an WebServiceException.
 */
private static void verifyPrimaryWSDL(@NotNull SDDocumentSource primaryWsdl, @NotNull QName serviceName) {
    SDDocumentImpl primaryDoc = SDDocumentImpl.create(primaryWsdl,serviceName,null);
    if (!(primaryDoc instanceof SDDocument.WSDL)) {
        throw new WebServiceException(primaryWsdl.getSystemId()+
                " is not a WSDL. But it is passed as a primary WSDL");
    }
    SDDocument.WSDL wsdlDoc = (SDDocument.WSDL)primaryDoc;
    if (!wsdlDoc.hasService()) {
        if(wsdlDoc.getAllServices().isEmpty())
            throw new WebServiceException("Not a primary WSDL="+primaryWsdl.getSystemId()+
                    " since it doesn't have Service "+serviceName);
        else
            throw new WebServiceException("WSDL "+primaryDoc.getSystemId()
                    +" has the following services "+wsdlDoc.getAllServices()
                    +" but not "+serviceName+". Maybe you forgot to specify a serviceName and/or targetNamespace in @WebService/@WebServiceProvider?");
    }
}
 
Example 9
Source File: XMLEntityResolver.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Creates a {@link Parser} that reads from {@link SDDocumentSource}.
 */
public Parser(SDDocumentSource doc) throws IOException, XMLStreamException {
    this.systemId = doc.getSystemId();
    this.parser = doc.read();
}
 
Example 10
Source File: XMLEntityResolver.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Creates a {@link Parser} that reads from {@link SDDocumentSource}.
 */
public Parser(SDDocumentSource doc) throws IOException, XMLStreamException {
    this.systemId = doc.getSystemId();
    this.parser = doc.read();
}
 
Example 11
Source File: XMLEntityResolver.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Creates a {@link Parser} that reads from {@link SDDocumentSource}.
 */
public Parser(SDDocumentSource doc) throws IOException, XMLStreamException {
    this.systemId = doc.getSystemId();
    this.parser = doc.read();
}
 
Example 12
Source File: XMLEntityResolver.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Creates a {@link Parser} that reads from {@link SDDocumentSource}.
 */
public Parser(SDDocumentSource doc) throws IOException, XMLStreamException {
    this.systemId = doc.getSystemId();
    this.parser = doc.read();
}
 
Example 13
Source File: XMLEntityResolver.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Creates a {@link Parser} that reads from {@link SDDocumentSource}.
 */
public Parser(SDDocumentSource doc) throws IOException, XMLStreamException {
    this.systemId = doc.getSystemId();
    this.parser = doc.read();
}
 
Example 14
Source File: XMLEntityResolver.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Creates a {@link Parser} that reads from {@link SDDocumentSource}.
 */
public Parser(SDDocumentSource doc) throws IOException, XMLStreamException {
    this.systemId = doc.getSystemId();
    this.parser = doc.read();
}
 
Example 15
Source File: XMLEntityResolver.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Creates a {@link Parser} that reads from {@link SDDocumentSource}.
 */
public Parser(SDDocumentSource doc) throws IOException, XMLStreamException {
    this.systemId = doc.getSystemId();
    this.parser = doc.read();
}
 
Example 16
Source File: XMLEntityResolver.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Creates a {@link Parser} that reads from {@link SDDocumentSource}.
 */
public Parser(SDDocumentSource doc) throws IOException, XMLStreamException {
    this.systemId = doc.getSystemId();
    this.parser = doc.read();
}