javax.xml.soap.SOAPElement.setEncodingStyle()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(220)

本文整理了Java中javax.xml.soap.SOAPElement.setEncodingStyle()方法的一些代码示例,展示了SOAPElement.setEncodingStyle()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SOAPElement.setEncodingStyle()方法的具体详情如下:
包路径:javax.xml.soap.SOAPElement
类名称:SOAPElement
方法名:setEncodingStyle

SOAPElement.setEncodingStyle介绍

[英]Sets the encoding style for this SOAPElement object to one specified.
[中]将此SOAPElement对象的编码样式设置为指定的编码样式。

代码示例

代码示例来源:origin: com.hynnet/xws-security

public void setEncodingStyle(String arg0) throws SOAPException {
  delegateElement.setEncodingStyle(arg0);
}

代码示例来源:origin: com.hynnet/xws-security

public void setEncodingStyle(String arg0) throws SOAPException {
  delegateElement.setEncodingStyle(arg0);
}

代码示例来源:origin: com.hynnet/xws-security

public void setEncodingStyle(String arg0) throws SOAPException {
  delegateHeader.setEncodingStyle(arg0);
}

代码示例来源:origin: com.hynnet/xws-security

public void setEncodingStyle(String string) throws SOAPException {
  delegateElement.setEncodingStyle(string);
}

代码示例来源:origin: net.bpelunit/framework

/**
 * Utility method for creating the root element for the body of a SOAP
 * message.
 */
protected SOAPElement addRootElement(SOAPMessage message, final QName name)
    throws SOAPException {
  SOAPBody body = message.getSOAPBody();
  SOAPElement rootElement = body.addChildElement(name);
  rootElement.setEncodingStyle(NS_SOAP_ENCODING);
  rootElement.addNamespaceDeclaration("xsi", NS_XMLSCHEMA_INSTANCE);
  rootElement.addNamespaceDeclaration("xsd", NS_XMLSCHEMA);
  rootElement.addNamespaceDeclaration("act", NS_ACTIVEBPEL_ADMIN);
  return rootElement;
}

代码示例来源:origin: stackoverflow.com

@Test
   public void test() throws Exception {
     MessageFactory messageFactory = MessageFactory.newInstance();
     SOAPMessage soapMessage = messageFactory.createMessage();
     SOAPPart soapPart = soapMessage.getSOAPPart();
     SOAPEnvelope soapEnvelope = soapPart.getEnvelope();
     soapEnvelope.addNamespaceDeclaration("xsd",
         "http://www.w3.org/2001/XMLSchema");
     soapEnvelope.addNamespaceDeclaration("xsi",
         "http://www.w3.org/2001/XMLSchema-instance");
     soapEnvelope.addNamespaceDeclaration("bran", "BDetail");
     SOAPBody soapBody = soapEnvelope.getBody();
     SOAPElement soapElement = soapBody.addChildElement(
         "sentIbBTyp", "bran");
     soapElement
         .setEncodingStyle("http://schemas.xmlsoap.org/soap/encoding/");
     SOAPElement elementBankCode = soapElement.addChildElement("pBnCode");
     // added missing attribute
     QName qname = new QName("xsi:type");
     elementBankCode.addAttribute(qname, "xsd:string");
     elementBankCode.setValue("234");
     soapMessage.writeTo(System.out);
   }

相关文章

微信公众号

最新文章

更多