web stats
Web Service Sender (WDSL and SOAP) for Vodafone RedBox - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 04-25-2016, 02:12 AM
jacalvet jacalvet is offline
What's HL7?
 
Join Date: Apr 2011
Posts: 3
jacalvet is on a distinguished road
Default Web Service Sender (WDSL and SOAP) for Vodafone RedBox

Hello

We're developing a Mirth Connect channel for sending SMS to patients. The SMS platform is Vodafone RedBox.

They work with a Web Service with WSDL protocol and SOAP content. The SOAP Envelope we send is

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://www.vodafone.com/soap/types/">
<soapenv:Header/>
<soapenv:Body>
<typ:sendSmsMt>
<typ:messageHeader>
<typ:authentication>
<typ:name>${user}</typ:name>
<typassword>${password}</typassword>
</typ:authentication>
<typ:service>
<typ:serviceType>SMS</typ:serviceType>
<typ:serviceId>${serviceId}</typ:serviceId>
<typ:subserviceId>${subserviceId}</typ:subserviceId>
</typ:service>
</typ:messageHeader>
<typ:messageData>
<typ:source>
<typ:sourceTON>0</typ:sourceTON>
<typ:sourceNPI>0</typ:sourceNPI>
</typ:source>
<typ:dest>
<typ:destAddress>${phone}</typ:destAddress>
</typ:dest>
<typ:msgContent>
<typ:bodyIsText>true</typ:bodyIsText>
<typ:smsMessageBody>${sms}</typ:smsMessageBody>
</typ:msgContent>
<typ:msgFeature>
<typ:deliveryReport>FALSE</typ:deliveryReport>
</typ:msgFeature>
</typ:messageData>
</typ:sendSmsMt>
</soapenv:Body>
</soapenv:Envelope>

At the transformer we populate $ variables with the correct data.

The Web Service doesn't allow to get methods directly from it, so they sent me a .wdsl file with structure. The connector configuration is:

Connector Type: Web Service Sender
WDSL URL: http://localhost:8080/messagesendingws.wsdl (the file they sent)
Service: {http://www.vodafone.com/soap/wsdl/}MessageSendingService
Port/Endpoint: {http://www.vodafone.com/soap/wsdl/}MessageSendingServicePort
Location URI: http://62.87.93.65 (here is the Web Service URL)

Authentication: Yes
Username and password: those they gave us
Invocation Type: Two-Way (we expect an ACK response)
Operation: sendSmsMt
SOAP Action: sendSmsMt
SOAP Envelope: the one I put up here

When the channel starts, we have this error:

Web Service Sender error
ERROR MESSAGE: Error invoking web service
javax.xml.ws.WebServiceException: java.net.SocketException: Software caused connection abort: recv failed
at com.sun.xml.internal.ws.transport.http.client.Http ClientTransport.readResponseCodeAndMessage(Unknown Source)
at com.sun.xml.internal.ws.transport.http.client.Http TransportPipe.createResponsePacket(Unknown Source)
at com.sun.xml.internal.ws.transport.http.client.Http TransportPipe.process(Unknown Source)
at com.sun.xml.internal.ws.transport.http.client.Http TransportPipe.processRequest(Unknown Source)
at com.sun.xml.internal.ws.transport.DeferredTranspor tPipe.processRequest(Unknown Source)
at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Unk nown Source)
at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Unkn own Source)
at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Unkno wn Source)
at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Unk nown Source)
at com.sun.xml.internal.ws.client.Stub.process(Unknow n Source)
at com.sun.xml.internal.ws.client.dispatch.DispatchIm pl.doInvoke(Unknown Source)
at com.sun.xml.internal.ws.client.dispatch.DispatchIm pl.invoke(Unknown Source)
at com.mirth.connect.connectors.ws.WebServiceDispatch er$DispatchTask.call(WebServiceDispatcher.java:734 )
at com.mirth.connect.connectors.ws.WebServiceDispatch er.send(WebServiceDispatcher.java:555)
at com.mirth.connect.donkey.server.channel.Destinatio nConnector.handleSend(DestinationConnector.java:77 8)
at com.mirth.connect.donkey.server.channel.Destinatio nConnector.process(DestinationConnector.java:437)
at com.mirth.connect.donkey.server.channel.Destinatio nChain.doCall(DestinationChain.java:121)
at com.mirth.connect.donkey.server.channel.Destinatio nChain.call(DestinationChain.java:63)
at com.mirth.connect.donkey.server.channel.Channel.pr ocess(Channel.java:1706)
at com.mirth.connect.donkey.server.channel.Channel.di spatchRawMessage(Channel.java:1189)
at com.mirth.connect.donkey.server.channel.SourceConn ector.dispatchRawMessage(SourceConnector.java:192)
at com.mirth.connect.donkey.server.channel.SourceConn ector.dispatchRawMessage(SourceConnector.java:170)
at com.mirth.connect.connectors.jdbc.DatabaseReceiver .processRecord(DatabaseReceiver.java:201)
at com.mirth.connect.connectors.jdbc.DatabaseReceiver .processResultSet(DatabaseReceiver.java:161)
at com.mirth.connect.connectors.jdbc.DatabaseReceiver .poll(DatabaseReceiver.java:118)
at com.mirth.connect.donkey.server.channel.PollConnec torJob.execute(PollConnectorJob.java:49)
at org.quartz.core.JobRunShell.run(JobRunShell.java:2 13)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run (SimpleThreadPool.java:557)
Caused by: java.net.SocketException: Software caused connection abort: recv failed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at java.io.BufferedInputStream.fill(Unknown Source)
at java.io.BufferedInputStream.read1(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at sun.net.www.http.HttpClient.parseHTTPHeader(Unknown Source)
at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
at sun.net.http://www.protocol.http.HttpURLConn...tream0(Unknown Source)
at sun.net.http://www.protocol.http.HttpURLConn...Stream(Unknown Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
... 28 more

Their supporting team tells us that is our problem, and they haven't experience with Mirth.

What are we doing wrong?

Thank you very much
Reply With Quote
  #2  
Old 04-28-2016, 11:24 PM
jacalvet jacalvet is offline
What's HL7?
 
Join Date: Apr 2011
Posts: 3
jacalvet is on a distinguished road
Thumbs up Solved

Added header SOAPAction with value sendSmsMt and header Content-Type with value txt/XML; charset=UTF-8

Had the same solution using a JavaScript writer

var soapcontent = "My SOAP content";

var stringEntity = new Packages.org.apache.commons.httpclient.methods.Str ingRequestEntity(soapcontent, "text/xml", "UTF-8");

var httppost = new Packages.org.apache.commons.httpclient.methods.Pos tMethod('http://serv.prep.cdm.vodafone.es/soap/SOAPSMSWSDL');

httppost.setRequestHeader("SOAPAction", "sendSmsMt");

httppost.setRequestEntity(stringEntity);

var httpclient = new Packages.org.apache.commons.httpclient.HttpClient( );

try
{
var result = httpclient.executeMethod(httppost);

channelMap.put('resultado', result);

var ack = httppost.getResponseBodyAsString();

channelMap.put('ack', ack);
}
finally
{
httppost.releaseConnection();
}

But I will use the Web Service Sender because the more log information.
Reply With Quote
Reply

Tags
recv failed, soap, web service sender, wsdl

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 09:51 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation