本文整理汇总了Java中org.apache.axiom.om.OMAbstractFactory.getSOAP12Factory方法的典型用法代码示例。如果您正苦于以下问题:Java OMAbstractFactory.getSOAP12Factory方法的具体用法?Java OMAbstractFactory.getSOAP12Factory怎么用?Java OMAbstractFactory.getSOAP12Factory使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.axiom.om.OMAbstractFactory
的用法示例。
在下文中一共展示了OMAbstractFactory.getSOAP12Factory方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createDefaultSOAPEnvelope
import org.apache.axiom.om.OMAbstractFactory; //导入方法依赖的package包/类
private SOAPEnvelope createDefaultSOAPEnvelope(MessageContext inMsgCtx) {
String soapNamespace = inMsgCtx.getEnvelope().getNamespace()
.getNamespaceURI();
SOAPFactory soapFactory = null;
if (soapNamespace.equals(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI)) {
soapFactory = OMAbstractFactory.getSOAP11Factory();
} else if (soapNamespace
.equals(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI)) {
soapFactory = OMAbstractFactory.getSOAP12Factory();
} else {
log.error("Unknown SOAP Envelope");
}
if (soapFactory != null) {
return soapFactory.getDefaultEnvelope();
}
return null;
}
示例2: buildSoapEnvelope
import org.apache.axiom.om.OMAbstractFactory; //导入方法依赖的package包/类
private SOAPEnvelope buildSoapEnvelope(String clientID, String value) {
SOAPFactory soapFactory = OMAbstractFactory.getSOAP12Factory();
SOAPEnvelope envelope = soapFactory.createSOAPEnvelope();
SOAPHeader header = soapFactory.createSOAPHeader();
envelope.addChild(header);
OMNamespace synNamespace = soapFactory.createOMNamespace(
"http://ws.apache.org/ns/synapse", "syn");
OMElement clientIDElement = soapFactory.createOMElement("ClientID", synNamespace);
clientIDElement.setText(clientID);
header.addChild(clientIDElement);
SOAPBody body = soapFactory.createSOAPBody();
envelope.addChild(body);
OMElement valueElement = soapFactory.createOMElement("Value", null);
valueElement.setText(value);
body.addChild(valueElement);
return envelope;
}
示例3: buildSoapEnvelope
import org.apache.axiom.om.OMAbstractFactory; //导入方法依赖的package包/类
private SOAPEnvelope buildSoapEnvelope(String clientID, String value) {
SOAPFactory soapFactory = OMAbstractFactory.getSOAP12Factory();
SOAPEnvelope envelope = soapFactory.createSOAPEnvelope();
SOAPHeader header = soapFactory.createSOAPHeader();
envelope.addChild(header);
OMNamespace synNamespace = soapFactory.
createOMNamespace("http://ws.apache.org/ns/synapse", "syn");
OMElement clientIDElement = soapFactory.createOMElement("ClientID", synNamespace);
clientIDElement.setText(clientID);
header.addChild(clientIDElement);
SOAPBody body = soapFactory.createSOAPBody();
envelope.addChild(body);
OMElement valueElement = soapFactory.createOMElement("Value", null);
valueElement.setText(value);
body.addChild(valueElement);
return envelope;
}
示例4: setClientSessionID
import org.apache.axiom.om.OMAbstractFactory; //导入方法依赖的package包/类
public void setClientSessionID(String id) {
SOAPFactory soapFactory = OMAbstractFactory.getSOAP12Factory();
OMNamespace synNamespace = soapFactory.
createOMNamespace("http://ws.apache.org/namespaces/synapse", "syn");
SOAPHeaderBlock header = soapFactory.createSOAPHeaderBlock("ClientID", synNamespace);
header.setText(id);
client.addHeader(header);
}