Hi Everybody,
I really need to get this code working. I've posted 5 times regarding
this subject and had no reply at all. I would like to know if someone
knows how I could modify the code generated by the wsdl2java in order to
have a blocking dual client behaviour.
The code and the exception that I get follow.
I'm a bit frustrated about that!
Thanks very much about for any help!
Diego
=========================================================
Exception
=========================================================
Exception in thread "main" java.lang.NullPointerException
at
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:260)
at
org.astrodas.ws.peer.AstrodasPeerStub.insertMappingAnnotations(AstrodasPeerStub.java:128)
at
org.astrodas.ws.peer.AstrodasPeerProxy.insertMappingAnnotations(AstrodasPeerProxy.java:36)
at org.astrodas.test.Populate.populateLocal(Populate.java:239)
at org.astrodas.test.Populate.main(Populate.java:350)
=========================================================
Code
=========================================================
public InsertMappingAnnotationsResponseDocument
insertMappingAnnotations(InsertMappingAnnotationsDocument requestDoc)
throws RemoteException {
try {
OperationClient _operationClient =
_serviceClient.createClient(_operations[0].getName());
_operationClient.getOptions().setAction("insertMappingAnnotations");
_operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);
// Dual client
_operationClient.getOptions().setTransportInProtocol(Constants.TRANSPORT_HTTP);
_operationClient.getOptions().setUseSeparateListener(true);
_operationClient.getOptions().setAction("urn:echo");
_serviceClient.engageModule(new
javax.xml.namespace.QName(Constants.MODULE_ADDRESSING));
// create SOAP envelope with that payload
SOAPEnvelope env = null;
//Style is Doc.
env =
toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),
requestDoc,
optimizeContent(new
QName("","insertMappingAnnotations")));
// create message context with that soap envelope
MessageContext _messageContext = new MessageContext();
_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(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();
Object object = fromOM(getElement(_returnEnv, "document"),
InsertMappingAnnotationsResponseDocument.class,
getEnvelopeNamespaces(_returnEnv));
_messageContext.getTransportOut().getSender().cleanup(_messageContext);
return (InsertMappingAnnotationsResponseDocument) object;
} catch (AxisFault f) {...}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]