parts = new Vector();
for (Iterator i = partNames.iterator(); i.hasNext();) {
String partName = (String) i.next();
Part part = input.getMessage().getPart(partName);
if (part == null) {
throw new WSIFException(
"no input part named "
+ partName
+ " for binding operation "
+ getName());
}
parts.add(part);
}
} else {
parts = input.getMessage().getOrderedParts(null);
}
int count = parts.size();
names = new String[count];
types = new Class[count];
// get parts in correct order
for (int i = 0; i < count; ++i) {
Part part = (Part) parts.get(i);
names[i] = part.getName();
QName partType = part.getTypeName();
if (partType == null)
partType = part.getElementName();
if (partType == null) {
throw new WSIFException(
"part " + names[i] + " must have type name declared");
}
org.apache.soap.util.xml.QName qname =
new org.apache.soap.util.xml.QName(
partType.getNamespaceURI(),
partType.getLocalPart());
try {
types[i] = (Class) mapOfUserTypes.get(qname);
} catch (Throwable ignored) {
Trc.ignoredException(ignored);
}
if (types[i] == null) {
try {
types[i] =
(Class) smr.queryJavaType(
qname,
inputEncodingStyle);
} catch (Throwable exn) {
if (types[i] == null) {
try {
String packageName =
WSIFUtils.getPackageNameFromNamespaceURI(
qname.getNamespaceURI());
String className =
WSIFUtils.getJavaClassNameFromXMLName(
qname.getLocalPart());
Class inputClass = null;
try {
inputClass =
Class.forName(
packageName + "." + className,
true,
Thread
.currentThread()
.getContextClassLoader());
} catch (ClassNotFoundException exn5) {
inputClass =
Class.forName(
packageName
+ "."
+ className
+ "Element",
true,
Thread
.currentThread()
.getContextClassLoader());
}
types[i] = inputClass;
if ("literal".equals(inputUse)) {
smr.mapTypes("literal", qname, inputClass, partSer, partSer);
} else {
smr.mapTypes(
Constants.NS_URI_SOAP_ENC,
qname,
inputClass,
beanSer,
beanSer);
}
mapSubtypes(inputClass, beanSer, partSer, smr, inputUse);
} catch (ClassNotFoundException exn1) {
Trc.ignoredException(exn1);
}
}
}
}
}
} else {
names = new String[0];
types = new Class[0];
}
// now prepare return value
Output output = operation.getOutput();
if (output != null) {
Part returnPart = null;
if (returnName != null) {
returnPart = output.getMessage().getPart(returnName);
if (returnPart == null) {
throw new WSIFException(
"no output part named "
+ returnName
+ " for bining operation "
+ getName());
}