upgrading from mirth 1.8 to 3 - soap listener channel

jeudi 27 novembre 2014

Hi,

We are upgrading our mirth from ver 1.8 to 3 and having difficulties sending soap messages to a web service channel using Java apache axis call.

We keep on getting the error "Cannot find dispatch method for {http://ift.tt/1Ck4jMh;.

We saw that between ver 1.8 to ver 2 there was a change that transformed all soap listener channels to web service listener channels and therefore our soap request should be change, but maybe you can help us understand how exactly should it change?

we managed to send the request via a mirth WS sender channel with the following envelope:

<soapenv:Envelope xmlns:soapenv="http://ift.tt/z6MlKK; xmlns:ws="http://ift.tt/1Ck4jMl;

<soapenv:Header/>

<soapenv:Body>

<ws:acceptMessage>

<arg0>${XmlUtil.encode(${message.rawData})}</arg0>

</ws:acceptMessage>

</soapenv:Body>

</soapenv:Envelope>



So what we like to modify our request to have the same envelope.



here's our original code (request sender):



SOAPChannelStub stub = new SOAPChannelStub();



m_Operation = new org.apache.axis.description.OperationDesc();

org.apache.axis.description.OperationDesc oper;

org.apache.axis.description.ParameterDesc param;

oper = new org.apache.axis.description.OperationDesc();

oper.setName("acceptMessage");

param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("http://ift.tt/L4ziCw;, "input"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://ift.tt/WPkwi5;, "string"), java.lang.String.class, false, false);

param.setOmittable(true);

param.setNillable(true);

oper.addParameter(param);

oper.setReturnType(new javax.xml.namespace.QName("http://ift.tt/WPkwi5;, "string"));

oper.setReturnClass(java.lang.String.class);

oper.setReturnQName(new javax.xml.namespace.QName("http://ift.tt/L4ziCw;, "acceptMessage"+ "Result"));

oper.setStyle(org.apache.axis.constants.Style.WRAP PED);

oper.setUse(org.apache.axis.constants.Use.LITERAL) ;

m_Operation = oper;



org.apache.axis.client.Call _call = stub.createCall();

_call.setOperation(m_Operation);

_call.setUseSOAPAction(true);

_call.setSOAPActionURI("acceptMessage");

_call.setEncodingStyle(null);

_call.setProperty(org.apache.axis.client.Call.SEND _TYPE_ATTR, Boolean.FALSE);

_call.setProperty(org.apache.axis.AxisEngine.PROP_ DOMULTIREFS, Boolean.FALSE);

_call.setSOAPVersion(org.apache.axis.soap.SOAPCons tants.SOAP11_CONSTANTS);

_call.setOperationName(new javax.xml.namespace.QName("http://ift.tt/L4ziCw;, "acceptMessage"));

_call.setProperty("javax.xml.rpc.service.endpoint. address", "http://ift.tt/1vn2yHN;);

Object resp = _call.invoke(new java.lang.Object[] {XMLToSend});



Can you help us understand how should the code be modified in order to send soap messages to the new mirth?



Thanks in advanced,

Ofer





upgrading from mirth 1.8 to 3 - soap listener channel

0 commentaires:

Enregistrer un commentaire