本文整理汇总了Java中javax.wsdl.BindingOperation.getBindingInput方法的典型用法代码示例。如果您正苦于以下问题:Java BindingOperation.getBindingInput方法的具体用法?Java BindingOperation.getBindingInput怎么用?Java BindingOperation.getBindingInput使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.wsdl.BindingOperation
的用法示例。
在下文中一共展示了BindingOperation.getBindingInput方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getRPCRequestMethodName
import javax.wsdl.BindingOperation; //导入方法依赖的package包/类
/**
* Returns a qualified name for a RPC method that is a root element for a SOAPBody.
*
* @param portName a port name of the operation
* @param operationName an operation name
*
* @return QName wrapper that is qualified name of the method or null if no method to be defined (not "rpc" operation style)
*
* @throws UnknownOperationException
*/
@Override
public QName getRPCRequestMethodName(String portName, String operationName) throws UnknownOperationException {
if (portName == null) {
portName = findPort(operationName);
}
BindingOperation bindingOperation = getBindingOperation(portName, operationName);
String style = getOperationStyle(portName, operationName);
if ("rpc".equals(style)) {
BindingInput bindingInput = bindingOperation.getBindingInput();
if (bindingInput != null) {
String namespace = getNamespaceURI(bindingInput);
if (namespace != null) {
return new QName(namespace, operationName);
}
}
return new QName(operationName);
}
return null;
}
示例2: parseRequest
import javax.wsdl.BindingOperation; //导入方法依赖的package包/类
public WSDLAwareMessage parseRequest() throws AxisFault {
/**
* I assume that local part of the Axis Operation's name is always equal to
* the operation name in the WSDL.
*/
BindingOperation bindingOp = wsdlBinding.getBindingOperation(
wsdlBinding.getPortType().getOperation(
inMessageCtx.getAxisOperation().getName().getLocalPart(),
null,
null).getName(),
null,
null);
if (bindingOp == null) {
throw new AxisFault("WSDL binding operation not found for service: " +
serviceName.getLocalPart() + " port: " + portName);
}
BindingInput bindingInput = bindingOp.getBindingInput();
if (bindingInput == null) {
throw new AxisFault("BindingInput not found for service: " +
serviceName.getLocalPart() + " port: " + portName);
}
return processMessageParts(bindingInput);
}
示例3: getAttachmentFromBinding
import javax.wsdl.BindingOperation; //导入方法依赖的package包/类
/**
* This method will process a WSDL Binding and build AttachmentDescription objects if the
* WSDL dicatates attachments.
*/
public static void getAttachmentFromBinding(OperationDescriptionImpl opDesc, Binding binding) {
if (binding != null) {
Iterator bindingOpIter = binding.getBindingOperations().iterator();
while (bindingOpIter.hasNext()) {
BindingOperation bindingOp = (BindingOperation) bindingOpIter.next();
// found the BindingOperation that matches the current OperationDescription
if (bindingOp.getName().equals(opDesc.getName().getLocalPart())) {
if (bindingOp.getBindingInput() != null) {
if (log.isDebugEnabled()) {
log.debug("Processing binding opertion input");
}
processBindingForMIME(bindingOp.getBindingInput().getExtensibilityElements(),
opDesc, bindingOp.getOperation(), true);
}
if (bindingOp.getBindingOutput() != null) {
if (log.isDebugEnabled()) {
log.debug("Processing binding output");
}
processBindingForMIME(bindingOp.getBindingOutput().getExtensibilityElements(),
opDesc, bindingOp.getOperation(), false);
}
}
}
}
}
示例4: getSoapInputUse
import javax.wsdl.BindingOperation; //导入方法依赖的package包/类
@Override
public String getSoapInputUse(String portName, String operationName) throws UnknownOperationException {
if (portName == null) {
portName = findPort(operationName);
}
BindingOperation bindingOperation = getBindingOperation(portName, operationName);
BindingInput bindingInput = bindingOperation.getBindingInput();
if (bindingInput != null) {
return getUse(bindingInput);
}
return null;
}
示例5: getBindingInput
import javax.wsdl.BindingOperation; //导入方法依赖的package包/类
private static BindingInput getBindingInput(BindingOperation bindingOp) {
BindingInput bindingInput = bindingOp.getBindingInput();
if (bindingInput == null) {
throw new NullPointerException("BindingInput is null.");
}
return bindingInput;
}
示例6: createSoapRequest
import javax.wsdl.BindingOperation; //导入方法依赖的package包/类
public void createSoapRequest(MessageContext msgCtx, Element message, Operation op)
throws AxisFault {
if (op == null) {
throw new NullPointerException("Null operation");
}
// The message can be null if the input message has no part
if (op.getInput().getMessage().getParts().size() > 0 && message == null) {
throw new NullPointerException("Null message.");
}
if (msgCtx == null) {
throw new NullPointerException("Null msgCtx");
}
BindingOperation bop = binding.getBindingOperation(op.getName(), null, null);
if (bop == null) {
throw new OdeFault("BindingOperation not found.");
}
BindingInput bi = bop.getBindingInput();
if (bi == null) {
throw new OdeFault("BindingInput not found.");
}
SOAPEnvelope soapEnv = msgCtx.getEnvelope();
if (soapEnv == null) {
soapEnv = soapFactory.getDefaultEnvelope();
msgCtx.setEnvelope(soapEnv);
}
// createSoapHeaders(soapEnv, getSOAPHeaders(bi), op.getInput().getMessage(), message);
SOAPBody soapBody = getSOAPBody(bi);
if (soapBody != null) {
org.apache.axiom.soap.SOAPBody sb = soapEnv.getBody() == null ?
soapFactory.createSOAPBody(soapEnv) : soapEnv.getBody();
createSoapBody(sb, soapBody, op.getInput().getMessage(), message, op.getName());
}
}
示例7: getBindingInputNamespace
import javax.wsdl.BindingOperation; //导入方法依赖的package包/类
/**
* This method will return the namespace for the BindingInput that this operation
* specifies. It will first look for a namespace on the WSDL Binding object and then
* default to the web service's target namespace.
*/
public String getBindingInputNamespace() {
String tns = null;
Binding binding =
this.getEndpointInterfaceDescriptionImpl()
.getEndpointDescriptionImpl()
.getWSDLBinding();
if (binding != null) {
if (log.isDebugEnabled()) {
log.debug("Found WSDL binding");
}
// this call does not support overloaded WSDL operations as it
// does not specify the name of the input and output messages
BindingOperation bindingOp =
binding.getBindingOperation(getOperationName(), null, null);
if (bindingOp != null && bindingOp.getBindingInput() != null) {
if (log.isDebugEnabled()) {
log.debug("Found WSDL binding operation and input");
}
tns = getBindingNamespace(bindingOp.getBindingInput());
if (tns != null && log.isDebugEnabled()) {
log.debug("For operation: " + bindingOp.getName()
+ " returning the following namespace for input message"
+ " from WSDL: " + tns);
}
}
}
if (tns == null) {
tns = getEndpointInterfaceDescription().getTargetNamespace();
if (log.isDebugEnabled()) {
log.debug("For binding input returning @WebService.targetNamespace: " + tns);
}
}
return tns;
}
示例8: getSOAPHeaders
import javax.wsdl.BindingOperation; //导入方法依赖的package包/类
/**
* Build a HashSet of SOAP header names for the specified operation and binding.
*
* @param binding WSDL Binding instance.
* @param operationName Name of the operation.
* @return HashSet of soap header names, empty set if no headers present.
*/
protected static HashSet<String> getSOAPHeaders(Binding binding, String operationName) {
List<ExtensibilityElement> headers = new ArrayList<ExtensibilityElement>();
BindingOperation bindingOperation = binding.getBindingOperation(operationName, null, null);
if (bindingOperation == null) {
throw new IllegalArgumentException("Can not find operation: " + operationName);
}
BindingInput bindingInput = bindingOperation.getBindingInput();
if (bindingInput != null) {
headers.addAll(WsdlUtils.findExtensibilityElements(bindingInput, SOAP_HEADER_ELEMENT_NAME));
}
BindingOutput bindingOutput = bindingOperation.getBindingOutput();
if (bindingOutput != null) {
headers.addAll(WsdlUtils.findExtensibilityElements(bindingOutput, SOAP_HEADER_ELEMENT_NAME));
}
HashSet<String> headerSet = new HashSet<String>(headers.size());
for (ExtensibilityElement element : headers) {
if (element instanceof SOAP12Header) {
headerSet.add(((SOAP12Header)element).getPart());
} else {
headerSet.add(((SOAPHeader)element).getPart());
}
}
return headerSet;
}
示例9: getSOAPHeaders
import javax.wsdl.BindingOperation; //导入方法依赖的package包/类
/**
* Build a HashSet of SOAP header names for the specified operation and binding.
*
* @param binding
* WSDL Binding instance.
* @param operationName
* Name of the operation.
* @return HashSet of soap header names, empty set if no headers present.
*/
protected static HashSet<String> getSOAPHeaders( Binding binding, String operationName ) {
List<ExtensibilityElement> headers = new ArrayList<ExtensibilityElement>();
BindingOperation bindingOperation = binding.getBindingOperation( operationName, null, null );
if ( bindingOperation == null ) {
throw new IllegalArgumentException( "Can not find operation: " + operationName );
}
BindingInput bindingInput = bindingOperation.getBindingInput();
if ( bindingInput != null ) {
headers.addAll( WsdlUtils.findExtensibilityElements( bindingInput, SOAP_HEADER_ELEMENT_NAME ) );
}
BindingOutput bindingOutput = bindingOperation.getBindingOutput();
if ( bindingOutput != null ) {
headers.addAll( WsdlUtils.findExtensibilityElements( bindingOutput, SOAP_HEADER_ELEMENT_NAME ) );
}
HashSet<String> headerSet = new HashSet<String>( headers.size() );
for ( ExtensibilityElement element : headers ) {
if ( element instanceof SOAP12Header ) {
headerSet.add( ( (SOAP12Header) element ).getPart() );
} else {
headerSet.add( ( (SOAPHeader) element ).getPart() );
}
}
return headerSet;
}
示例10: buildOperation
import javax.wsdl.BindingOperation; //导入方法依赖的package包/类
private OperationInfo buildOperation(OperationInfo operationInfo,
BindingOperation bindingOper) {
System.out.println("从一个BindingOperation对象(<wsdl:operation>)构建OperationInfo对象");
Operation oper = bindingOper.getOperation();
operationInfo.setTargetMethodName(oper.getName());
Vector operElems = findExtensibilityElement(bindingOper
.getExtensibilityElements(), "operation");
ExtensibilityElement operElem = (ExtensibilityElement) operElems
.elementAt(0);
if (operElem != null && operElem instanceof SOAPOperation) {
SOAPOperation soapOperation = (SOAPOperation) operElem;
operationInfo.setSoapActionURI(soapOperation.getSoapActionURI());
}
BindingInput bindingInput = bindingOper.getBindingInput();
BindingOutput bindingOutput = bindingOper.getBindingOutput();
Vector bodyElems = findExtensibilityElement(bindingInput
.getExtensibilityElements(), "body");
ExtensibilityElement bodyElem = (ExtensibilityElement) bodyElems
.elementAt(0);
if (bodyElem != null && bodyElem instanceof SOAPBody) {
SOAPBody soapBody = (SOAPBody) bodyElem;
List styles = soapBody.getEncodingStyles();
String encodingStyle = null;
if (styles != null) {
encodingStyle = styles.get(0).toString();
}
if (encodingStyle == null) {
encodingStyle = DEFAULT_SOAP_ENCODING_STYLE;
}
operationInfo.setEncodingStyle(encodingStyle.toString());
operationInfo.setTargetObjectURI(soapBody.getNamespaceURI());
}
Input inDef = oper.getInput();
System.out.println("开始转移到了<wsdl:portTyp>结点下的<wsdl:input>");
if (inDef != null) {
Message inMsg = inDef.getMessage();
if (inMsg != null) {
operationInfo.setInputMessageName(inMsg.getQName().getLocalPart());
//输入消息的参数构建
getParameterFromMessage(operationInfo, inMsg, 1);
System.out.println("***操作:"+operationInfo.getTargetMethodName()+"的所有输入参数已经构建完毕***");
System.out.println("");
operationInfo.setInmessage(inMsg);
}
}
Output outDef = oper.getOutput();
if (outDef != null) {
Message outMsg = outDef.getMessage();
if (outMsg != null) {
operationInfo.setOutputMessageName(outMsg.getQName()
.getLocalPart());
//输出消息的参数构建
getParameterFromMessage(operationInfo, outMsg, 2);
System.out.println("***操作:"+operationInfo.getTargetMethodName()+"的所有输出参数已经构建完毕***");
System.out.println("");
operationInfo.setOutmessage(outMsg);
}
}
return operationInfo;
}
示例11: HeavyweightOperationInfoBuilder
import javax.wsdl.BindingOperation; //导入方法依赖的package包/类
public HeavyweightOperationInfoBuilder(BindingOperation bindingOperation, ServiceEndpointMethodMapping methodMapping, JavaWsdlMapping mapping, XmlSchemaInfo schemaInfo) throws OpenEJBException {
Operation operation = bindingOperation.getOperation();
this.operationName = operation.getName();
this.operationStyle = JaxRpcOperationInfo.OperationStyle.valueOf(operation.getStyle().toString());
this.outputMessage = operation.getOutput() == null ? null : operation.getOutput().getMessage();
this.inputMessage = operation.getInput().getMessage();
// faults
for (Object o : operation.getFaults().values()) {
faults.add((Fault) o);
}
this.mapping = mapping;
this.methodMapping = methodMapping;
this.schemaInfo = schemaInfo;
// index types - used to process build exception class constructor args
for (JavaXmlTypeMapping javaXmlTypeMapping : mapping.getJavaXmlTypeMapping()) {
String javaClassName = javaXmlTypeMapping.getJavaType();
if (javaXmlTypeMapping.getAnonymousTypeQname() != null) {
String anonymousTypeQName = javaXmlTypeMapping.getAnonymousTypeQname();
anonymousTypes.put(anonymousTypeQName, javaClassName);
} else if (javaXmlTypeMapping.getRootTypeQname() != null) {
QName qname = javaXmlTypeMapping.getRootTypeQname();
publicTypes.put(qname, javaClassName);
}
}
// BindingStyle
if (methodMapping.getWrappedElement() != null) {
bindingStyle = BindingStyle.DOCUMENT_LITERAL_WRAPPED;
} else {
BindingInput bindingInput = bindingOperation.getBindingInput();
SOAPOperation soapOperation = JaxRpcServiceInfoBuilder.getExtensibilityElement(SOAPOperation.class, bindingOperation.getExtensibilityElements());
String styleString = soapOperation.getStyle();
if (styleString == null) {
SOAPBinding soapBinding = JaxRpcServiceInfoBuilder.getExtensibilityElement(SOAPBinding.class, bindingInput.getExtensibilityElements());
styleString = soapBinding.getStyle();
}
SOAPBody soapBody = JaxRpcServiceInfoBuilder.getExtensibilityElement(SOAPBody.class, bindingInput.getExtensibilityElements());
String useString = soapBody.getUse();
bindingStyle = BindingStyle.getBindingStyle(styleString, useString);
}
}