Unable to add WSDL file as a service reference in .Net Web Application Project

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Unable to add WSDL file as a service reference in .Net Web Application Project

vijaybhargavg

Hi,

When I am trying to add "AdapterMpi.wsdl" file as a service reference in .Net Web Application Project, getting 2826 warnings and 1 error as given in the attached 02_DotNet_Errors.txt file.

WSDL - Add Service Reference

Similar errors we are getting when trying to refer other WSDL files also.

Can anybody guide how to add service reference for these WSDL files in .Net project.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unable to add WSDL file as a service reference in .Net Web Application Project

Minh
Administrator
Hi Vijaybhargavg,

Since you are using .NET, have you try to download our schema binary(https://oss.sonatype.org/#nexus-search;quick~connectopensource)  and extract the jars in the same classpath directory of WSDL?  Below is sample structure:
Maven schema folder structure
+schemas:
++caqh
++directConfig
++nhinc
+wsdl:

If you prefer easier approach, clone our repo schema (https://github.com/CONNECT-Solution/Common-Types) and wsdl (https://github.com/CONNECT-Solution/CONNECT-Webservices) and download mvn to perform "mvn clean install" on COMMON-Type first and CONNECT-Webservices later.  This will output in the same directory as above.

Hope this will help you
Thanks,
Minh-Hai Nguyen
CONNECT Product Team Member
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unable to add WSDL file as a service reference in .Net Web Application Project

Sumanth
Hi Minh-Hai Nguyen,

Thank you for your response.

Based on above post, I have cloned our repo schema (https://github.com/CONNECT-Solution/Common-Types) and wsdl (https://github.com/CONNECT-Solution/CONNECT-Webservices). Then, downloaded mvn and performed "mvn clean install" on COMMON-Type first and CONNECT-Webservices later. After that I tried to consume AdapterPatientDiscovery.wsdl as service reference and also as web reference, but it was giving error as shown below


Can you guide us to consume those wsdl's and to communicate with connect software.

Thanks,
Vamsi
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unable to add WSDL file as a service reference in .Net Web Application Project

Minh
Administrator
Hi Vamsi,

Try to load wsdl from the target folder.  For your instance, it will locate under D:\ESMD\CONNECT-Webservices-master\PatientDiscovery\target\wsdl2java-sources\wsdl.  This wsdl has a refernces to other schema which defines as below:
<xsd:include schemaLocation="classpath:schemas/nhinc/hl7/RespondingGateway_PRPA_IN201305UV02Request.xsd"/>
Minh-Hai Nguyen
CONNECT Product Team Member
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unable to add WSDL file as a service reference in .Net Web Application Project

Sumanth
Hi Minh-Hai Nguyen,

I have found AdapterPatientDiscovery.wsdl in the following path D:\ESMD\CONNECT-Webservices-master\PatientDiscovery\target\wsdl2java-sources\wsdl and found the reference to the other schema as below:
<xsd:include schemaLocation="classpath:schemas/nhinc/hl7/RespondingGateway_PRPA_IN201305UV02Request.xsd"/>.

I tried to add AdapterPatientDiscovery.wsdl as service reference and got the below error and not able to add as reference


I tried to add AdapterPatientDiscovery.wsdl as web reference and got the below error and not able to add as reference


Do we need to change schemaLocation in <xsd:include schemaLocation="classpath:schemas/nhinc/hl7/RespondingGateway_PRPA_IN201305UV02Request.xsd"/>?

Thanks,
Vamsi
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unable to add WSDL file as a service reference in .Net Web Application Project

Sumanth
Hi Minh-Hai Nguyen,

We have downloaded Connect using "mvn clean install". Do we need to build connect using maven before consuming as service?

Can you give us your mail id to communicate with you.

Thanks,
Vamsi
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unable to add WSDL file as a service reference in .Net Web Application Project

Minh
Administrator
Hi Sumanth,

Can you try this alternative without modify schema and wsdl?  Try to download our binary 4.7 ftp://ftp.connectopensource.org/4.7.0/CONNECT-4.7.0-JB7.zip and unzip them.  

Inside there, you should see target folder that has wsdl and schema.  Try to load wsdl from there.  The wsdl should have some thing like this "<xsd:import namespace="urn:hl7-org:v3" schemaLocation="../schemas/nhinc/hl7/RespondingGateway_PRPA_IN201305UV02Request.xsd"/>" which point to the right path for schema.

Hope this will help.  
Minh-Hai Nguyen
CONNECT Product Team Member
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unable to add WSDL file as a service reference in .Net Web Application Project

Sumanth
Hi Minh-Hai Nguyen,

I have downloaded CONNECT-4.7.0-JB7 file from ftp://ftp.connectopensource.org/4.7.0/CONNECT-4.7.0-JB7.zip and included wsdl's to my application. But it didn't solve our problem.


I have searched many ways in your forum to use connect in .Net application, but I didn't find any threads for .Net application. Can you please provide links or references in order to use connect in .Net application.

Thanks,
Vamsi.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unable to add WSDL file as a service reference in .Net Web Application Project

Sovann Huynh
Administrator
Sorry for the delayed response. Is this still an issue?
Sovann
CONNECT Product Team Member
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unable to add WSDL file as a service reference in .Net Web Application Project

SaiVennelakanti
In reply to this post by Sumanth
I'm using .NET to build these services. we were able to do service reference only from the url with .svc file. I'm not sure if wsdl file based service reference works. for using wsdl based stuff there is a utility wsdl.exe. please try that.
BUT my sincere suggestion to all those implementing in .NET refrain from using the CONNECT data structures that are required for the CONNECT web services directly. It delays your project by many months. Instead use the MESSAGE class object and parse them using xpath. While calling the services of CONNECT use HTTPWEBREQUEST that is lot better and will work without any issues.
Loading...