On 2/21/07, David Illsley <[EMAIL PROTECTED]> wrote:
OK, I've done the refactoring to remove the redundant code.
+1. I hope you have tested properly every thing you have refactored. I agree with you that there are some places to be refactored. but this code worked properly with axis2-1-1-1 release. I still think
the class is overlarge and addresses 2 separate concerns. Firstly, to add the wrapped operation schema stuff to the wsdl4j definition and second to process the wsdl4j model.
Here is the reason to generate the wrappable schema. Basically soap binding have two styles namely doucment and rpc. In rpc style we have to generate the actual element type (send in the soap body) by wrapping the each message parts from an element having its part name and finally whole message parts from an element having the operation name. The elementQname in the Axis message refers to an xsd element. Therefore if the binding we have chosen is in rpc stype, then we set the above generated element type as the message element Qname. This setting is done in addQNameReference method. Actally there are some issues with the logic used here and I will fix them shortly. Now as you can see, generating the wrapping elements is also a part of building the AxisService building. (since it creates the correct elementQname for axis message) I don't really understand the wrapped operation schema stuff but would
otherwise like to factor it out into a separate class so that the builder can focus on the second concern which I believe is the main reason for the class. If we could separate them out I think the class would be a lot more maintainable. Does anyone have the knowledge and inclination to do this? David
-- Amila Suriarachchi, WSO2 Inc.
