Q
Evaluate Weigh the pros and cons of technologies, products and projects you are considering.

Calling a Web service without a name/type-specific parameter

I have a Web service with an operation (doProcess), and this operation has a parameter. I tried to execute the Web service using AXIS, but when I made the Call object, I had to put the parameter name and the parameter type into the Call. How can I call my Web service without a name and type specific parameter?
Your question drives to the heart of one of the key dividing lines in the SOAP standard today: RPC versus document style SOAP messages. In document style, you can think of any given message (a request or a reply) as having only one "parameter", but that parameter is a complex data structure usually.

When using document style messages, there's no real reason to give a name, because there's only one "parameter", and it can't be null (so it's type can be determined directly from the instance you pass). This is the most fundamental way to transmit SOAP messages.

RPC style is designed to fit easily with programming languages by making each parameter appear separate. In reality, however, all that really happens is that each parameter is put as a member element of an "artificial" data structure which is transmitted document style. So, Axis requires that you give it the parameter names and types so it can (internally) construct this artificial data type to be transmitted.

One recommendation for you is that, instead of coding call objects yourself, you might want to consider starting from WSDL. If you start with WSDL, Axis includes a code generator that will generate all the necessary code to wrap around the underlying Axis Call objects (so you don't need to do all the manual infrastructure coding and can instead focus on the business value of your application).

Dig Deeper on Topics Archive

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchSoftwareQuality

SearchAWS

SearchCloudComputing

TheServerSide.com

Close