return nlaIdElement.getText();
}
public PartyBean getPartyRegistryObject(String nlaId) {
if (!isConfigured()) {
throw new WSException("call serviceInit first before getPartyRegistryObject.");
}
try {
OperationClient operationClient = _serviceClient.createClient(operations[1].getName());
operationClient.getOptions().setAction(ACTION_GET_PARTY_OBJECT);
operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);
// operationClient.getOptions().setProperty(WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR, "&");
// create a message context
MessageContext messageContext = new org.apache.axis2.context.MessageContext();
// create SOAP envelope with that payload
org.apache.axiom.soap.SOAPEnvelope env = null;
SOAPFactory factory = getFactory(operationClient.getOptions().getSoapVersionURI());
env = createEnvelope(factory, ACTION_GET_PARTY_OBJECT, nlaId);
// System.out.println("=== sending envelope: " + env);
// adding SOAP soap_headers
_serviceClient.addHeadersToEnvelope(env);
// set the message context with that soap envelope
messageContext.setEnvelope(env);
// add the message contxt to the operation client
operationClient.addMessageContext(messageContext);
// execute the operation client
operationClient.execute(true);
MessageContext returnMessageContext = operationClient.getMessageContext(org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);
SOAPEnvelope _returnEnv = returnMessageContext.getEnvelope();
return parseParty(_returnEnv);
} catch (AxisFault axe) {
OMElement fault = axe.getDetail();
if (fault != null) {
String message = fault.getFirstElement().getText();
throw new WSException(message);
} else {
throw new WSException(axe);
}
} catch (Exception e) {
loger.error("research master ws failed, " + e);
throw new WSException(e);
} finally {
try {
if (_serviceClient != null) {
_serviceClient.cleanupTransport();
}