本文整理汇总了Java中javax.wsdl.BindingInput类的典型用法代码示例。如果您正苦于以下问题:Java BindingInput类的具体用法?Java BindingInput怎么用?Java BindingInput使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
BindingInput类属于javax.wsdl包,在下文中一共展示了BindingInput类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addWsdlBindingOperation
import javax.wsdl.BindingInput; //导入依赖的package包/类
private static void addWsdlBindingOperation(Definition definition, QName bindingQName, String projectName, String operationName, String operationComment) {
SOAPBodyImpl soapInputBody = new SOAPBodyImpl();
soapInputBody.setUse("literal");
BindingInput bindingInput = definition.createBindingInput();
bindingInput.addExtensibilityElement(soapInputBody);
SOAPBodyImpl soapOutputBody = new SOAPBodyImpl();
soapOutputBody.setUse("literal");
BindingOutput bindingOutput = definition.createBindingOutput();
bindingOutput.addExtensibilityElement(soapOutputBody);
SOAPOperationImpl soapOperation = new SOAPOperationImpl();
soapOperation.setSoapActionURI(projectName + "?" + operationName);
BindingOperation bindingOperation = definition.createBindingOperation();
bindingOperation.setName(operationName);
bindingOperation.addExtensibilityElement(soapOperation);
bindingOperation.setBindingInput(bindingInput);
bindingOperation.setBindingOutput(bindingOutput);
addWsdLDocumentation(definition, bindingOperation, operationComment);
Binding binding = definition.getBinding(bindingQName);
binding.addBindingOperation(bindingOperation);
}
示例2: getRPCRequestMethodName
import javax.wsdl.BindingInput; //导入依赖的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;
}
示例3: parseRequest
import javax.wsdl.BindingInput; //导入依赖的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);
}
示例4: processSoapHeaderParts
import javax.wsdl.BindingInput; //导入依赖的package包/类
private void processSoapHeaderParts(WSDLAwareMessage message, BindingInput bindingInput,
Operation op) throws AxisFault {
/* TODO: Analyze the header handling implementation */
List<SOAPHeader> headerDefs = getSOAPHeaders(bindingInput);
org.apache.axiom.soap.SOAPHeader soapHeader = inMessageCtx.getEnvelope().getHeader();
for (SOAPHeader headerDef : headerDefs) {
handleSoapHeaderPartDef(message, headerDef, op.getInput().getMessage(), soapHeader);
}
if (soapHeader != null) {
Iterator headersIter = soapHeader.getChildElements();
while (headersIter.hasNext()) {
OMElement header = (OMElement) headersIter.next();
String partName = findHeaderPartName(headerDefs, header.getQName());
//The following commented fix, avoids adding any of the headers. So that reverting
// back to old fix
// if (partName != null) {
// Fix for JIRA https://wso2.org/jira/browse/CARBON-5499
message.addHeaderPart(partName, header);
// }
}
}
}
示例5: makeHeaders
import javax.wsdl.BindingInput; //导入依赖的package包/类
private List<SOAPHeader> makeHeaders(Definition definition) throws WSDLException {
List<SOAPHeader> list = new ArrayList<SOAPHeader>();
String[] parts = new String[] { XTeeHeader.CLIENT.getLocalPart(), XTeeHeader.SERVICE.getLocalPart(),
XTeeHeader.USER_ID.getLocalPart(), XTeeHeader.ID.getLocalPart(),
XTeeHeader.PROTOCOL_VERSION.getLocalPart() };
ExtensionRegistry extReg = definition.getExtensionRegistry();
for (int i = 0; i < parts.length; i++) {
SOAPHeader header =
(SOAPHeader) extReg.createExtension(BindingInput.class, new QName(SOAP_11_NAMESPACE_URI, "header"));
header.setMessage(new QName(definition.getTargetNamespace(), XTeeWsdlDefinition.XROAD_HEADER));
header.setPart(parts[i]);
if (use.equalsIgnoreCase(LITERAL)) {
header.setUse(LITERAL);
} else {
header.setUse(ENCODED);
header.setEncodingStyles(Arrays.asList(ENCODING));
}
list.add(header);
}
return list;
}
示例6: createBindingInput
import javax.wsdl.BindingInput; //导入依赖的package包/类
public BindingInput createBindingInput() {
if (isDebugEnabled) {
log.debug(myClassName + ".createBindingInput()");
}
getWrappedDefinitionForUse();
BindingInput results = null;
if (wsdlDefinition != null) {
if (hasBeenSaved) {
hasBeenUpdatedSinceSaving = true;
}
results = wsdlDefinition.createBindingInput();
}
doneUsingWrappedDefinition();
return results;
}
示例7: getSoapInputUse
import javax.wsdl.BindingInput; //导入依赖的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;
}
示例8: createSOAPRequest
import javax.wsdl.BindingInput; //导入依赖的package包/类
/**
* Create SOAP Request message from request submitted by ODE engine.
*
* @param bpelMessageContext DTO containing details about current message flow
* @param odePartnerMessageExchange ODE PartnerRoleMessageExchange containing information about
* current external service invocation.
* @throws AxisFault If an error occurred while creating the SOAP request
*/
public static void createSOAPRequest(
final BPELMessageContext bpelMessageContext,
final PartnerRoleMessageExchange odePartnerMessageExchange) throws AxisFault {
checkForNullValuesInRequest(bpelMessageContext, odePartnerMessageExchange);
BindingOperation bindingOp = getBindingOperation(bpelMessageContext,
odePartnerMessageExchange.getOperationName());
BindingInput bindingInput = getBindingInput(bindingOp);
SOAPEnvelope soapEnvelope = bpelMessageContext.getInMessageContext().getEnvelope();
if (soapEnvelope == null) {
soapEnvelope =
bpelMessageContext.getSoapFactoryForCurrentMessageFlow().getDefaultEnvelope();
bpelMessageContext.getInMessageContext().setEnvelope(soapEnvelope);
}
populateSOAPHeaders(
odePartnerMessageExchange.getRequest(),
soapEnvelope,
bpelMessageContext.getSoapFactoryForCurrentMessageFlow(),
getSOAPHeaders(bindingInput),
odePartnerMessageExchange.getOperation());
populateSOAPBody(
soapEnvelope,
bindingInput,
bpelMessageContext.isSoap12(),
bpelMessageContext.getSoapFactoryForCurrentMessageFlow(),
odePartnerMessageExchange.getOperation(),
odePartnerMessageExchange.getOperation().getInput().getMessage(),
odePartnerMessageExchange.getRequest(),
bpelMessageContext.isRPCStyleOperation(),
true);
}
示例9: getBindingInput
import javax.wsdl.BindingInput; //导入依赖的package包/类
private static BindingInput getBindingInput(BindingOperation bindingOp) {
BindingInput bindingInput = bindingOp.getBindingInput();
if (bindingInput == null) {
throw new NullPointerException("BindingInput is null.");
}
return bindingInput;
}
示例10: createSoapRequest
import javax.wsdl.BindingInput; //导入依赖的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());
}
}
示例11: populateBindingInput
import javax.wsdl.BindingInput; //导入依赖的package包/类
@Override
protected void populateBindingInput(Definition definition, BindingInput bindingInput, Input input)
throws WSDLException {
for (SOAPHeader header : makeHeaders(definition)) {
bindingInput.addExtensibilityElement(header);
}
super.populateBindingInput(definition, bindingInput, input);
}
示例12: addQNameReference
import javax.wsdl.BindingInput; //导入依赖的package包/类
/**
* Add the QName for the binding input
*
* @param inMessage
* @param wsdl4jOperation
* @param bindingInput
* @param isWrapped - basically whether the operation is soap/rpc or not
*/
private void addQNameReference(AxisMessage inMessage,
Operation wsdl4jOperation, BindingInput bindingInput,
boolean isWrapped) {
List extensibilityElements = bindingInput.getExtensibilityElements();
Message wsdl4jMessage = wsdl4jOperation.getInput().getMessage();
addQNameReference(inMessage,
wsdl4jOperation,
isWrapped,
extensibilityElements,
wsdl4jMessage,
wsdl4jOperation.getName());
}
示例13: createBindingInput
import javax.wsdl.BindingInput; //导入依赖的package包/类
public BindingInput createBindingInput() {
if (isDebugEnabled) {
log.debug(myClassName + ".createBindingInput()");
}
if (wsdlDefinition != null) {
return wsdlDefinition.createBindingInput();
}
return null;
}
示例14: getBindingNamespace
import javax.wsdl.BindingInput; //导入依赖的package包/类
/**
* This method will retrieve the namespace that is specified by the BindingInput or
* BindingOutput object.
*/
private String getBindingNamespace(AttributeExtensible opInfo) {
if (opInfo instanceof BindingInput) {
BindingInput input = (BindingInput) opInfo;
return DescriptionUtils.getNamespaceFromSOAPElement(input.getExtensibilityElements());
} else if (opInfo instanceof BindingOutput) {
BindingOutput output = (BindingOutput) opInfo;
return DescriptionUtils.getNamespaceFromSOAPElement(output.getExtensibilityElements());
}
return null;
}
示例15: getSOAPHeaders
import javax.wsdl.BindingInput; //导入依赖的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;
}