本文整理汇总了Java中com.sun.xml.internal.ws.api.message.saaj.SAAJFactory类的典型用法代码示例。如果您正苦于以下问题:Java SAAJFactory类的具体用法?Java SAAJFactory怎么用?Java SAAJFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SAAJFactory类属于com.sun.xml.internal.ws.api.message.saaj包,在下文中一共展示了SAAJFactory类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: toSAAJ
import com.sun.xml.internal.ws.api.message.saaj.SAAJFactory; //导入依赖的package包/类
public Message toSAAJ(Packet p, Boolean inbound) throws SOAPException {
SAAJMessage message = SAAJFactory.read(p);
if (message instanceof MessageWritable)
((MessageWritable) message)
.setMTOMConfiguration(p.getMtomFeature());
if (inbound != null) transportHeaders(p, inbound, message.readAsSOAPMessage());
return message;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:AbstractMessageImpl.java
示例2: updateMessage
import com.sun.xml.internal.ws.api.message.saaj.SAAJFactory; //导入依赖的package包/类
protected void updateMessage() {
//Check if SOAPMessage has changed, if so construct new one,
// Packet are handled through MessageContext
if(soapMsg != null) {
packet.setMessage(SAAJFactory.create(soapMsg));
soapMsg = null;
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:SOAPMessageContextImpl.java
示例3: createPacket
import com.sun.xml.internal.ws.api.message.saaj.SAAJFactory; //导入依赖的package包/类
Packet createPacket(SOAPMessage arg) {
Iterator iter = arg.getMimeHeaders().getAllHeaders();
Headers ch = new Headers();
while(iter.hasNext()) {
MimeHeader mh = (MimeHeader) iter.next();
ch.add(mh.getName(), mh.getValue());
}
Packet packet = new Packet(SAAJFactory.create(arg));
packet.invocationProperties.put(MessageContext.HTTP_REQUEST_HEADERS, ch);
return packet;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:SOAPMessageDispatch.java
示例4: testResetDefaultNamespaceSAAJ
import com.sun.xml.internal.ws.api.message.saaj.SAAJFactory; //导入依赖的package包/类
@Test
public void testResetDefaultNamespaceSAAJ() throws Exception {
// Create SOAP message from XML string and process it with SAAJ reader
XMLStreamReader envelope = XMLInputFactory.newFactory().createXMLStreamReader(
new StringReader(INPUT_SOAP_MESSAGE));
StreamMessage streamMessage = new StreamMessage(SOAPVersion.SOAP_11,
envelope, null);
SAAJFactory saajFact = new SAAJFactory();
SOAPMessage soapMessage = saajFact.readAsSOAPMessage(SOAPVersion.SOAP_11, streamMessage);
// Check if constructed object model meets local names and namespace expectations
SOAPElement request = (SOAPElement) soapMessage.getSOAPBody().getFirstChild();
// Check top body element name
Assert.assertEquals(request.getLocalName(), "SampleServiceRequest");
// Check top body element namespace
Assert.assertEquals(request.getNamespaceURI(), TEST_NS);
SOAPElement params = (SOAPElement) request.getFirstChild();
// Check first child name
Assert.assertEquals(params.getLocalName(), "RequestParams");
// Check if first child namespace is null
Assert.assertNull(params.getNamespaceURI());
// Check inner elements of the first child
SOAPElement param1 = (SOAPElement) params.getFirstChild();
Assert.assertEquals(param1.getLocalName(), "Param1");
Assert.assertNull(param1.getNamespaceURI());
SOAPElement param2 = (SOAPElement) params.getChildNodes().item(1);
Assert.assertEquals(param2.getLocalName(), "Param2");
Assert.assertNull(param2.getNamespaceURI());
// Check full content of SOAP body
Assert.assertEquals(nodeToText(request), EXPECTED_RESULT);
}
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:33,代码来源:SaajEmptyNamespaceTest.java
示例5: readAsSOAPMessage
import com.sun.xml.internal.ws.api.message.saaj.SAAJFactory; //导入依赖的package包/类
/**
* Default implementation that uses {@link #writeTo(ContentHandler, ErrorHandler)}
*/
@Override
public SOAPMessage readAsSOAPMessage() throws SOAPException {
return SAAJFactory.read(soapVersion, this);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:AbstractMessageImpl.java
示例6: create
import com.sun.xml.internal.ws.api.message.saaj.SAAJFactory; //导入依赖的package包/类
/**
* Creates a {@link Message} backed by a SAAJ {@link SOAPMessage} object.
*
* <p>
* If the {@link SOAPMessage} contains headers and attachments, this method
* does the right thing.
*
* @param saaj
* The SOAP message to be represented as a {@link Message}.
* Must not be null. Once this method is invoked, the created
* {@link Message} will own the {@link SOAPMessage}, so it shall
* never be touched directly.
*/
public static Message create(SOAPMessage saaj) {
return SAAJFactory.create(saaj);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:17,代码来源:Messages.java
注:本文中的com.sun.xml.internal.ws.api.message.saaj.SAAJFactory类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论