• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java WSEndpointReference类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.sun.xml.internal.ws.api.addressing.WSEndpointReference的典型用法代码示例。如果您正苦于以下问题:Java WSEndpointReference类的具体用法?Java WSEndpointReference怎么用?Java WSEndpointReference使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



WSEndpointReference类属于com.sun.xml.internal.ws.api.addressing包,在下文中一共展示了WSEndpointReference类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: fillRequestAddressingHeaders

import com.sun.xml.internal.ws.api.addressing.WSEndpointReference; //导入依赖的package包/类
public static void fillRequestAddressingHeaders(MessageHeaders headers, Packet packet, AddressingVersion av, SOAPVersion sv, boolean oneway, String action, boolean mustUnderstand) {
    fillCommonAddressingHeaders(headers, packet, av, sv, action, mustUnderstand);

    // wsa:ReplyTo
    // null or "true" is equivalent to request/response MEP
    if (!oneway) {
        WSEndpointReference epr = av.anonymousEpr;
        if (headers.get(av.replyToTag, false) == null) {
          headers.add(epr.createHeader(av.replyToTag));
        }

        // wsa:FaultTo
        if (headers.get(av.faultToTag, false) == null) {
          headers.add(epr.createHeader(av.faultToTag));
        }

        // wsa:MessageID
        if (packet.getMessage().getHeaders().get(av.messageIDTag, false) == null) {
            if (headers.get(av.messageIDTag, false) == null) {
                Header h = new StringHeader(av.messageIDTag, Message.generateMessageID());
                headers.add(h);
            }
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:26,代码来源:AddressingUtils.java


示例2: createDispatch

import com.sun.xml.internal.ws.api.addressing.WSEndpointReference; //导入依赖的package包/类
public <T> Dispatch<T> createDispatch(QName portName, WSEndpointReference wsepr, Class<T> aClass, Service.Mode mode, WebServiceFeatureList features) {
    PortInfo port = safeGetPort(portName);

    ComponentFeature cf = features.get(ComponentFeature.class);
    if (cf != null && !Target.STUB.equals(cf.getTarget())) {
        throw new IllegalArgumentException();
    }
    ComponentsFeature csf = features.get(ComponentsFeature.class);
    if (csf != null) {
        for (ComponentFeature cfi : csf.getComponentFeatures()) {
            if (!Target.STUB.equals(cfi.getTarget()))
                throw new IllegalArgumentException();
        }
    }
    features.addAll(this.features);

    BindingImpl binding = port.createBinding(features, null, null);
    binding.setMode(mode);
    Dispatch<T> dispatch = Stubs.createDispatch(port, this, binding, aClass, mode, wsepr);
    serviceInterceptor.postCreateDispatch((WSBindingProvider) dispatch);
    return dispatch;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:23,代码来源:WSServiceDelegate.java


示例3: createDispatch

import com.sun.xml.internal.ws.api.addressing.WSEndpointReference; //导入依赖的package包/类
/**
 * Creates a new {@link Dispatch} stub that connects to the given pipe.
 *
 * @param portName
 *      see {@link Service#createDispatch(QName, Class, Service.Mode)}.
 * @param owner
 *      see <a href="#param">common parameters</a>
 * @param binding
 *      see <a href="#param">common parameters</a>
 * @param clazz
 *      Type of the {@link Dispatch} to be created.
 *      See {@link Service#createDispatch(QName, Class, Service.Mode)}.
 * @param mode
 *      The mode of the dispatch.
 *      See {@link Service#createDispatch(QName, Class, Service.Mode)}.
 * @param next
 *      see <a href="#param">common parameters</a>
 * @param epr
 *      see <a href="#param">common parameters</a>
 * TODO: are these parameters making sense?
 */
@SuppressWarnings("unchecked")
    public static <T> Dispatch<T> createDispatch(QName portName,
                                             WSService owner,
                                             WSBinding binding,
                                             Class<T> clazz, Service.Mode mode, Tube next,
                                             @Nullable WSEndpointReference epr) {
    if (clazz == SOAPMessage.class) {
        return (Dispatch<T>) createSAAJDispatch(portName, owner, binding, mode, next, epr);
    } else if (clazz == Source.class) {
        return (Dispatch<T>) createSourceDispatch(portName, owner, binding, mode, next, epr);
    } else if (clazz == DataSource.class) {
        return (Dispatch<T>) createDataSourceDispatch(portName, owner, binding, mode, next, epr);
    } else if (clazz == Message.class) {
        if(mode==Mode.MESSAGE)
            return (Dispatch<T>) createMessageDispatch(portName, owner, binding, next, epr);
        else
            throw new WebServiceException(mode+" not supported with Dispatch<Message>");
    } else if (clazz == Packet.class) {
        return (Dispatch<T>) createPacketDispatch(portName, owner, binding, next, epr);
    } else
        throw new WebServiceException("Unknown class type " + clazz.getName());
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:44,代码来源:Stubs.java


示例4: getPort

import com.sun.xml.internal.ws.api.addressing.WSEndpointReference; //导入依赖的package包/类
protected <T> T getPort(WSEndpointReference wsepr, QName portName, Class<T> portInterface,
                      WebServiceFeatureList features) {
    ComponentFeature cf = features.get(ComponentFeature.class);
    if (cf != null && !Target.STUB.equals(cf.getTarget())) {
        throw new IllegalArgumentException();
    }
    ComponentsFeature csf = features.get(ComponentsFeature.class);
    if (csf != null) {
        for (ComponentFeature cfi : csf.getComponentFeatures()) {
            if (!Target.STUB.equals(cfi.getTarget()))
                throw new IllegalArgumentException();
        }
    }
    features.addAll(this.features);

    SEIPortInfo spi = addSEI(portName, portInterface, features);
    return createEndpointIFBaseProxy(wsepr,portName,portInterface,features, spi);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:19,代码来源:WSServiceDelegate.java


示例5: createEndpointIFBaseProxy

import com.sun.xml.internal.ws.api.addressing.WSEndpointReference; //导入依赖的package包/类
private <T> T createEndpointIFBaseProxy(@Nullable WSEndpointReference epr, QName portName, Class<T> portInterface,
                                        WebServiceFeatureList webServiceFeatures, SEIPortInfo eif) {
    //fail if service doesnt have WSDL
    if (wsdlService == null) {
        throw new WebServiceException(ClientMessages.INVALID_SERVICE_NO_WSDL(serviceName));
    }

    if (wsdlService.get(portName)==null) {
        throw new WebServiceException(
            ClientMessages.INVALID_PORT_NAME(portName,buildWsdlPortNames()));
    }

    BindingImpl binding = eif.createBinding(webServiceFeatures, portInterface);
    InvocationHandler pis = getStubHandler(binding, eif, epr);

    T proxy = createProxy(portInterface, pis);

    if (serviceInterceptor != null) {
        serviceInterceptor.postCreateProxy((WSBindingProvider)proxy, portInterface);
    }
    return proxy;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:23,代码来源:WSServiceDelegate.java


示例6: checkNonAnonymousAddresses

import com.sun.xml.internal.ws.api.addressing.WSEndpointReference; //导入依赖的package包/类
@SuppressWarnings("ResultOfObjectAllocationIgnored")
private void checkNonAnonymousAddresses(WSEndpointReference replyTo, WSEndpointReference faultTo) {
    if (!replyTo.isAnonymous()) {
        try {
            new EndpointAddress(URI.create(replyTo.getAddress()));
        } catch (Exception e) {
            throw new InvalidAddressingHeaderException(addressingVersion.replyToTag, addressingVersion.invalidAddressTag);
        }
    }
    //for now only validate ReplyTo
    /*
    if (!faultTo.isAnonymous()) {
        try {
            new EndpointAddress(URI.create(faultTo.getAddress()));
        } catch (IllegalArgumentException e) {
            throw new InvalidAddressingHeaderException(addressingVersion.faultToTag, addressingVersion.invalidAddressTag);
        }
    }
    */

}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:22,代码来源:WsaServerTube.java


示例7: getReplyTo

import com.sun.xml.internal.ws.api.addressing.WSEndpointReference; //导入依赖的package包/类
public static WSEndpointReference getReplyTo(@NotNull MessageHeaders headers, @NotNull AddressingVersion av, @NotNull SOAPVersion sv) {
    if (av == null) {
        throw new IllegalArgumentException(AddressingMessages.NULL_ADDRESSING_VERSION());
    }

    Header h = getFirstHeader(headers, av.replyToTag, true, sv);
    WSEndpointReference replyTo;
    if (h != null) {
        try {
            replyTo = h.readAsEPR(av);
        } catch (XMLStreamException e) {
            throw new WebServiceException(AddressingMessages.REPLY_TO_CANNOT_PARSE(), e);
        }
    } else {
        replyTo = av.anonymousEpr;
    }

    return replyTo;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:20,代码来源:AddressingUtils.java


示例8: readAsEPR

import com.sun.xml.internal.ws.api.addressing.WSEndpointReference; //导入依赖的package包/类
/**
 * Default implementation that copies the infoset. Not terribly efficient.
 */
public WSEndpointReference readAsEPR(AddressingVersion expected) throws XMLStreamException {
    XMLStreamReader xsr = readHeader();
    WSEndpointReference epr = new WSEndpointReference(xsr, expected);
    XMLStreamReaderFactory.recycle(xsr);
    return epr;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:AbstractHeaderImpl.java


示例9: getToAsReference

import com.sun.xml.internal.ws.api.addressing.WSEndpointReference; //导入依赖的package包/类
/**
 * Gets the {@code wsa:To} header.
 *
 * @return
 *      null if the incoming SOAP message didn't have the header.
 */
@Property(WSA_TO)
public WSEndpointReference getToAsReference() throws XMLStreamException {
  if (packet.getMessage() == null) {
    return null;
  }
  Header h = packet.getMessage().getHeaders().get(addressingVersion.toTag, false);
  if(h==null) return null;
  return new WSEndpointReference(h.getStringContent(),addressingVersion);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:16,代码来源:WsaPropertyBag.java


示例10: SEIStub

import com.sun.xml.internal.ws.api.addressing.WSEndpointReference; //导入依赖的package包/类
public SEIStub(WSPortInfo portInfo, BindingImpl binding, SOAPSEIModel seiModel, WSEndpointReference epr) {
    super(portInfo, binding, seiModel.getPort().getAddress(),epr);
    this.seiModel = seiModel;
    this.soapVersion = binding.getSOAPVersion();
    databinding = seiModel.getDatabinding();
    initMethodHandlers();
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:8,代码来源:SEIStub.java


示例11: getWSEndpointReference

import com.sun.xml.internal.ws.api.addressing.WSEndpointReference; //导入依赖的package包/类
@Override
public final WSEndpointReference getWSEndpointReference() {
    if (binding.getBindingID().equals(HTTPBinding.HTTP_BINDING)) {
        throw new java.lang.UnsupportedOperationException(
                    ClientMessages.UNSUPPORTED_OPERATION("BindingProvider.getEndpointReference(Class<T> class)", "XML/HTTP Binding", "SOAP11 or SOAP12 Binding")
                );
    }

    if (endpointReference != null) {
        return endpointReference;
    }

    String eprAddress = requestContext.getEndpointAddress().toString();
    QName portTypeName = null;
    String wsdlAddress = null;
    List<WSEndpointReference.EPRExtension> wsdlEPRExtensions = new ArrayList<WSEndpointReference.EPRExtension>();
    if (wsdlPort != null) {
        portTypeName = wsdlPort.getBinding().getPortTypeName();
        wsdlAddress = eprAddress + "?wsdl";

        //gather EPRExtensions specified in WSDL.
        try {
            WSEndpointReference wsdlEpr = wsdlPort.getEPR();
            if (wsdlEpr != null) {
                for (WSEndpointReference.EPRExtension extnEl : wsdlEpr.getEPRExtensions()) {
                    wsdlEPRExtensions.add(new WSEPRExtension(
                            XMLStreamBuffer.createNewBufferFromXMLStreamReader(extnEl.readAsXMLStreamReader()), extnEl.getQName()));
                }
            }

        } catch (XMLStreamException ex) {
            throw new WebServiceException(ex);
        }
    }
    AddressingVersion av = AddressingVersion.W3C;
    this.endpointReference = new WSEndpointReference(
            av, eprAddress, getServiceName(), getPortName(), portTypeName, null, wsdlAddress, null, wsdlEPRExtensions, null);

    return this.endpointReference;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:41,代码来源:Stub.java


示例12: getEPR

import com.sun.xml.internal.ws.api.addressing.WSEndpointReference; //导入依赖的package包/类
private WSEndpointReference getEPR(QName tag) throws XMLStreamException {
    if (packet.getMessage() == null) {
      return null;
    }
    Header h = packet.getMessage().getHeaders().get(tag, false);
    if(h==null) return null;
    return h.readAsEPR(addressingVersion);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:WsaPropertyBag.java


示例13: getPort

import com.sun.xml.internal.ws.api.addressing.WSEndpointReference; //导入依赖的package包/类
public <T> T getPort(WSEndpointReference wsepr, Class<T> portInterface, WebServiceFeature... features) {
    //get the portType from SEI, so that it can be used if EPR does n't have endpointName
    WebServiceFeatureList featureList = new WebServiceFeatureList(features);
    QName portTypeName = RuntimeModeler.getPortTypeName(portInterface, getMetadadaReader(featureList, portInterface.getClassLoader()));
    //if port name is not specified in EPR, it will use portTypeName to get it from the WSDL model.
    QName portName = getPortNameFromEPR(wsepr, portTypeName);
    return getPort(wsepr,portName,portInterface, featureList);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:WSServiceDelegate.java


示例14: addPortEpr

import com.sun.xml.internal.ws.api.addressing.WSEndpointReference; //导入依赖的package包/类
private QName addPortEpr(WSEndpointReference wsepr) {
    if (wsepr == null)
        throw new WebServiceException(ProviderApiMessages.NULL_EPR());
    QName eprPortName = getPortNameFromEPR(wsepr, null);
    //add Port, if it does n't exist;
    // TODO: what if it has different epr address?
    {
        PortInfo portInfo = new PortInfo(this, (wsepr.getAddress() == null) ? null : EndpointAddress.create(wsepr.getAddress()), eprPortName,
                getPortModel(wsdlService, eprPortName).getBinding().getBindingId());
        if (!ports.containsKey(eprPortName)) {
            ports.put(eprPortName, portInfo);
        }
    }
    return eprPortName;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:16,代码来源:WSServiceDelegate.java


示例15: getEndpointReference

import com.sun.xml.internal.ws.api.addressing.WSEndpointReference; //导入依赖的package包/类
public <T extends EndpointReference> T getEndpointReference(Class<T> clazz,
        String address, String wsdlAddress, List<Element> metadata,
        List<Element> referenceParameters) {
    QName portType = null;
    if (port != null) {
        portType = port.getBinding().getPortTypeName();
    }

    AddressingVersion av = AddressingVersion.fromSpecClass(clazz);
    return new WSEndpointReference(
            av, address, serviceName, portName, portType, metadata, wsdlAddress, referenceParameters, endpointReferenceExtensions.values(), null).toSpec(clazz);

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


示例16: createSourceDispatch

import com.sun.xml.internal.ws.api.addressing.WSEndpointReference; //导入依赖的package包/类
public static Dispatch<Source> createSourceDispatch(WSPortInfo portInfo, Mode mode, BindingImpl binding, WSEndpointReference epr) {
    if (isXMLHttp(binding))
        return new RESTSourceDispatch(portInfo, mode, binding, epr);
    else
        return new SOAPSourceDispatch(portInfo, mode, binding, epr);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:7,代码来源:DispatchImpl.java


示例17: SOAPMessageDispatch

import com.sun.xml.internal.ws.api.addressing.WSEndpointReference; //导入依赖的package包/类
public SOAPMessageDispatch(WSPortInfo portInfo, Service.Mode mode, BindingImpl binding, WSEndpointReference epr) {
    super(portInfo, mode, binding, epr);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:4,代码来源:SOAPMessageDispatch.java


示例18: getStubHandler

import com.sun.xml.internal.ws.api.addressing.WSEndpointReference; //导入依赖的package包/类
protected InvocationHandler getStubHandler(BindingImpl binding, SEIPortInfo eif, @Nullable WSEndpointReference epr) {
    return new SEIStub(eif, binding, eif.model, epr);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:4,代码来源:WSServiceDelegate.java


示例19: getEndpointReferenceExtensions

import com.sun.xml.internal.ws.api.addressing.WSEndpointReference; //导入依赖的package包/类
public Collection<WSEndpointReference.EPRExtension> getEndpointReferenceExtensions() {
    return endpointReferenceExtensions.values();
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:4,代码来源:WSEndpointImpl.java


示例20: setReplyToFromRequest

import com.sun.xml.internal.ws.api.addressing.WSEndpointReference; //导入依赖的package包/类
public void setReplyToFromRequest(WSEndpointReference ref) {
  _replyToFromRequest = ref;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:WsaPropertyBag.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java SPacketSetExperience类代码示例发布时间:2022-05-23
下一篇:
Java DOMEnhancedForDTM类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap