本文整理汇总了Java中javax.jws.soap.SOAPBinding.Style.RPC属性的典型用法代码示例。如果您正苦于以下问题:Java Style.RPC属性的具体用法?Java Style.RPC怎么用?Java Style.RPC使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类javax.jws.soap.SOAPBinding.Style
的用法示例。
在下文中一共展示了Style.RPC属性的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getOperationElement
public QName getOperationElement() throws WebServiceException {
try {
if (style != Style.RPC) {
return null;
}
switch (contentType) {
case OM:
return ((org.apache.axiom.soap.SOAPEnvelope)content).getBody().
getFirstElement().getQName();
case SPINE:
return ((XMLSpine)content).getOperationElement();
case SOAPENVELOPE:
Iterator it = ((SOAPEnvelope)content).getBody().getChildElements();
while (it.hasNext()) {
Node node = (Node)it.next();
if (node instanceof SOAPElement) {
Name name = ((SOAPElement)node).getElementName();
return new QName(name.getURI(), name.getLocalName(), name.getPrefix());
}
}
}
return null;
} catch (SOAPException se) {
throw ExceptionFactory.makeWebServiceException(se);
}
}
示例2: _createEmptyEnvelope
/**
* Create an emtpy envelope
*
* @param protocol
* @param style
* @param factory
* @return
*/
private static SOAPEnvelope _createEmptyEnvelope(Style style, SOAPFactory factory) {
SOAPEnvelope env = factory.createSOAPEnvelope();
// Add an empty body and header
factory.createSOAPBody(env);
factory.createSOAPHeader(env);
// Create a dummy operation element if this is an rpc message
if (style == Style.RPC) {
OMNamespace ns = factory.createOMNamespace("", "");
factory.createOMElement("PLACEHOLDER_OPERATION", ns, env.getBody());
}
return env;
}
示例3: setStyle
public void setStyle(Style style) throws WebServiceException {
if (this.style != style) {
if (contentType == SPINE) {
// Must switch to something other than XMLSpine
getContentAsOMElement();
}
}
this.style = style;
if (style == Style.RPC) {
setIndirection(1);
} else {
setIndirection(0);
}
}
示例4: isRpcLit
/**
* Returns true if this is a rpc/literal binding
*/
public boolean isRpcLit() {
return style == Style.RPC && use == Use.LITERAL;
}
示例5: isRpcLit
public boolean isRpcLit(){
return Style.RPC==style;
}
示例6: isRpcLit
/**
* Determines if a {@link JavaMethod} is rpc/literal
* @param method The method to check
* @return true if method is rpc/literal, otherwise, false
*/
protected boolean isRpcLit(JavaMethodImpl method) {
return method.getBinding().getStyle() == Style.RPC;
}