String sstyle = getStyle();
if ("rpc".equals(sstyle)) {
Collection partNames = input.getMessage().getParts().values();
for (Iterator i = partNames.iterator(); i.hasNext();) {
Part part = (Part) i.next();
signature.add(part.getName());
}
} else {
/*
* WS-I Basic Profile 1.1 4.7.6 Operation Signatures Definition: operation signature
*
* The profile defines the "operation signature" to be the fully qualified name of the child element of SOAP body of the SOAP input
* message described by an operation in a WSDL binding.
*
* In the case of rpc-literal binding, the operation name is used as a wrapper for the part accessors. In the document-literal case,
* since a wrapper with the operation name is not present, the message signatures must be correctly designed so that they meet this
* requirement.
*
* An endpoint that supports multiple operations must unambiguously identify the operation being invoked based on the input message
* that it receives. This is only possible if all the operations specified in the wsdl:binding associated with an endpoint have a
* unique operation signature.
*
* R2710 The operations in a wsdl:binding in a DESCRIPTION MUST result in operation signatures that are different from one another.
*/
List<String> bodyParts = getSOAPBodyParts(true);
Collection<?> parts = input.getMessage().getParts().values();
// Exclude the parts to be transmitted in SOAP header
if (bodyParts == null) {
parts.removeAll(getInputHeaderParts());
}
for (Iterator i = parts.iterator(); i.hasNext();) {
Part part = (Part) i.next();
if (bodyParts == null) {
// All parts
QName elementName = part.getElementName();
if (elementName == null) {
elementName = new QName("", part.getName());
// TODO: [rfeng] throw new
// ServiceRuntimeException("Message part for
// document style must refer to an XSD element
// using a QName: " + part);
}
signature.add(elementName);
} else {
// "parts" in soap:body
if (bodyParts.contains(part.getName())) {
QName elementName = part.getElementName();
if (elementName == null) {
elementName = new QName("", part.getName());
// TODO: [rfeng] throw new
// ServiceRuntimeException("Message part for
// document style must refer to an XSD
// element using a QName: " + part);
}