当前位置: 首页>>代码示例>>Java>>正文


Java ClientMessages.UNDEFINED_PORT_TYPE属性代码示例

本文整理汇总了Java中com.sun.xml.internal.ws.resources.ClientMessages.UNDEFINED_PORT_TYPE属性的典型用法代码示例。如果您正苦于以下问题:Java ClientMessages.UNDEFINED_PORT_TYPE属性的具体用法?Java ClientMessages.UNDEFINED_PORT_TYPE怎么用?Java ClientMessages.UNDEFINED_PORT_TYPE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.sun.xml.internal.ws.resources.ClientMessages的用法示例。


在下文中一共展示了ClientMessages.UNDEFINED_PORT_TYPE属性的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getPort

@Override
public <T> T getPort(Class<T> portInterface, WebServiceFeature... features) {
    //get the portType from SEI
    QName portTypeName = RuntimeModeler.getPortTypeName(portInterface, getMetadadaReader(new WebServiceFeatureList(features), portInterface.getClassLoader()));
    WSDLService tmpWsdlService = this.wsdlService;
    if (tmpWsdlService == null) {
        // assigning it to local variable and not setting it back to this.wsdlService intentionally
        // as we don't want to include the service instance with information gathered from sei
        tmpWsdlService = getWSDLModelfromSEI(portInterface);
        //still null? throw error need wsdl metadata to create a proxy
        if(tmpWsdlService == null) {
            throw new WebServiceException(ProviderApiMessages.NO_WSDL_NO_PORT(portInterface.getName()));
        }
    }
    //get the first port corresponding to the SEI
    WSDLPort port = tmpWsdlService.getMatchingPort(portTypeName);
    if (port == null) {
        throw new WebServiceException(ClientMessages.UNDEFINED_PORT_TYPE(portTypeName));
    }
    QName portName = port.getName();
    return getPort(portName, portInterface,features);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:22,代码来源:WSServiceDelegate.java

示例2: getPort

public <T> T getPort(Class<T> portInterface, WebServiceFeature... features) {
    //get the portType from SEI
    QName portTypeName = RuntimeModeler.getPortTypeName(portInterface);
    WSDLServiceImpl wsdlService = this.wsdlService;
    if(wsdlService == null) {
        // assigning it to local variable and not setting it back to this.wsdlService intentionally
        // as we don't want to include the service instance with information gathered from sei
        wsdlService = getWSDLModelfromSEI(portInterface);
        //still null? throw error need wsdl metadata to create a proxy
        if(wsdlService == null) {
            throw new WebServiceException(ProviderApiMessages.NO_WSDL_NO_PORT(portInterface.getName()));
        }
    }
    //get the first port corresponding to the SEI
    WSDLPortImpl port = wsdlService.getMatchingPort(portTypeName);
    if (port == null)
            throw new WebServiceException(ClientMessages.UNDEFINED_PORT_TYPE(portTypeName));
    QName portName = port.getName();
    return getPort(portName, portInterface,features);
}
 
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:20,代码来源:WSServiceDelegate.java

示例3: freeze

public void freeze() {
    portType = owner.getPortType(portTypeName);
    if(portType == null){
        throw new LocatableWebServiceException(
                ClientMessages.UNDEFINED_PORT_TYPE(portTypeName), getLocation());
    }
    portType.freeze();

    for (EditableWSDLBoundOperation op : bindingOperations.values()) {
        op.freeze(owner);
    }

    freezePayloadMap();
    owner.finalizeRpcLitBinding(this);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:15,代码来源:WSDLBoundPortTypeImpl.java

示例4: freeze

void freeze() {
    portType = owner.getPortType(portTypeName);
    if(portType == null){
        throw new LocatableWebServiceException(
                ClientMessages.UNDEFINED_PORT_TYPE(portTypeName), getLocation());
    }
    portType.freeze();

    for (WSDLBoundOperationImpl op : bindingOperations.values()) {
        op.freeze(owner);
    }

    freezePayloadMap();
    owner.finalizeRpcLitBinding(this);
}
 
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:15,代码来源:WSDLBoundPortTypeImpl.java

示例5: getPortNameFromEPR

/**
 *
 * @param wsepr EndpointReference from which portName will be extracted.
 *      If EndpointName ( port name) is null in EPR, then it will try to get if from WSDLModel using portType QName
 * @param portTypeName
 *          should be null in dispatch case
 *          should be non null in SEI case
 * @return
 *      port name from EPR after validating various metadat elements.
 *      Also if service instance does n't have wsdl,
 *      then it gets the WSDL metadata from EPR and builds wsdl model.
 */
private QName getPortNameFromEPR(@NotNull WSEndpointReference wsepr, @Nullable QName portTypeName) {
    QName portName;
    WSEndpointReference.Metadata metadata = wsepr.getMetaData();
    QName eprServiceName = metadata.getServiceName();
    QName eprPortName = metadata.getPortName();
    if ((eprServiceName != null ) && !eprServiceName.equals(serviceName)) {
        throw new WebServiceException("EndpointReference WSDL ServiceName differs from Service Instance WSDL Service QName.\n"
                + " The two Service QNames must match");
    }
    if (wsdlService == null) {
        Source eprWsdlSource = metadata.getWsdlSource();
        if (eprWsdlSource == null) {
            throw new WebServiceException(ProviderApiMessages.NULL_WSDL());
        }
        try {
            WSDLModel eprWsdlMdl = parseWSDL(new URL(wsepr.getAddress()), eprWsdlSource, null);
            wsdlService = eprWsdlMdl.getService(serviceName);
            if (wsdlService == null)
                throw new WebServiceException(ClientMessages.INVALID_SERVICE_NAME(serviceName,
                        buildNameList(eprWsdlMdl.getServices().keySet())));
        } catch (MalformedURLException e) {
            throw new WebServiceException(ClientMessages.INVALID_ADDRESS(wsepr.getAddress()));
        }
    }
    portName = eprPortName;

    if (portName == null && portTypeName != null) {
        //get the first port corresponding to the SEI
        WSDLPort port = wsdlService.getMatchingPort(portTypeName);
        if (port == null)
            throw new WebServiceException(ClientMessages.UNDEFINED_PORT_TYPE(portTypeName));
        portName = port.getName();
    }
    if (portName == null)
        throw new WebServiceException(ProviderApiMessages.NULL_PORTNAME());
    if (wsdlService.get(portName) == null)
        throw new WebServiceException(ClientMessages.INVALID_EPR_PORT_NAME(portName, buildWsdlPortNames()));

    return portName;

}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:53,代码来源:WSServiceDelegate.java

示例6: getPortNameFromEPR

/**
 *
 * @param wsepr EndpointReference from which portName will be extracted.
 *      If EndpointName ( port name) is null in EPR, then it will try to get if from WSDLModel using portType QName
 * @param portTypeName
 *          should be null in dispatch case
 *          should be non null in SEI case
 * @return
 *      port name from EPR after validating various metadat elements.
 *      Also if service instance does n't have wsdl,
 *      then it gets the WSDL metadata from EPR and builds wsdl model.
 */
private QName getPortNameFromEPR(@NotNull WSEndpointReference wsepr, @Nullable QName portTypeName) {
    QName portName;
    WSEndpointReference.Metadata metadata = wsepr.getMetaData();
    QName eprServiceName = metadata.getServiceName();
    QName eprPortName = metadata.getPortName();
    if ((eprServiceName != null ) && !eprServiceName.equals(serviceName)) {
        throw new WebServiceException("EndpointReference WSDL ServiceName differs from Service Instance WSDL Service QName.\n"
                + " The two Service QNames must match");
    }
    if (wsdlService == null) {
        Source eprWsdlSource = metadata.getWsdlSource();
        if (eprWsdlSource == null) {
            throw new WebServiceException(ProviderApiMessages.NULL_WSDL());
        }
        try {
            WSDLModelImpl eprWsdlMdl = parseWSDL(new URL(wsepr.getAddress()), eprWsdlSource);
            wsdlService = eprWsdlMdl.getService(serviceName);
            if (wsdlService == null)
                throw new WebServiceException(ClientMessages.INVALID_SERVICE_NAME(serviceName,
                        buildNameList(eprWsdlMdl.getServices().keySet())));
        } catch (MalformedURLException e) {
            throw new WebServiceException(ClientMessages.INVALID_ADDRESS(wsepr.getAddress()));
        }
    }
    portName = eprPortName;

    if (portName == null && portTypeName != null) {
        //get the first port corresponding to the SEI
        WSDLPortImpl port = wsdlService.getMatchingPort(portTypeName);
        if (port == null)
            throw new WebServiceException(ClientMessages.UNDEFINED_PORT_TYPE(portTypeName));
        portName = port.getName();
    }
    if (portName == null)
        throw new WebServiceException(ProviderApiMessages.NULL_PORTNAME());
    if (wsdlService.get(portName) == null)
        throw new WebServiceException(ClientMessages.INVALID_EPR_PORT_NAME(portName, buildWsdlPortNames()));

    return portName;

}
 
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:53,代码来源:WSServiceDelegate.java


注:本文中的com.sun.xml.internal.ws.resources.ClientMessages.UNDEFINED_PORT_TYPE属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。