Win a copy of Classic Computer Science Problems in Swift this week in the iOS forum!

Jim Akmer

Ranch Hand
+ Follow
since Jul 06, 2010
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jim Akmer

Hi Naren,

As I mentioned the project is in version base. It is not easy to just regenerate everything. I have to know which files I have to checkout etc.
I thought that for adding new operations it might be faster and less error prone to modify WSDL as Ivan mentions.
7 years ago

compare the new generated WSDL against the old and be very careful


Is this best done by a tool? WinMerge is hard to use for WSDL. Is there a similar tool for comparison?Because doing it manually for non-trivial WSDL is a real headache
7 years ago
My concern is, since it is a versioned project if I do it the wrong way I may not update a file and break something
7 years ago

Okay, in that case without necessarily needing to know which approach has been used so far, you can do in either way


If the current services were auto-generated by WSDL, and I add a service (or operation) starting from code, then I also need to manually modify the WSDL right? Since I can not use WSDL auto-generation
If the current services were created code-first, then I write the code and regenerate the WSDL
So it is seems to me, that it is not straightforward to do by just choosing either way.
Right?
7 years ago
Hi Naren,

When I said I wanted to create new web services, I used wrong phrasing. I edited my post.
What I meant was I need to add new operations in the existing services (i.e. ports).
So my concern is whether I should modify the WSDL to add the new operations or not.
7 years ago
Hi,

Usually the web services are done either using the code-first approach, or using the contract(i.e.WSDL) first approach. Some times a mixture of both is used (if needed) I guess.
The problem I have is the following:
I have to work on a project that uses web services extensively. Specifically axis stack.
The project is, of course a version-ed project inside a version-ed base.
I am not sure how, would I start to understand the approach that has been used to build the various web services so far.
I mean some files are auto-generated while others are not, so I am not sure if the web services were done via the code-first approach or the wsdl first approach.
Also if I want to add new operations in the existing web services, doesn't this matter to me? I mean in WSDL first approach I would have to modify the wsdl. In code first, I would not.
I want to figure it out myself (before start asking questions to the web service implementers) but I am not sure how to approach this.
So what is the best approach to understand how a project using web services was done and how would I work on it?
Note:I am new in axis2 (but not in web services)
Any advice is highly welcome
Thank you for your time.
7 years ago
Hi,

Could someone please explain what is the use of a TransportReceiver/TransportSender e.g. CommonsHTTPTransportSender in axis2?
Isn't the HTTP part being handled by the container e.g Tomcat?
What is the functionality of these transport classes then?
E.g. when in services.xml there is the following:

whys is it needed?

Could someone please help me on this?

Thanks!
7 years ago
Hi,

I would like to ask what is your opinion on Swing applications which construct the GUI via xml files that describe the layout.
For me it seems too much tedious.
I understand that you can change the GUI by updating the configuration file, but I am not sure if this is worth the trouble.
Am I wrong?
Is this approach something used often in commercial desktop applications?

Thank you.
7 years ago
CXF uses HTTP1.1 to send requests to web service. This means that persistent connections are being used, so connection will remain open (at least for a period).
If you need connections to be closed you should explicitely configure it with something like the following:
7 years ago
Hi,

I have asked this elsewhere but got no answer, so I will try again here.
When using a JAX-WS provider in payload mode
E.g.


how can I return a SOAP fault if the processing fails? Is it possible to do it when working directly on the xml payload?
If I was working in Message level (SOAP envelope) I know how to do it. I am not sure when I work on
I understand that if I throw an exception it will be mapped to a 500 Internal Error but what about faultstring, detail etc? How are they populated? How can I do it in xml level?

Thanks!
7 years ago
@Lester,Jimmy: Thank you for your comments. I will look into this more as you say. One last question though. In java the most frequent way to work with web services is using annotations. The WSDL is automatically generated by these annotations. In this case, how can the viewing of WSDL be restricted?

@Lester:

Public registries have pretty much been a failure, not a single one worth mentioning remains in existence today.


So what is the current replacement for registries in order to locate web services?
7 years ago
@Naren Chivukula:

This makes sense, if I presume the service provider is using some XML parser to read your request SOAP message than standard Web Services API.


Otherwise, if the response SOAP message is not a valid SOAP message then use any XML parser to read it.



I am not sure I understand these comments.
SOAP is XML. So any XML parser can be used to parse SOAP messages. Standard Web Services API use regular XML parsers under the hood(DOM or StAX); so I am not sure what you are saying here
7 years ago
@Jimmy Clark:

The details about using this service should be provided to authorized users from the owners of the service


Humans can typically read a WSDL file in a browser for reference purposes, unless there are implemented security mechanisms to prevent this.


I am not sure why someone would create security mechanisms to prevent the viewing of a WSDL file. Especially since:
1) the intention of web services are to be located via public registries and
2) The WSDL just describes an interface. If the methods provided offer access to privileged operation some kind of runtime authentication would be created.
Could you please elaborate on your point and give a specific example? Because I have never thought/read of this before, i.e. restrict viewing of WSDL.
For example using annotations in java code WSDL is automatically generated and viewable by browser. Is the restriction of the viewing of WSDL configurable in the common case of annotating classes?

Thanks
7 years ago
@Ruchira Ghosh: The namespace send in the request is the same as the one in your WSDL. But why is the is send in the request? It is usually send to support inheritance.
Is it possible to send the request without the xsi:type?
If I understood your original question, the web service rejects the request because of the xsi:type.
7 years ago