Mirth Community

Mirth Community (http://www.mirthcorp.com/community/forums/index.php)
-   Support (http://www.mirthcorp.com/community/forums/forumdisplay.php?f=6)
-   -   Custom Web Service WSDL question (http://www.mirthcorp.com/community/forums/showthread.php?t=10424)

mtod 04-23-2014 04:19 PM

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.

WSDL:

<?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">
<types>
<xsd:schema>
<xsd:import schemaLocation="http://localhost:8081/services/mirth?xsd=1" namespace="http://ws.connectors.connect.mirth.com/"/>
</xsd:schema>
</types>
<message name="acceptMessage">
<part name="parameters" element="tns:acceptMessage"/>
</message>
<message name="acceptMessageResponse">
<part name="parameters" element="tns:acceptMessageResponse"/>
</message>
<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"/>
</operation>
</portType>
<binding name="DefaultAcceptMessagePortBinding" type="tns:DefaultAcceptMessage">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="acceptMessage">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="DefaultAcceptMessageService">
<port name="DefaultAcceptMessagePort" binding="tns:DefaultAcceptMessagePortBinding">
<soap:address location="http://localhost:8081/services/mirth"/>
</port>
</service>
</definitions>

narupley 04-24-2014 06:30 AM

In your Web Service Listener channel, did you change the service class to "custom" and enter your fully-qualified class name?

mtod 04-24-2014 06:52 AM

Good catch I had the wrong Service Class Name defined.

Updated that and all is good!!

Thanks.

onela 05-24-2016 04:25 AM

Problems with class initialization in mirth when using Web service
 
1 Attachment(s)
Hi,

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.

Thanks


All times are GMT -8. The time now is 07:48 PM.

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