本文整理汇总了Java中com.sun.xml.internal.ws.resources.ServerMessages.DISPATCH_CANNOT_FIND_METHOD属性的典型用法代码示例。如果您正苦于以下问题:Java ServerMessages.DISPATCH_CANNOT_FIND_METHOD属性的具体用法?Java ServerMessages.DISPATCH_CANNOT_FIND_METHOD怎么用?Java ServerMessages.DISPATCH_CANNOT_FIND_METHOD使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.sun.xml.internal.ws.resources.ServerMessages
的用法示例。
在下文中一共展示了ServerMessages.DISPATCH_CANNOT_FIND_METHOD属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getWSDLOperationMapping
public @NotNull WSDLOperationMapping getWSDLOperationMapping(Packet request) throws DispatchException {
WSDLOperationMapping opName;
for(WSDLOperationFinder finder: opFinders) {
opName = finder.getWSDLOperationMapping(request);
if(opName != null)
return opName;
}
//No way to dispatch this request
String err = MessageFormat.format("Request=[SOAPAction={0},Payload='{'{1}'}'{2}]",
request.soapAction, request.getMessage().getPayloadNamespaceURI(),
request.getMessage().getPayloadLocalPart());
String faultString = ServerMessages.DISPATCH_CANNOT_FIND_METHOD(err);
Message faultMsg = SOAPFaultBuilder.createSOAPFaultMessage(
binding.getSOAPVersion(), faultString, binding.getSOAPVersion().faultCodeClient);
throw new DispatchException(faultMsg);
}
示例2: getWSDLOperationMapping
/**
*
* @return not null if it finds a unique handler for the request
* null if it cannot idenitify a unique wsdl operation from the Payload QName.
*
* @throws DispatchException if the payload itself is incorrect, this happens when the payload is not accepted by
* any operation in the port.
*/
// public QName getWSDLOperationQName(Packet request) throws DispatchException{
public WSDLOperationMapping getWSDLOperationMapping(Packet request) throws DispatchException {
Message message = request.getMessage();
String localPart = message.getPayloadLocalPart();
String nsUri;
if (localPart == null) {
localPart = EMPTY_PAYLOAD_LOCAL;
nsUri = EMPTY_PAYLOAD_NSURI;
} else {
nsUri = message.getPayloadNamespaceURI();
if(nsUri == null)
nsUri = EMPTY_PAYLOAD_NSURI;
}
WSDLOperationMapping op = methodHandlers.get(nsUri, localPart);
// Check if payload itself is correct. Usually it is, so let us check last
if (op == null && !unique.containsKey(nsUri,localPart)) {
String dispatchKey = "{" + nsUri + "}" + localPart;
String faultString = ServerMessages.DISPATCH_CANNOT_FIND_METHOD(dispatchKey);
throw new DispatchException(SOAPFaultBuilder.createSOAPFaultMessage(
binding.getSOAPVersion(), faultString, binding.getSOAPVersion().faultCodeClient));
}
return op;
}
示例3: getWSDLOperationQName
/**
*
* @param request Packet
* @return QName of the wsdl operation.
* @throws DispatchException if a unique operartion cannot be associated with this packet.
*/
public @NotNull QName getWSDLOperationQName(Packet request) throws DispatchException {
QName opName;
for(WSDLOperationFinder finder: opFinders) {
opName = finder.getWSDLOperationQName(request);
if(opName != null)
return opName;
}
//No way to dispatch this request
String err = MessageFormat.format("Request=[SOAPAction={0},Payload='{'{1}'}'{2}]",
request.soapAction, request.getMessage().getPayloadNamespaceURI(),
request.getMessage().getPayloadLocalPart());
String faultString = ServerMessages.DISPATCH_CANNOT_FIND_METHOD(err);
Message faultMsg = SOAPFaultBuilder.createSOAPFaultMessage(
binding.getSOAPVersion(), faultString, binding.getSOAPVersion().faultCodeClient);
throw new DispatchException(faultMsg);
}
示例4: getWSDLOperationQName
/**
*
* @return not null if it finds a unique handler for the request
* null if it cannot idenitify a unique wsdl operation from the Payload QName.
*
* @throws DispatchException if the payload itself is incorrect, this happens when the payload is not accepted by
* any operation in the port.
*/
public QName getWSDLOperationQName(Packet request) throws DispatchException{
Message message = request.getMessage();
String localPart = message.getPayloadLocalPart();
String nsUri;
if (localPart == null) {
localPart = EMPTY_PAYLOAD_LOCAL;
nsUri = EMPTY_PAYLOAD_NSURI;
} else {
nsUri = message.getPayloadNamespaceURI();
if(nsUri == null)
nsUri = EMPTY_PAYLOAD_NSURI;
}
QName op = methodHandlers.get(nsUri, localPart);
// Check if payload itself is correct. Usually it is, so let us check last
if (op == null && !unique.containsKey(nsUri,localPart)) {
String dispatchKey = "{" + nsUri + "}" + localPart;
String faultString = ServerMessages.DISPATCH_CANNOT_FIND_METHOD(dispatchKey);
throw new DispatchException(SOAPFaultBuilder.createSOAPFaultMessage(
binding.getSOAPVersion(), faultString, binding.getSOAPVersion().faultCodeClient));
}
return op;
}