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.
Dig Deeper on Topics Archive
Related Q&A from Anne Thomas Manes
Anne Thomas Manes explains the differences between open source clients and open source implementations. Continue Reading
Anne Thomas Manes discusses the best way to go about creating an enterprise data dictionary and why the systems works well. Continue Reading
Anne Thomas Manes explains the difference between 'hard' real time and 'live' real time systems. Continue Reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.