There four types of wsdl documents: RPC/encoded RPC/literal Document/Literal Document/Encoded
The last one is the less used. RPC/Literal and Document/Literal is WS-I, in short, that means more interoperability. But is also very common to use RPC/Encoded. One of the differences from Document and RPC, is the way that objects get serialized in SOAP messages. The document approach is widely used in .NET clients, hence some problems of clients using document approach with an ws server(axis for example) with rpc/encoded. If you want to write a client to invoke a webservice, use the WSDLToJava command from axis. You can read more about it from apache.axis.org. On 10/19/06, Bassi Gurpiar <[EMAIL PROTECTED]> wrote:
I am new to Axis. I have created and deployed a web service onto Tomcat. I am using a tool called SoapScope to invoke my web service and it works great. BUT.... I wish to write a java class that will invoke the web service. Please can someone help me. I have seen people using different approaches to writing clients and I am more confused than ever. I wish to call the operation "getEnterpriseProdGroupReport". This takes in an array of type BranchAccount (complex type). I am using axis version 1.2.1. Please can someone give me some client code to invoke this service. I am using document/literal.........whatever that is! I don't know the difference between doc literal and rpc. Someone please explain! Here is my WSDL: <?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions name="CategoryReports" targetNamespace="urn:com.aah.CategoryReports" xmlns:apachesoap="http://xml.apache.org/xmlsoap" xmlns:impl="urn:com.aah.CategoryReports" xmlns:intf="urn:com.aah.CategoryReports" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <wsdl:types> <schema targetNamespace="urn:com.aah.CategoryReports" xmlns="http://www.w3.org/2001/XMLSchema"> <complexType name="BranchAccount"> <sequence> <element name="Branch" type="xsd:string"/> <element name="Account" type="xsd:string"/> </sequence> </complexType> <element name="EnterpriseCatRepInput"> <complexType> <sequence> <element maxOccurs="unbounded" minOccurs="1" name="item" type="impl:BranchAccount"/> </sequence> </complexType> </element> <complexType name="EnterpriseProductGroup"> <sequence> <element name="netGP" nillable="true" type="xsd:string"/> <element name="reportedSales" nillable="true" type="xsd:string"/> <element name="productGroup" nillable="true" type="xsd:string"/> </sequence> </complexType> <complexType name="WSErrorObject"> <sequence> <element name="errorMessage" nillable="true" type="xsd:string"/> <element name="errorCode" type="xsd:int"/> </sequence> </complexType> <complexType name="EnterpriseProductCategoryReportOutput"> <sequence> <element maxOccurs="unbounded" name="enterpriseProductGroups" type="impl:EnterpriseProductGroup"/> <element name="errorObject" nillable="true" type="impl:WSErrorObject"/> <element name="totalAverageReportedSales" nillable="true" type="xsd:string"/> <element name="totalAverageNetGP" nillable="true" type="xsd:string"/> </sequence> </complexType> <element name="EnterpriseCategoryReportOutput" type="impl:EnterpriseProductCategoryReportOutput"/> <element name="ProductCatRepInput"> <complexType> <sequence> <element maxOccurs="unbounded" minOccurs="1" name="item" type="impl:BranchAccount"/> </sequence> </complexType> </element> <complexType name="CategoryItem"> <sequence> <element name="QFlagcategoryNetProfit" nillable="true" type="xsd:string"/> <element name="NFlag" type="xsd:boolean"/> <element name="categoryName" nillable="true" type="xsd:string"/> <element name="NFlagcategoryGrossProfit" nillable="true" type="xsd:string"/> <element name="categoryID" nillable="true" type="xsd:string"/> <element name="QFlagcategoryGrossProfit" nillable="true" type="xsd:string"/> <element name="NFlagcategoryNetProfit" nillable="true" type="xsd:string"/> <element name="QFlag" type="xsd:boolean"/> </sequence> </complexType> <complexType name="AAHProductCategoryReportOutput"> <sequence> <element maxOccurs="unbounded" name="categoryItemsArray" type="impl:CategoryItem"/> <element name="errorObject" type="impl:WSErrorObject"/> <element name="totalAverageReportedSales" nillable="true" type="xsd:string"/> <element name="totalAverageNetGP" nillable="true" type="xsd:string"/> </sequence> </complexType> <element name="ProductCategoryReportOutput" type="impl:AAHProductCategoryReportOutput"/> <element name="WorkflowCustomerGroupTermsInput" type="xsd:int"/> <element name="WorkflowCustomerGroupTermsOutput" type="impl:AAHProductCategoryReportOutput"/> <element name="WorkflowCustGroupTermsEntInput" type="xsd:int"/> <element name="WorkflowCustGroupTermsEntOutput" type="impl:EnterpriseProductCategoryReportOutput"/> </schema> </wsdl:types> <wsdl:message name="getEnterpriseProdGroupReportRequest"> <wsdl:part element="impl:EnterpriseCatRepInput" name="EnterpriseCatRepInput"/> </wsdl:message> <wsdl:message name="getProductCategoryReportRequest"> <wsdl:part element="impl:ProductCatRepInput" name="ProductCatRepInput"/> </wsdl:message> <wsdl:message name="getEnterpriseProdGroupReportResponse"> <wsdl:part element="impl:EnterpriseCategoryReportOutput" name="EnterpriseCategoryReportOutput"/> </wsdl:message> <wsdl:message name="getProductCategoryReportResponse"> <wsdl:part element="impl:ProductCategoryReportOutput" name="ProductCategoryReportOutput"/> </wsdl:message> <wsdl:message name="getWorkflowCustomerGroupTermsEnterpriseReportResponse"> <wsdl:part element="impl:WorkflowCustGroupTermsEntOutput" name="WorkflowCustGroupTermsEntOutput"/> </wsdl:message> <wsdl:message name="getWorkflowCustomerGroupTermsReportResponse"> <wsdl:part element="impl:WorkflowCustomerGroupTermsOutput" name="WorkflowCustomerGroupTermsOutput"/> </wsdl:message> <wsdl:message name="getWorkflowCustomerGroupTermsReportRequest"> <wsdl:part element="impl:WorkflowCustomerGroupTermsInput" name="WorkflowCustomerGroupTermsInput"/> </wsdl:message> <wsdl:message name="getWorkflowCustomerGroupTermsEnterpriseReportRequest"> <wsdl:part element="impl:WorkflowCustGroupTermsEntInput" name="WorkflowCustGroupTermsEntInput"/> </wsdl:message> <wsdl:portType name="MstrCategoryReports"> <wsdl:operation name="getEnterpriseProdGroupReport" parameterOrder="EnterpriseCatRepInput"> <wsdl:input message="impl:getEnterpriseProdGroupReportRequest" name="getEnterpriseProdGroupReportRequest"/> <wsdl:output message="impl:getEnterpriseProdGroupReportResponse" name="getEnterpriseProdGroupReportResponse"/> </wsdl:operation> <wsdl:operation name="getProductCategoryReport" parameterOrder="ProductCatRepInput"> <wsdl:input message="impl:getProductCategoryReportRequest" name="getProductCategoryReportRequest"/> <wsdl:output message="impl:getProductCategoryReportResponse" name="getProductCategoryReportResponse"/> </wsdl:operation> <wsdl:operation name="getWorkflowCustomerGroupTermsReport" parameterOrder="WorkflowCustomerGroupTermsInput"> <wsdl:input message="impl:getWorkflowCustomerGroupTermsReportRequest" name="getWorkflowCustomerGroupTermsReportRequest"/> <wsdl:output message="impl:getWorkflowCustomerGroupTermsReportResponse" name="getWorkflowCustomerGroupTermsReportResponse"/> </wsdl:operation> <wsdl:operation name="getWorkflowCustomerGroupTermsEnterpriseReport" parameterOrder="WorkflowCustGroupTermsEntInput"> <wsdl:input message="impl:getWorkflowCustomerGroupTermsEnterpriseReportRequest" name="getWorkflowCustomerGroupTermsEnterpriseReportRequest"/> <wsdl:output message="impl:getWorkflowCustomerGroupTermsEnterpriseReportResponse" name="getWorkflowCustomerGroupTermsEnterpriseReportResponse"/> </wsdl:operation> </wsdl:portType> <wsdl:binding name="MstrCatReportsSoapBinding" type="impl:MstrCategoryReports"> <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name="getEnterpriseProdGroupReport"> <wsdlsoap:operation soapAction="http://localhost:8080/axis/services/getEnterpriseProdGroupReport"/> <wsdl:input name="getEnterpriseProdGroupReportRequest"> <wsdlsoap:body use="literal"/> </wsdl:input> <wsdl:output name="getEnterpriseProdGroupReportResponse"> <wsdlsoap:body use="literal"/> </wsdl:output> </wsdl:operation> <wsdl:operation name="getProductCategoryReport"> <wsdlsoap:operation soapAction="http://localhost:8080/axis/services/getProductCategoryReport"/> <wsdl:input name="getProductCategoryReportRequest"> <wsdlsoap:body use="literal"/> </wsdl:input> <wsdl:output name="getProductCategoryReportResponse"> <wsdlsoap:body use="literal"/> </wsdl:output> </wsdl:operation> <wsdl:operation name="getWorkflowCustomerGroupTermsReport"> <wsdlsoap:operation soapAction="http://localhost:8080/axis/services/getWorkflowCustomerGroupTermsReport"/> <wsdl:input name="getWorkflowCustomerGroupTermsReportRequest"> <wsdlsoap:body use="literal"/> </wsdl:input> <wsdl:output name="getWorkflowCustomerGroupTermsReportResponse"> <wsdlsoap:body use="literal"/> </wsdl:output> </wsdl:operation> <wsdl:operation name="getWorkflowCustomerGroupTermsEnterpriseReport"> <wsdlsoap:operation soapAction="http://localhost:8080/axis/services/getWorkflowCustomerGroupTermsEnterpriseReport"/> <wsdl:input name="getWorkflowCustomerGroupTermsEnterpriseReportRequest"> <wsdlsoap:body use="literal"/> </wsdl:input> <wsdl:output name="getWorkflowCustomerGroupTermsEnterpriseReportResponse"> <wsdlsoap:body use="literal"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="MstrCategoryReportsService"> <wsdl:port binding="impl:MstrCatReportsSoapBinding" name="MstrCatReports"> <wsdlsoap:address location="http://localhost:8080/axis/services/MstrCatReports"/> </wsdl:port> </wsdl:service> </wsdl:definitions> ************************************************************************ DISCLAIMER The information contained in this e-mail is confidential and is intended for the recipient only. If you have received it in error, please notify us immediately by reply e-mail and then delete it from your system. Please do not copy it or use it for any other purposes, or disclose the content of the e-mail to any other person or store or copy the information in any medium. The views contained in this e-mail are those of the author and not necessarily those of Admenta UK Group. ************************************************************************
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
