Package org.apache.ws.resource

Examples of org.apache.ws.resource.InvalidWsrfWsdlException


                }
            }
        }
        if ( !isValid )
        {
            throw new InvalidWsrfWsdlException( "PortType " + m_portType.getQName() + " does not define one or more properties required by the portTypes it implements." );
        }
    }
View Full Code Here


        {
            if ( !m_implementedResourceDefs.containsKey( GetResourcePropertyPortType.NAME ) &&
                    !m_implementedResourceDefs.containsKey( ResourceProperties1_3Constants.PORT_TYPE_NAME_GET_RESOURCE_PROPERTY )
            )
            {
                throw new InvalidWsrfWsdlException( "PortType " + m_portType.getQName() + " defines a wsrp:ResourceProperties attribute but does not implement the WSRF-RP GetResourceProperty portType." );
            }
        }
        else
        {
            if ( m_implementedResourceDefs.containsKey( GetResourcePropertyPortType.NAME ) ||
                    m_implementedResourceDefs.containsKey( ResourceProperties1_3Constants.PORT_TYPE_NAME_GET_RESOURCE_PROPERTY ) ||
                    m_implementedResourceDefs.containsKey( GetMultipleResourcePropertiesPortType.NAME ) ||
                    m_implementedResourceDefs.containsKey( ResourceProperties1_3Constants.PORT_TYPE_NAME_GET_MULTIPLE_RESOURCE_PROPERTIES ) ||
                    m_implementedResourceDefs.containsKey( SetResourcePropertiesPortType.NAME ) ||
                    m_implementedResourceDefs.containsKey( ResourceProperties1_3Constants.PORT_TYPE_NAME_SET_RESOURCE_PROPERTIES ) ||
                    m_implementedResourceDefs.containsKey( QueryResourcePropertiesPortType.NAME ) ||
                    m_implementedResourceDefs.containsKey( ResourceProperties1_3Constants.PORT_TYPE_NAME_QUERY_RESOURCE_PROPERTIES )
            )
            {
                throw new InvalidWsrfWsdlException( "PortType " + m_portType.getQName() + " does not define a wsrp:ResourceProperties attribute but implements one or more WSRF-RP portTypes." );
            }
        }
    }
View Full Code Here

                break;
            }
        }
        if ( rpDocXsdElem == null )
        {
            throw new InvalidWsrfWsdlException(
                    "Unable to locate the ResourceProperties Document Element with QName " + rpDocElemName );
        }
        String type = rpDocXsdElem.getElement().getAttribute( "type" );
        Element rpDocTypeElem;
        if ( !"".equals( type ) )
        {
            rpDocTypeElem = getComplexTypeByName( rpDocXsdElem.getSchemaElement(), type );
        }
        else
        {
            rpDocTypeElem =
                    (Element) rpDocXsdElem.getElement().getElementsByTagNameNS( XmlConstants.NSURI_SCHEMA_XSD,
                            "complexType" )
                    .item( 0 );
        }
        if ( rpDocTypeElem == null )
        {
            throw new InvalidWsrfWsdlException( "Unable to determine type of the ResourceProperties document element with QName " + rpDocElemName + " - expected either a type atribute or a nested anonymous complexType element." );
        }
        Element sequenceElem = null;
        NodeList sequenceNodes = rpDocTypeElem.getElementsByTagNameNS( XmlConstants.NSURI_SCHEMA_XSD, "sequence" );
        if ( sequenceNodes != null )
        {
View Full Code Here

                    schemaUrl = new URL( baseUrl, location );
                    schemaDoc = JaxpUtils.loadDocument( schemaUrl.openStream() );
                }
                catch ( Exception e )
                {
                    throw new InvalidWsrfWsdlException( "Failed to load schema at location " + location );
                }
                xsdElementElem =
                        getXsdElementElementRecursively( schemaDoc.getDocumentElement(), xsdElemName, schemaUrl );
                if ( xsdElementElem != null )
                {
View Full Code Here

            throws InvalidWsrfWsdlException
    {
        String ref = propElem.getAttribute( "ref" );
        if ( "".equals( ref ) )
        {
            throw new InvalidWsrfWsdlException(
                    "All element defs within the resource property document def must have a 'ref' attribute that points at a global element def." );
        }
        StringTokenizer tokenizer = new StringTokenizer( ref, ":" );
        if ( tokenizer.countTokens() != 2 )
        {
            throw new InvalidWsrfWsdlException( "Value for xsd:element 'ref' attribute must be qualified via a namespace prefix." );
        }
        String propPrefix = tokenizer.nextToken();
        String propLocalName = tokenizer.nextToken();
        // TODO: write our own prefix resolver to eliminate dep on Xalan
        PrefixResolver prefixResolver = new PrefixResolverDefault( schemaElem );
        String propNamespace = prefixResolver.getNamespaceForPrefix( propPrefix );
        if ( propNamespace == null )
        {
           throw new InvalidWsrfWsdlException( "Unable to resolve prefix '" + propPrefix + "' in xsd:element 'ref' attribute value." );
        }
        QName propName = new QName( propNamespace, propLocalName, propPrefix );
        return propName;
    }
View Full Code Here

                }
            }
        }
        if ( !isValid )
        {
            throw new InvalidWsrfWsdlException(
                    "PortType " + m_portType.getQName() +
                    " does not define one or more properties required by the portTypes it implements." );
        }
    }
View Full Code Here

    {
        if ( hasProperties() )
        {
            if ( !m_implementedResourceDefs.containsKey( org.apache.ws.resource.properties.v1_2_draft05.porttype.GetResourcePropertyPortType.NAME ) && !m_implementedResourceDefs.containsKey( org.apache.ws.resource.properties.v1_2_draft01.porttype.GetResourcePropertyPortType.NAME ) )
            {
                throw new InvalidWsrfWsdlException(
                        "PortType " + m_portType.getQName() +
                        " defines a wsrp:ResourceProperties attribute but does not implement the WSRF-RP GetResourceProperty portType." );
            }
        }
        else
        {
            Iterator resourceDefNames = m_implementedResourceDefs.keySet().iterator();
            while ( resourceDefNames.hasNext() )
            {
                QName resourceDefName = (QName) resourceDefNames.next();
                if ( resourceDefName.getNamespaceURI().equals( org.apache.ws.resource.properties.v1_2_draft05.ResourcePropertiesConstants.NSURI_WSRP_WSDL ) ||
                     resourceDefName.getNamespaceURI().equals( org.apache.ws.resource.properties.v1_2_draft01.ResourcePropertiesConstants.NSURI_WSRP_WSDL ))
                {
                    throw new InvalidWsrfWsdlException(
                        "PortType " + m_portType.getQName() +
                        " does not define a wsrp:ResourceProperties attribute but implements one or more WSRF-RP portTypes." );
                }
            }
        }
View Full Code Here

                {
                    baseUrl = new URL(m_baseUrl, imports[i].getLocationURI());
                }
                catch (MalformedURLException e)
                {
                    throw new InvalidWsrfWsdlException("Invalid import location " + imports[i].getLocationURI());
                }
                importedResourceDefs.add( new ResourceCapabilityImpl( def, portType, baseUrl) );
            }
        }
        return (ResourceCapability[]) importedResourceDefs.toArray( new ResourceCapability[0] );
View Full Code Here

        {
           return binding.getPortType();
        }
        else
        {
            throw new InvalidWsrfWsdlException("The port has no binding associated with it!");
        }
    }
View Full Code Here

                break;
            }
        }
        if ( endpointURL == null )
        {
            throw new InvalidWsrfWsdlException(
                    "Failed to obtain service endpoint URL from port " + m_port.getName() +
                    " service's wsdl:port/soap:address/@location attribute" );
        }
        return endpointURL;
    }
View Full Code Here

TOP

Related Classes of org.apache.ws.resource.InvalidWsrfWsdlException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.