Mirth Community

Mirth Community (http://www.mirthcorp.com/community/forums/index.php)
-   Support (http://www.mirthcorp.com/community/forums/forumdisplay.php?f=6)
-   -   WSDL with XSD inline (http://www.mirthcorp.com/community/forums/showthread.php?t=13475)

anand14 03-13-2015 12:10 PM

WSDL with XSD inline
 
Use Case: Mirth Connect : 3.2.0.7628; 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

narupley 03-13-2015 02:16 PM

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.

anand14 03-14-2015 12:01 PM

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

Thanks

anand14 03-20-2015 08:50 AM

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.


All times are GMT -8. The time now is 04:58 PM.

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