Generate SOAP service in mule using WSDL file - mule

i am trying to create a soap service in mule using a wsdl file. but i am getting following error -
Error generating from WSDL
Could not find velocity template file
org/apache/cxf/tools/wsdlto/frontend/jaxws/template/client.vm
Another thing:
In mule is there any tool to create WSDL file.
Is it necessary in mule that for every WSDL file it will create java classes.
I am facing little difficulties while doing top down(wsdl first) development. Please suggest me if there is any tutorial.

Mule's SOAP web service stack is based on CXF so use the code generator from CXF to generate client classes from each of your WSDLs.
This is described here: http://cxf.apache.org/docs/maven-cxf-codegen-plugin-wsdl-to-java.html
Also note that it's possible to call remote web services without generating client classes but it's very limited (only simple types can be used, no complex ones), see: http://www.mulesoft.org/documentation/display/current/WSDL+Connectors

Related

consuming standard SOAP Web Service using vb.net

I have consumed several wsdl services successfully, but am stuck now with this web service.
Am implementing Hotelston webservice which state :Hotelston.com API is a standard SOAP Web Service (WS) available at URL
http://www.hotelston.com/ws/HotelService?wsdl
I cant access the direct code of the webservice after i added the it as a reference in my application.
Please see the following MSDN articles for the exact details on how I added and used these web service references but still cant access it from the direct code.
How to: Add and Remove Web References
How to: Call a Web Service
For full API documentation of wsdl file through the link.
If you show all files in the project and expand the service reference out, Reference.cs is empty. This is likely because there are namespace errors in HotelService.wsdl ("ax23", specifically) that is causing the t4 template to fail to generate the service code. Bottom line, it's their fault, not yours.

Using Swagger for documenting RESTful services in Mule

I want to use swagger for documenting our RESTful APIs. Our Jersey classes will be consumed from the mule flow. To use swagger for documenting my API I need to use the servlet configuration as mentioned in here - https://github.com/wordnik/swagger-core/wiki/Java-JAXRS-Quickstart
As the Jersey classes are deployed in mule, there is no web.XML.
If you know how to configure swagger with Mule please let me know how to do that. I truly appreciate your feedback and suggestions.
I see two possible options, the latter being the one with the highest chance of success:
Run a Servlet container inside Mule, as demonstrated by the bookstore example provided with the standalone distribution, configuring web.xml as indicated and making sure you're using servlet not http inbound endpoints in your Mule configuration.
Generate at build time a static Swagger configuration using https://github.com/ryankennedy/swagger-jaxrs-doclet and serve it using the static resource message processor from the HTTP transport.

WCF WSDL Page Missing

I have been following along with the Aaron Skonnard videos on creating a WCF service. I have completed the tutorial found here and when finished the WSDL page that would normally be available to a consumer of this service is not found (page states that "Endpoint is not found").
I have found many references to this issue including adding a 'mex' endpoint, adding httpGetEnabled, etc. but nothing seems to work. I believe this is because the tutorial removes the service files from the website code behind and instead uses a reference to another project.
I like the way the service is created with this tutorial but need to know how to get this WSDL page to display properly so others can consume my service. Is this no longer the correct way to create services in .NET 4?
I don't think REST based services (WebAPI) create a WSDL at all. I beleive the WSDL is only for the SOAP based WCF services.

Generate WSDL web-service objects in SAP

is it possible with SAP to generate client stubs and transfer objects from a WSDL served by a .NET WCF web service? Or do I have to build my SOAP XML requests manually?
To be more on the point. I still have a WCF web service and the wsdl. I have no knowlege in SAP. So the question is. Is it possible and how can I create client service stubs and the transfer objects in SAP from my WSDL?
It's easy to create an ABAP client for an existing web service if you have access to the URL for obtaining the wsdl file or the wsdl file itself. See this link for an step by step tutorial wich is basically:
1- Generate proxy from wsdl using assitant
2- Use proxy generated in your ABAP program
Regards
You can use the WSDL from the wcf for this. You can get the WSDL as service.svc?wsdl. However at times, some SOAP client generator expect all the definitions of the SOAP/WSDL in a single call. For that you might have to look at the following pages:
http://weblogs.asp.net/pglavich/archive/2010/03/16/making-wcf-output-a-single-wsdl-file-for-interop-purposes.aspx
http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/f03b6e78-ef28-4692-8f19-62d2f2d3bc9c
WCF: how to generate a single WSDL document, without WSDL:import?

Communicating with third-party web services from .NET

In the current project I need to communicate with third-party web services from .NET. The difficult part is constructing SOAP messages and posting to the server. After googling enough I found by using SoapClient class I can easily construct/send/receive soap message but I think for that I've to add references to WSE assemblies and it is kind of obsolete.
Is it the right way to use SoapClient for this scenario or any other better ways there in WCF?
If the service provides a .wsdl file, you can have VS generate strongly-typed proxy/wrapper classes for you by adding a service reference (this is done using the command-line tool wsdl.exe). Right-click on your project in Visual Studio and select "Add Service Reference..." and enter the URL of the .wsdl file. "Add Service Reference..." will generate client classes with methods and strongly-typed request and response types corresponding to the methods defined in the web service definition. The proxies can be configured to allow both synchronous and asynchronous method invocation.
See this MSDN article for more details.