[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Web Service: Sending Simple Type vs Complex Type

Posted on 2004-04-07
8
Medium Priority
?
746 Views
Last Modified: 2008-03-06
This query is more on the recommended practice in sending/receiving simple type over a complex type from a web service
 
Ex: WebService A has a method 'CalcualteTax' which takes 'Invoice' object as an input parameter and returns an invoice object. Now 'Invoice' is a complex type and if Java client needs to call 'CalcualteTax', it has to pass 'Invoice' as the parameter. I understand to do this, the Java need to construct a class based on the WSDLs description of 'Invoice' complex type. If the data were accepted as an xml doc/string simple type, then there would not be any issue in terms of deciphering a data type.
 
My question: WOuld there be any performance overhead in sending complex types over simple type. I pesonally feel there would be an overhead in serializing and deserializing a complext type.
 
Any input on the above is highly appreciated
0
Comment
Question by:salur
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
8 Comments
 
LVL 4

Expert Comment

by:Jarodtweiss
ID: 10781519
Is there a problem to send / receive complex type ?
Absolutely not.
I now have a .NET program, communicating with JAVA web services, using complex types and it is perfectly ok ! And you are right the definition of those objects will be contained in a WSDL file and so Java or .NET will be able to instantiate them.

Is there an overhead ?
All communication is made in SOAP, and so all objects are serialized / deserialized. And so of course, a single integer will be serialized much more quicker than an array of 10 000 complex types, composed of other complex type.
But in the other hand, if you need such a result, there is no other way to do it !
So my advice is to use complex type if you need it. But if you can see some time consuming communication, maybe you can work directly with XML, do not instantiate objects at each side !
0
 

Author Comment

by:salur
ID: 10783571
Thanks a lot for your response.

One aspect I forgot to mention is of interoperability between various heterogenous systems. Would that not be an issue if we use Complex types, wherein the platform might not support those types.

Keeping in mind, that in future we would be communicating with mobile devices as well, from your reeponse, I can infer that going for complex types, wherein performance would be of utmost importance, is not recommended.

Any thoughts on the above ?
0
 
LVL 4

Expert Comment

by:Jarodtweiss
ID: 10783620
for heterogeneous system, complex type are not a problem.
Indeed a complex type is composed of simple types at the end. If all of those simple type can be converted from one language to the other one (as for me, between Java and .NET), your complex type can be understood (it is "only" a composition)
Your language will properly "decrypt" the WSDL to build your custom object.


0
Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

 

Author Comment

by:salur
ID: 10783706
Let me rephrase my Q.

You mentioned that an integer would be serialized/de-serialized much faster than an complex types. If my web service would be accessed by a mobile app, wherein performance would be of utmost criteria, would you still recommend going for complex types.

I am basically trying to draw a line in concluding when to go for complex type and when not to. Communicating with Java is an example. But when I mean, heterogeneous system, it includes mainframe, legacy microsoft, mobile etc etc. I am trying to bloat the system boundary.
0
 
LVL 4

Accepted Solution

by:
Jarodtweiss earned 1000 total points
ID: 10783815
In that case, I can't give you firm answers as I haven't took any precise figures about that.
But I think that there won't a big overhead to use complex type (specially if you NEED a complex type). For me, the biggest problem is the quantity of objects and not the complexity.
Also, do not forget that for a web service, we can communicate in RPC mode (using objects) or in Document mode (using only XML). I'm using always RPC and honnestly I do not know how to do something else in .NET. But it can also be a solution for you : no serialization, no deserialization...

For heterogeous system, I cannot give extra information on it, sorry.
0
 

Author Comment

by:salur
ID: 10785424
That's fine. Thanks a lot for your response and time. Much appreciated.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question