简体   繁体   中英

Siebel generated WSDL input parameters order and Visual Studio generated code

I consume a .wsdl file for a webservice developped by a Siebel team in my company. The generated code by Visual Studio when I update the service reference has changed lately which means I'll have to rewrite some code for the calling methods in the application. Indeed, the order of the input parameters have changed for some of the webservice methods. It is visible in the .wsdl itself, the "part name" are not in the order they used to be.

I made some researches for the Visual Studio side and from what I understand, correct me if I'm wrong, the generated code directly depends of the xml nodes order, hence, the generated .wsdl.

Is there a way to ensure on the Siebel side, at the .wsdl generation, that the input parameters for every method will always appear in the same order?

I don't know much about Siebel I'm sorry as it's not the part I'm working on.

Thanks.

Yes, there is a way to enforce the order from Siebel.

In the "Business service method arguments" screen, you (well, your Siebel team) have to specify the "Preferred sequence" property:

http://docs.oracle.com/cd/B31104_02/books/EAI2/EAI2_WebServices12.html

NOTE: For RPC services, the order of input arguments is important. You can set the order through the Preferred Sequence property of the business service method argument in Siebel Tools. By specifying this parameter, the outbound dispatcher makes sure that the sequence parameters for an operation are in the correct order. The Preferred Sequence property is only supported with outbound services.

Also, if you're using integration objects as arguments, you should specify the "External sequence" and the "XML sequence" properties, both in the "Integration components" and the "Integration component fields" screens:

http://docs.oracle.com/cd/E05553_01/books/SSSE/SSSE_Customize8.html

XML Sequence: Specifies the order in which the field will appear in the Output XML message. Enter a value that is not already present in the field list, such as the number that follows the value used for the last existing field in the sequence.

External Sequence: Specifies the order in which the field will appear, when Data Mapper is used to map the fields. Enter a value that is not already present in the field list, such as the number that follows the value used for the last existing field in the sequence.

It is recommended that you use the same value for XML Sequence and External Sequence.

That way, the WSDL elements should be in the same order every time they update the web service.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM