Spring Web Services - WSDL - web-services

In your wsdl, is it possible to connect directly to the wsdl(i.e - http://(url)?wsdl.
When I copy the wsdl locally to src/main/resources - I am able to connect generate objects including Web Service client, but when I try to connect to the WSDL that I copied from, I cannot generate. Perhaps I am not understanding QName and wsdllocation and even port for that matter.
I have searched fairly extensively on the web and there aren't that many clear cut examples. I know WebServiceTemplate makes things a LOT easier but without connecting to the WSDL, I cannot connect.
All I am trying to do is connect to the client. So it is a question more about Endpoints.
Also is it best practice to copy the WSDL locally. I am asking this because the client that we are working for has a 100 million environments.
Thanks.
Thanks

WSDL url will be like http://localhost:8080/<< Context-Name >>/<< ServiceName >>?wsdl
If you are generating the wsdl by running a server, then localhost:, should be given. If its a direct wsdl file, then try right clicking and opening it using a web browser. It will simply give you the link. You can use the same link to produce client stubs too.

Related

Accessing a SOAP service URL from a Clients point of view

I was asked this question in a technical interview for a integration intern role.
He was digging much into understanding of SOAP web services.
Question). Consider that you are exposing a web service through SOAP to a Client.
The url through which you are providing the service is up and running when you check it.
But the Client has a problem, he is not able to access your webservice.
How will you go on troubleshooting this issue?
My response:
I would first check whether the url the client is trying to access the service is correct.
Will check the .wsdl file: port, bindings & will check once whether upon sending a SOAP request to the URL, am I receiving the SOAP response in local through SOAP UI.
If I get error, will troubleshoot based on the kind of error I get: Like page not found, null exception etc.
I felt he was still expecting some other point. He hinted saying where in what registry you will check all the web services which have been hosted(I guess this was much of a production support issue :P)
I told I may look into UDDI registry, but was not sure with this.
Please let me know your inputs on what could be possibly a right approach?
Apache jUDDI PMC here. Yes UDDI could be used to verify that the client is pointed at the right location, assuming the client knows where the UDDI server and that it is registered and the client knows what to query for on the UDDI server and a UDDI query is part of that client's normal workflow. That's a lot of assumptions but certainly feasible.
Most of time, the endpoint is in a config file somewhere or some idiot hard coded it.
That said, this my go to list for checking SOAP service connectivity (from the client's perspective)
DNS resolution of the hostname in the URL
Ping the remote host
HTTP GET to the URL of the SOAP service + ?wsdl (this usually works). This is also a good time to verify SSL connectivity.
You can also parse the WSDL doc, assuming one is returned for identify the endpoint url.
Finally if that all works, execute the service. HTTP 200 is general a positive sign
Edit:
Another alternative approach is to implement a very simple API (wsdl method) on every SOAP service that simple returns a true/false that answers the question "Am I open for business?". This method would provide a standardized approach for identifying if a service was available or not by testing an external dependencies (databases and whatnot).

How to configure SOAP endpoint on my PC

I'm new at using SoapUI, I'd like to know if my machine supports SOAP and in case yes, what I can use as an endpoint for my newly created SoapUI project.
My machine is a Windows-10, and on top of that I have installed Cygwin (enabling some UNIX features).
Does somebody know how I can retrieve a possible value for an endpoint for my SoapUI project?
Oops, from the comment I have the impression that my question is badly formulated: on my PC I have a server application, of which I don't know if it supports SOAP (I know it supports HTTP because I'm using localhost in a browser to access it).
However when I use localhost or 127.0.0.1 as an endpoint in my SoapUI project, nothing happens (I see no response and the request log stays empty), hence my question.
Per default, mostly no application will act as a SOAP prodiver, as it is much more complicated as REST/http for example.
If your application has the capability of a SOAP provider, it is usually SOAP over HTTP. But you need to know the correct endpoint url address.
Not only 127.0.0.1
Usually there is a servicename in the url (and you can also try to show wsdl with ?wsdl), like http://127.0.0.1/myapplication/myservice?wsdl
when setting up a new soapui project, you also have to provide the wsdl location
(http://127.0.0.1/myapplication/myservice?wsdl)
Regards, rka

TomEE server is not passing web service request to the webmethod

I am new in the area of SOAP Based web services. I am using TomEE server. The server is a bit customized according to my organization's need.
Few days back, when I was trying to run the web services example from TomEE website, I was able to generate the wsdl and calling the web service by a client.
Now, when I need to use the customized version of TomEE plus (by the organization), I can see that the request does reach to the server and hence there is a log entry also but my #WebMethod is not getting executed.
Does any one has any idea about any configuration which can prevent the request from reaching to the webservice method? Is there any pointer around how can I debug further to reach out to the root cause of this issue?
Without further information about what is customized it's like fishing in the dark.
I would guess that perhaps the global web.xml or the server.xml of tomee server is changed so that some URI context mappings are not forwarded or ignored. But it's only a lucky tip.

WSDL link for testing Web Service

I would like to know, Is there any WSDL link for web service which is running on HTTPS but not HTTP because I would like to test my client project whether it is working or not.
Please send me the link as soon as possible because it is really important for the project.
Thanks!
You can check with this WSDL. Its from Amazon:
https://fps.amazonaws.com/doc/2008-09-17/AmazonFPS.wsdl
I haven't checked it but it is on HTTPS.

Webservice Proxy from Adobe Flex

I am creating one Flex application which needs to show results from a webservice, hosted in our network itself. It's an internal application, but due to the strict secured environment, we need to open firewall to access other hosts or services.
For my application, I had opened the firewall from my server. But since Flex calls the webservice from the client, its impractical to open the firewall from all the clients.
I found we can use the proxy service of BlazeDS. I tried that also but didnt succeed. I did a vast search over the internet also, but failed on getting the detailed working way of the proxy service of BlazeDS. Do anyone know how this proxy works? Even we are calling the destination of the BlazeDS, will at any time Flex calls the WSDL url directly from the client?
Thanks in Advance,
Anoop