No announcement yet.

WSDL with XSD inline

  • Filter
  • Time
  • Show
Clear All
new posts

  • WSDL with XSD inline

    Use Case: Mirth Connect :; Java version: 1.6.0_45-b06 on a V1000 appliance

    We are using a Mirth channel that has a Custom WebService Listener. We extended the AcceptMessage class given by Mirth and called our service CustomAcceptMessage and we are able to accept messages via the Secure Web Service and process them.

    However, the WSDL generated has the schema in an XSD file.

    The customer wants to see the WSDL file as one entity with the schema definitions inside the WSDL. They are not willing to accept the presence of an XSD inside the WSDL.

    I believe, in JAX-WS, there is option to generate the schemas inline by using the wsgen -inlineSchemas but am not sure how to invoke that on the Mirth Connect WebService Listener connector.

    Is there an option to generate the WSDL and XSD in a single file on the Mirth instance? If that is not an option, is there something I could do in the customAcceptMessage class?
    I have checked the forums before I posted this question.

    Thank you

  • #2
    First, note that Mirth Connect requires Java 7 or higher as of 3.2.

    Since you're using a custom webservice class, yeah there should definitely be a way to have it generate a single WSDL without any dependency files. That's more of a JAX-WS specific question though... I'm not sure off the top of my head.
    Last edited by narupley; 03-16-2015, 06:41 AM.
    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.


    • #3
      Thanks Nick! I will upgrade it to the Java version specified.

      I was not sure on if Mirth Connect generates the WSDL based on the Java class in the custom-lib folder? I ask because it automatically populates the WSDL URL.

      I checked my Eclipse IDE (where I developed the CustomAcceptMessage that extends AcceptMessage) but I can't find any info on the WSDL.

      I believe JAX-WS uses the wsgen -inlineSchemas command to generate the WSDL along with the XSD inline in the same file



      • #4
        I was able to find a workaround for this with some help from Mirth Support

        I just merged the WSDL and the XSD into a single file (manually) and used NotePad++ to make sure it was a valid document. I used this in the @Webservice annotation

        @WebService( wsdlLocation = "com/company/custom/ws/mergedSchema.wsdl")

        //@WebService(wsdlLocation = "/folders/mirthconnect/custom-lib/mergedSchema.wsdl")

        I was not able to get the /folder/mirthconnect/custom-lib/ path to work but I was able to get it working using the first option.

        Hope this helps someone else on the forums. By default, JAX-WS generates the WSDL and XSD separately. But some clients may want it inline.

        The only caveat is that if you make a change to the Java class, and if it changes the WSDL, you will have to modify this file manually.