Henry, Thanks for the response.
Actually, I could not generate the wsdl due to the reason I statement below. The issue I met is exactly with the post issue here: https://issues.apache.org/jira/browse/CXF-939 If I do not want to change my service interface, how to handle this? Thanks, William On Fri, Jun 11, 2010 at 7:28 PM, Henry Lu <[email protected]> wrote: > Based upon the wsdl file, All you need to do is to generate the client > code: > Java SDK: wsimport > Apeche cxf: wsdl2java > Apeche Axis: wasl2java > NetBean: follow the instruction in the tool > > Once the client side code generated by these tools, let us go from there. > Or you can send me the complete wsdl file and I can generate client code for > you. > > -Henry > > > On 6/11/2010 6:37 AM, william he wrote: > >> Hi all, >> >> Currently I have the following service: >> >> @WebService >> public interface CustomerService { >> Response updateCustomer(Customer c); >> Response addCustomer(Customer c); >> } >> >> The following is the part of generated WSDL: >> >> <xs:complexType name="customer"> >> <xs:sequence> >> <xs:element name="id" type="xs:long"/> >> <xs:element minOccurs="0" name="name" type="xs:string"/> >> </xs:sequence> >> </xs:complexType> >> <xs:complexType name="addCustomer"> >> <xs:sequence> >> <xs:element minOccurs="0" name="customer" type="tns:customer"/> >> </xs:sequence> >> </xs:complexType> >> <xs:complexType name="updateCustomer"> >> <xs:sequence> >> <xs:element minOccurs="0" name="customer" type="tns:customer"/> >> </xs:sequence> >> </xs:complexType> >> <wsdl:message name="addCustomer"> >> <wsdl:part element="tns:addCustomer" name="parameters"> >> </wsdl:part> >> </wsdl:message> >> <wsdl:message name="updateCustomer"> >> <wsdl:part element="tns:updateCustomer" name="parameters"> >> </wsdl:part> >> </wsdl:message> >> <wsdl:operation name="updateCustomer"> >> <wsdl:input message="tns:updateCustomer" name="updateCustomer"> >> </wsdl:input> >> <wsdl:output message="tns:updateCustomerResponse" >> name="updateCustomerResponse"> >> </wsdl:output> >> </wsdl:operation> >> <wsdl:operation name="addCustomer"> >> <wsdl:input message="tns:addCustomer" name="addCustomer"> >> </wsdl:input> >> <wsdl:output message="tns:addCustomerResponse" >> name="addCustomerResponse"> >> </wsdl:output> >> </wsdl:operation> >> >> As you sawn, the operation updateCustomer& addCustomer use the same type >> "customer", when I run the wsdl2java using this WSDL, the tool report the >> following error: >> >> WSDLToJava Error: Non unique body parts, operation [ updateCustomer ] and >> operation [ addCustomer ] in binding >> CustomerServiceImplServiceSoapBinding >> have the same body block: customer >> >> I do nont want to change my service interface, how to handle this problem? >> Although I tried to change the SOAPBinding with RPC, but the generated >> SOAP >> message is not my expected, it was wrapped by the operation+response. >> >> Thanks for your response, >> William >> >> >> >
