Package org.apache.muse.ws.dm.muws.remote

Source Code of org.apache.muse.ws.dm.muws.remote.RelationshipsClient

/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements.  See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership.  The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License.  You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied.  See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/

package org.apache.muse.ws.dm.muws.remote;

import javax.xml.namespace.QName;

import org.w3c.dom.Element;

import org.apache.muse.core.Environment;
import org.apache.muse.ws.addressing.EndpointReference;
import org.apache.muse.ws.dm.muws.MuwsConstants;
import org.apache.muse.ws.dm.muws.impl.QueryRelationships;
import org.apache.muse.ws.dm.muws.impl.QueryRelationshipsResponse;
import org.apache.muse.ws.resource.remote.WsResourceClient;
import org.apache.muse.ws.addressing.soap.SoapClient;
import org.apache.muse.ws.addressing.soap.SoapFault;

/**
*
* RelationshipsClient is a client for invoking the web services operations
* in WSDM MUWS Part 2 that are defined by the muws2:Relationships capability.
*
* @author Dan Jemiolo (danj)
*
*/

public class RelationshipsClient extends WsResourceClient
{
    public RelationshipsClient(EndpointReference destination)
    {
        super(destination);
    }

    public RelationshipsClient(EndpointReference destination,
                               EndpointReference source)
    {
        super(destination, source);
    }

    public RelationshipsClient(EndpointReference destination,
                               EndpointReference source,
                               Environment environment)
    {
        super(destination, source, environment);
    }

    public RelationshipsClient(EndpointReference destination,
                               EndpointReference source,
                               SoapClient soapClient)
    {
        super(destination, source, soapClient);
    }

    public WsResourceClient[] queryRelationshipsByType(QName[] types)
        throws SoapFault
    {
        QueryRelationships query = new QueryRelationships(types);
       
        Element responseXML = invoke(MuwsConstants.QUERY_RELATIONSHIPS_URI, query.toXML());
        QueryRelationshipsResponse response = new QueryRelationshipsResponse(responseXML);
       
        return response.getRelationshipClients();
    }
}
TOP

Related Classes of org.apache.muse.ws.dm.muws.remote.RelationshipsClient

TOP
Copyright © 2018 www.massapi.com. 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.