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

Java SOAPVersion类代码示例

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

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



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

示例1: access

import com.sun.xml.internal.ws.api.SOAPVersion; //导入依赖的package包/类
protected void access() {
    if (!accessedMessage) {
        try {
            envelopeAttrs = sm.getSOAPPart().getEnvelope().getAttributes();
            Node body = sm.getSOAPBody();
            bodyAttrs = body.getAttributes();
            soapVersion = SOAPVersion.fromNsUri(body.getNamespaceURI());
            //cature all the body elements
            bodyParts = DOMUtil.getChildElements(body);
            //we treat payload as the first body part
            payload = bodyParts.size() > 0 ? bodyParts.get(0) : null;
            // hope this is correct. Caching the localname and namespace of the payload should be fine
            // but what about if a Handler replaces the payload with something else? Weel, may be it
            // will be error condition anyway
            if (payload != null) {
                payloadLocalName = payload.getLocalName();
                payloadNamespace = payload.getNamespaceURI();
            }
            accessedMessage = true;
        } catch (SOAPException e) {
            throw new WebServiceException(e);
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:25,代码来源:SAAJMessage.java


示例2: getFaultMessage

import com.sun.xml.internal.ws.api.SOAPVersion; //导入依赖的package包/类
public Message getFaultMessage() {
    QName faultCode = (soapVersion == SOAPVersion.SOAP_11)
        ? SOAPConstants.FAULT_CODE_VERSION_MISMATCH
        : SOAP12Constants.FAULT_CODE_VERSION_MISMATCH;
    return SOAPFaultBuilder.createSOAPFaultMessage(
            soapVersion, getLocalizedMessage(), faultCode);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:VersionMismatchException.java


示例3: dumpParam

import com.sun.xml.internal.ws.api.SOAPVersion; //导入依赖的package包/类
private void dumpParam(T param, String method) {
  if (param instanceof Packet) {
    Packet message = (Packet)param;

    String action;
    String msgId;
    if (LOGGER.isLoggable(Level.FINE)) {
      AddressingVersion av = DispatchImpl.this.getBinding().getAddressingVersion();
      SOAPVersion sv = DispatchImpl.this.getBinding().getSOAPVersion();
      action =
        av != null && message.getMessage() != null ?
          AddressingUtils.getAction(message.getMessage().getHeaders(), av, sv) : null;
      msgId =
        av != null && message.getMessage() != null ?
          AddressingUtils.getMessageID(message.getMessage().getHeaders(), av, sv) : null;
      LOGGER.fine("In DispatchImpl." + method + " for message with action: " + action + " and msg ID: " + msgId + " msg: " + message.getMessage());

      if (message.getMessage() == null) {
        LOGGER.fine("Dispatching null message for action: " + action + " and msg ID: " + msgId);
      }
    }
  }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:24,代码来源:DispatchImpl.java


示例4: fillRequestAddressingHeaders

import com.sun.xml.internal.ws.api.SOAPVersion; //导入依赖的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


示例5: getReplyTo

import com.sun.xml.internal.ws.api.SOAPVersion; //导入依赖的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


示例6: createServiceResponseForException

import com.sun.xml.internal.ws.api.SOAPVersion; //导入依赖的package包/类
@Override
public Packet createServiceResponseForException(final ThrowableContainerPropertySet tc,
                                                final Packet      responsePacket,
                                                final SOAPVersion soapVersion,
                                                final WSDLPort    wsdlPort,
                                                final SEIModel    seiModel,
                                                final WSBinding   binding)
{
    return wsEndpoint.createServiceResponseForException(tc, responsePacket, soapVersion,
                                                        wsdlPort, seiModel, binding);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:WSEndpointMOMProxy.java


示例7: getAction

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

    String action = null;
    Header h = getFirstHeader(headers, av.actionTag, true, sv);
    if (h != null) {
        action = h.getStringContent();
    }

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


示例8: Header

import com.sun.xml.internal.ws.api.SOAPVersion; //导入依赖的package包/类
public Header(SOAPVersion soapVersion, ParameterImpl param, ValueSetter setter) {
    this(soapVersion,
        param.getTypeInfo().tagName,
        param.getXMLBridge(),
        setter);
    assert param.getOutBinding()== ParameterBinding.HEADER;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:8,代码来源:ResponseBuilder.java


示例9: XmlContent

import com.sun.xml.internal.ws.api.SOAPVersion; //导入依赖的package包/类
public XmlContent(String ct, InputStream in, WSFeatureList f) {
            super(SOAPVersion.SOAP_11);
            dataSource = new XmlDataSource(ct, in);
            this.headerList = new HeaderList(SOAPVersion.SOAP_11);
//            this.binding = binding;
            features = f;
        }
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:XMLMessage.java


示例10: init

import com.sun.xml.internal.ws.api.SOAPVersion; //导入依赖的package包/类
private void init(@Nullable MessageHeaders headers, @NotNull AttachmentSet attachmentSet, @NotNull XMLStreamReader reader, @NotNull SOAPVersion soapVersion) {
    this.headers = headers;
    this.attachmentSet = attachmentSet;
    this.reader = reader;

    if(reader.getEventType()== START_DOCUMENT)
        XMLStreamReaderUtil.nextElementContent(reader);

    //if the reader is pointing to the end element </soapenv:Body> then its empty message
    // or no payload
    if(reader.getEventType() == XMLStreamConstants.END_ELEMENT){
        String body = reader.getLocalName();
        String nsUri = reader.getNamespaceURI();
        assert body != null;
        assert nsUri != null;
        //if its not soapenv:Body then throw exception, we received malformed stream
        if(body.equals("Body") && nsUri.equals(soapVersion.nsUri)){
            this.payloadLocalName = null;
            this.payloadNamespaceURI = null;
        }else{ //TODO: i18n and also we should be throwing better message that this
            throw new WebServiceException("Malformed stream: {"+nsUri+"}"+body);
        }
    }else{
        this.payloadLocalName = reader.getLocalName();
        this.payloadNamespaceURI = reader.getNamespaceURI();
    }

    // use the default infoset representation for headers
    int base = soapVersion.ordinal()*3;
    this.envelopeTag = DEFAULT_TAGS.get(base);
    this.headerTag = DEFAULT_TAGS.get(base+1);
    this.bodyTag = DEFAULT_TAGS.get(base+2);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:34,代码来源:StreamMessage.java


示例11: create

import com.sun.xml.internal.ws.api.SOAPVersion; //导入依赖的package包/类
public static StreamSOAPCodec create(SOAPVersion version) {
    if(version==null)
        // this decoder is for SOAP, not for XML/HTTP
        throw new IllegalArgumentException();
    switch(version) {
        case SOAP_11:
            return new StreamSOAP11Codec();
        case SOAP_12:
            return new StreamSOAP12Codec();
        default:
            throw new AssertionError();
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:14,代码来源:StreamSOAPCodec.java


示例12: DOMMessage

import com.sun.xml.internal.ws.api.SOAPVersion; //导入依赖的package包/类
public DOMMessage(SOAPVersion ver, MessageHeaders headers, Element payload, AttachmentSet attachments) {
    super(ver);
    this.headers = headers;
    this.payload = payload;
    this.attachmentSet = attachments;
    assert payload!=null;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:DOMMessage.java


示例13: isIgnorable

import com.sun.xml.internal.ws.api.SOAPVersion; //导入依赖的package包/类
public boolean isIgnorable(@NotNull SOAPVersion soapVersion, @NotNull Set<String> roles) {
    // check mustUnderstand
    String v = getAttribute(soapVersion.nsUri, "mustUnderstand");
    if(v==null || !parseBool(v)) return true;

    if (roles == null) return true;

    // now role
    return !roles.contains(getRole(soapVersion));
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:AbstractHeaderImpl.java


示例14: RpcLit

import com.sun.xml.internal.ws.api.SOAPVersion; //导入依赖的package包/类
/**
 * Creates a {@link EndpointResponseMessageBuilder} from a {@link WrapperParameter}.
 */
public RpcLit(WrapperParameter wp, SOAPVersion soapVersion) {
    super(wp, soapVersion);
    // we'll use CompositeStructure to pack requests
    assert wp.getTypeInfo().type==WrapperComposite.class;

    parameterBridges = new XMLBridge[children.size()];
    for( int i=0; i<parameterBridges.length; i++ )
        parameterBridges[i] = children.get(i).getXMLBridge();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:EndpointResponseMessageBuilder.java


示例15: create

import com.sun.xml.internal.ws.api.SOAPVersion; //导入依赖的package包/类
/**
 * Creates a new {@link StreamSOAPCodec} instance using binding
 *
 * @deprecated use {@link #create(WSFeatureList)}
 */
public static StreamSOAPCodec create(WSBinding binding) {
    SOAPVersion version = binding.getSOAPVersion();
    if(version==null)
        // this decoder is for SOAP, not for XML/HTTP
        throw new IllegalArgumentException();
    switch(version) {
        case SOAP_11:
            return new StreamSOAP11Codec(binding);
        case SOAP_12:
            return new StreamSOAP12Codec(binding);
        default:
            throw new AssertionError();
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:StreamSOAPCodec.java


示例16: JAXBMessage

import com.sun.xml.internal.ws.api.SOAPVersion; //导入依赖的package包/类
private JAXBMessage( BindingContext context, Object jaxbObject, SOAPVersion soapVer, MessageHeaders headers, AttachmentSet attachments ) {
        super(soapVer);
//        this.bridge = new MarshallerBridge(context);
        this.bridge = context.createFragmentBridge();
        this.rawContext = null;
        this.jaxbObject = jaxbObject;
        this.headers = headers;
        this.attachmentSet = attachments;
    }
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:JAXBMessage.java


示例17: newMapRequiredFault

import com.sun.xml.internal.ws.api.SOAPVersion; //导入依赖的package包/类
public SOAPFault newMapRequiredFault(MissingAddressingHeaderException e) {
    QName subcode = addVer.mapRequiredTag;
    QName subsubcode = addVer.mapRequiredTag;
    String faultstring = addVer.getMapRequiredText();

    try {
        SOAPFactory factory;
        SOAPFault fault;
        if (soapVer == SOAPVersion.SOAP_12) {
            factory = SOAPVersion.SOAP_12.getSOAPFactory();
            fault = factory.createFault();
            fault.setFaultCode(SOAPConstants.SOAP_SENDER_FAULT);
            fault.appendFaultSubcode(subcode);
            fault.appendFaultSubcode(subsubcode);
            getMapRequiredDetail(e.getMissingHeaderQName(), fault.addDetail());
        } else {
            factory = SOAPVersion.SOAP_11.getSOAPFactory();
            fault = factory.createFault();
            fault.setFaultCode(subsubcode);
        }

        fault.setFaultString(faultstring);

        return fault;
    } catch (SOAPException se) {
        throw new WebServiceException(se);
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:29,代码来源:WsaTubeHelper.java


示例18: create

import com.sun.xml.internal.ws.api.SOAPVersion; //导入依赖的package包/类
public static Message create(final String ct, InputStream in, WSFeatureList f) {
    Message data;
    try {
        in = StreamUtils.hasSomeData(in);
        if (in == null) {
            return Messages.createEmpty(SOAPVersion.SOAP_11);
        }

        if (ct != null) {
            final ContentType contentType = new ContentType(ct);
            final int contentTypeId = identifyContentType(contentType);
            if ((contentTypeId & MIME_MULTIPART_FLAG) != 0) {
                data = new XMLMultiPart(ct, in, f);
            } else if ((contentTypeId & PLAIN_XML_FLAG) != 0) {
                data = new XmlContent(ct, in, f);
            } else {
                data = new UnknownContent(ct, in);
            }
        } else {
            // According to HTTP spec 7.2.1, if the media type remain
            // unknown, treat as application/octet-stream
            data = new UnknownContent("application/octet-stream", in);
        }
    } catch(Exception ex) {
        throw new WebServiceException(ex);
    }
    return data;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:29,代码来源:XMLMessage.java


示例19: RpcLit

import com.sun.xml.internal.ws.api.SOAPVersion; //导入依赖的package包/类
/**
 * Creates a {@link BodyBuilder} from a {@link WrapperParameter}.
 */
RpcLit(WrapperParameter wp, SOAPVersion soapVersion, ValueGetterFactory getter) {
    super(wp, soapVersion, getter);
    // we'll use CompositeStructure to pack requests
    assert wp.getTypeInfo().type==WrapperComposite.class;

    parameterBridges = new XMLBridge[children.size()];
    for( int i=0; i<parameterBridges.length; i++ )
        parameterBridges[i] = children.get(i).getXMLBridge();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:BodyBuilder.java


示例20: getID

import com.sun.xml.internal.ws.api.SOAPVersion; //导入依赖的package包/类
/**
 * Retuns a unique id for the message.
 * <p><p>
 * @see {@link #getID(com.sun.xml.internal.ws.api.WSBinding)} for detailed description.
 * @param av WS-Addressing version
 * @param sv SOAP version
 * @return unique id for the message
 * @deprecated
 */
public @NotNull String getID(AddressingVersion av, SOAPVersion sv) {
    String uuid = null;
    if (av != null) {
        uuid = AddressingUtils.getMessageID(getHeaders(), av, sv);
    }
    if (uuid == null) {
        uuid = generateMessageID();
        getHeaders().add(new StringHeader(av.messageIDTag, uuid));
    }
    return uuid;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:Message.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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