web stats
Custom Web Service WSDL question - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Thread Tools Display Modes
Old 04-23-2014, 04:19 PM
mtod mtod is offline
OBX.2 Kenobi
Join Date: Aug 2013
Posts: 57
mtod is on a distinguished road
Default Custom Web Service WSDL question

I created a Custom Web Service using the example from http://www.mirthcorp.com/community/w...+Connect+3.0.1

Compiles fine and I can sent it data but I can only send it a single string within the arg0 element.

And when reviewing the WSDL it does not seem to match up to the methods.
Do I have to create a custom WSDL?

Note: This is on a Mirth Connect Appliance VM.


<?xml version="1.0" encoding="UTF-8"?>
<!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.2.4-b01. -->
<!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.2.4-b01. -->
<definitions name="DefaultAcceptMessageService" targetNamespace="http://ws.connectors.connect.mirth.com/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://ws.connectors.connect.mirth.com/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<xsd:import schemaLocation="http://localhost:8081/services/mirth?xsd=1" namespace="http://ws.connectors.connect.mirth.com/"/>
<message name="acceptMessage">
<part name="parameters" element="tns:acceptMessage"/>
<message name="acceptMessageResponse">
<part name="parameters" element="tns:acceptMessageResponse"/>
<portType name="DefaultAcceptMessage">
<operation name="acceptMessage">
<input message="tns:acceptMessage" wsam:Action="http://ws.connectors.connect.mirth.com/DefaultAcceptMessage/acceptMessageRequest"/>
<output message="tns:acceptMessageResponse" wsam:Action="http://ws.connectors.connect.mirth.com/DefaultAcceptMessage/acceptMessageResponse"/>
<binding name="DefaultAcceptMessagePortBinding" type="tnsefaultAcceptMessage">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="acceptMessage">
<soapperation soapAction=""/>
<soap:body use="literal"/>
<soap:body use="literal"/>
<service name="DefaultAcceptMessageService">
<port name="DefaultAcceptMessagePort" binding="tnsefaultAcceptMessagePortBinding">
<soap:address location="http://localhost:8081/services/mirth"/>
Reply With Quote
Old 04-24-2014, 06:30 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
Join Date: Oct 2010
Posts: 7,123
narupley is on a distinguished road

In your Web Service Listener channel, did you change the service class to "custom" and enter your fully-qualified class name?
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.

- How do I foo?
- You just bar.
Reply With Quote
Old 04-24-2014, 06:52 AM
mtod mtod is offline
OBX.2 Kenobi
Join Date: Aug 2013
Posts: 57
mtod is on a distinguished road

Good catch I had the wrong Service Class Name defined.

Updated that and all is good!!

Reply With Quote
Old 05-24-2016, 04:25 AM
onela onela is offline
What's HL7?
Join Date: May 2013
Posts: 1
onela is on a distinguished road
Default Problems with class initialization in mirth when using Web service


please, can someone help me, i have an issue, when uploading custom web service class, that extends AcceptMessage,
i get the error:
[2016-05-24 14:11:34,781] ERROR (com.mirth.connect.connectors.ws.WebServiceReceive r:101): Custom web service class initialization failed
java.lang.ClassNotFoundException: com.mirth.connect.connectors.ws.Customwebservice
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.mirth.connect.connectors.ws.WebServiceReceiver .onStart(WebServiceReceiver.java:83)
at com.mirth.connect.donkey.server.channel.SourceConn ector.start(SourceConnector.java:88)
at com.mirth.connect.donkey.server.channel.Channel$St artTask.call(Channel.java:1935)
at com.mirth.connect.donkey.server.channel.Channel$St artTask.call(Channel.java:1857)
at java.util.concurrent.FutureTask$Sync.innerRun(Unkn own Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (Unknown Source)
at java.lang.Thread.run(Unknown Source)

I tryed everything but nothing helps. I am using Netbeans, and java version is 1.6.0.

Here is my jar file.

Attached Files
File Type: jar JavaLibrary1.jar (1.1 KB, 37 views)
Reply With Quote

custom webservice, java

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 03:22 AM.

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