<xs:element name="queryCanRecourse" type="tns:queryCanRecourse"></xs:element><xs:complexType name="queryRecourse"> <xs:sequence> <xs:element name="arg0" type="tns:recourseSearchBean" minOccurs="0"></xs:element> </xs:sequence> </xs:complexType><xs:complexType name="recourseSearchBean"> <xs:complexContent> <xs:extension base="tns:baseSearchBean"> <xs:sequence> <xs:element name="acceptor" type="xs:string" minOccurs="0"></xs:element> <xs:element name="acptDt" type="xs:dateTime" minOccurs="0"></xs:element> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType>The XML snippet is quoted from a WSDL file. The message queryRecourse is a complex type and the definition of KeyedCollection correspondent with the queryRecourse is like the following:
<kColl id="QueryRecourseData" dynamic="true"> <kColl id="arg0"> <field id=""> <field id=""> </field></field></kColl> </kColl>As you can seen from the example, the value of id for the outer layer KeyedCollection is arbitrary, but the value of id for the inner layer is arg0 which is equal to <xs:element name=""></xs:element>
<xs:element name="login"> <xs:complexType> <xs:sequence> <xs:element name="user" type="tns1:User"></xs:element> </xs:sequence> </xs:complexType> </xs:element><xs:complexType name="User"> <xs:sequence> <xs:element name="password" type="xsd:string" nillable="true"></xs:element> <xs:element name="userID" type="xsd:string" nillable="true"></xs:element> </xs:sequence> </xs:complexType><kColl id="loginData"> <field id="userID"></field> <field id="password"></field> </kColl>
Attributes | Attributes Description |
---|---|
id | Arbitrary value, variable for the invocation |
wsdURL | WSDL URL for the target service |
operation | The target invocation operation |
id | Arbitrary value |
type | Parameter type, if primitive type, the value is the class name; if non-primitive type, the value is GenericDataObject. |
WSDynamicInvoker inv =(WSDynamicInvoker) ivf.createInvoker("login2"); Context loginCtx = ContextFactory.createContext("loginCtx"); loginCtx.setValueAt("userID", "user01"); loginCtx.setValueAt("password", "xxxxx"); WebServiceInfo wsinfo =((WSDynamicInvoker)inv).getWsInfo(); WebServiceDIInvokerParameter websdiiparm = (WebServiceDIInvokerParameter) inv.getParameters().get("NewOperationRequest"); UserDefineTypeInfo userType = wsinfo.getUserDefineTypeByName("{http://beans}User"); GenericDataObject gdb = inv.convertContexDataToGenericDataObject(websdiiparm, userType, loginCtx); Object result = inv.execute(new Object[]{gdb});