web stats
WSDL with XSD inline - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Thread Tools Display Modes
Old 03-13-2015, 12:10 PM
anand14 anand14 is offline
OBX.2 Kenobi
Join Date: Dec 2006
Posts: 54
Default 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
Reply With Quote
Old 03-13-2015, 02:16 PM
narupley's Avatar
narupley narupley is online now
Mirth Employee
Join Date: Oct 2010
Posts: 7,123
narupley is on a distinguished road

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.
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.

Last edited by narupley; 03-16-2015 at 06:41 AM.
Reply With Quote
Old 03-14-2015, 12:01 PM
anand14 anand14 is offline
OBX.2 Kenobi
Join Date: Dec 2006
Posts: 54

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

Reply With Quote
Old 03-20-2015, 08:50 AM
anand14 anand14 is offline
OBX.2 Kenobi
Join Date: Dec 2006
Posts: 54

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.
Reply With Quote

listener, mirth, webservice, wsdl, xsd

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 02:06 AM.

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