}
private void invokeFaultService(PartnerRoleMessageExchange prmx) {
QName errorMsgType = new QName(FAULT_NS,"errorMessage");
QName responseMsgType = new QName(FAULT_NS,"faultMessage");
Message faultMsg = prmx.createMessage(errorMsgType);
Message responseMsg = prmx.createMessage(responseMsgType);
String ind1 = prmx.getRequest().getPart("faultIndicator1").getTextContent();
String ind2 = prmx.getRequest().getPart("faultIndicator2").getTextContent();
String inputData = prmx.getRequest().getPart("faultData").getTextContent();
StringBuffer faultData = new StringBuffer("<message><errorID>FA-1</errorID><errorText>");
faultData.append(inputData);
faultData.append("</errorText></message>");
StringBuffer responseData = new StringBuffer("<message><faultName>FA-NoFault</faultName><faultData>");
responseData.append(inputData);
responseData.append("</faultData></message>");
Element faultResponse = null;
Element response = null;
try {
faultResponse = DOMUtils.stringToDOM(faultData.toString());
response = DOMUtils.stringToDOM(responseData.toString());
} catch (SAXException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
// TODO: Question - how does one set parts that are of a simple xsd type?
faultMsg.setMessage(faultResponse);
responseMsg.setMessage(response);
if ( ind1.equals("yes")){
prmx.replyWithFault(new QName(FAULT_NS,"FaultMessage1"), faultMsg);
} else {
if ( ind2.equals("yes")){