Announcement

Collapse
No announcement yet.

Custom Web Service WSDL question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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="tnsefaultAcceptMessage">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="acceptMessage">
    <soapperation soapAction=""/>
    <input>
    <soap:body use="literal"/>
    </input>
    <output>
    <soap:body use="literal"/>
    </output>
    </operation>
    </binding>
    <service name="DefaultAcceptMessageService">
    <port name="DefaultAcceptMessagePort" binding="tnsefaultAcceptMessagePortBinding">
    <soap:address location="http://localhost:8081/services/mirth"/>
    </port>
    </service>
    </definitions>

  • #2
    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.

    Comment


    • #3
      Good catch I had the wrong Service Class Name defined.

      Updated that and all is good!!

      Thanks.

      Comment


      • #4
        Problems with class initialization in mirth when using Web service

        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
        Attached Files

        Comment


        • #5
          Originally posted by mtod View Post
          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="tnsefaultAcceptMessage">
          <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
          <operation name="acceptMessage">
          <soapperation soapAction=""/>
          <input>
          <soap:body use="literal"/>
          </input>
          <output>
          <soap:body use="literal"/>
          </output>
          </operation>
          </binding>
          <service name="DefaultAcceptMessageService">
          <port name="DefaultAcceptMessagePort" binding="tnsefaultAcceptMessagePortBinding">
          <soap:address location="http://localhost:8081/services/mirth"/>
          </port>
          </service>
          </definitions>

          hello,
          I have a WSDL and I want tp create a custom web service listener.

          how did you create the jar file from the wsdl?

          Comment

          Working...
          X