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

How to send multiple parameters to a Web service in a struct

I need to pass 52 parameters, all of different data types, to a Web service running on WebLogic server 8.1. Based...

on these parameters, the Web service will generate a result (there are 16 parameters in this result and these parameters are also of different data types).

Can I pass all these parameters as one array to my Web service, which uses RPC/encoded, and get the response as one array?

Additionally, can I check my fields for errors directly on the server side, in the Web service, instead of on the client side? Also, how can I use SOAP faults?

You can't use an array to send these parameters. The parameters must be sent in a struct. Your SOAP client should automatically construct struct for you. You haven't told me what your client environment is, but I assume that you'll compile the WSDL into a client side proxy. If you're using a strongly typed client side programming language, the client proxy should ensure that each parameter is of the right data type. But if you're using a scripting language on the client side, you might not do type checking until WebLogic attempts to deserialize the message. The efficiency of the serialization process is dependent on the SOAP library you use (One way to improve the efficiency, though, is to switch to document/literal rather than rpc/encoded).

You might consider validating the input message using schema validation, but I doubt it would improve efficiency if you are using rpc/encoded (It would be more appropriate if you were using document/literal). Instead, you should probably check each parameter using Java in the service.

You don't say whether you are using WebLogic Workshop or the WebLogic Server SOAP engine. You implement support for SOAP faults slightly differently depending on the tool you're using.

BEA provides lots of sample code on their WebLogic Workshop Web site. Visit these links for documentation on their SOAP Faults for WebLogic Workshop and SOAP Faults for WebLogic Server.

This was last published in June 2005

Dig Deeper on Business process modeling and design

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.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchSoftwareQuality

SearchCloudApplications

SearchAWS

TheServerSide.com

SearchWinDevelopment

DevOpsAgenda

Close