I am trying to write a web service client using axis 1.2
Here is the code:
The issue is it generates a request object with an empty namespace for the target and hence it get an invalid response. Here is the request object:
Here is the wsdl.It uses document/literal type formatting.
<?xml version="1.0" encoding="utf-8" ?>
- <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
- <wsdl:types>
- <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
- <s:element name="ValidateUser">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="GpassID" type="s:int" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="ValidateUserResponse">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="ValidateUserResult" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="SchemeDetails">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="SchemeToken" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="SchemeDetailsResponse">
- <s:complexType>
- <s:sequence>
- <s:element minOccurs="0" maxOccurs="1" name="SchemeDetailsResult">
- <s:complexType>
+ <s:sequence>
<s:element ref="s:schema" />
<s:any />
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="SchemeList">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="SchemeToken" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="SchemeListResponse">
- <s:complexType>
- <s:sequence>
- <s:element minOccurs="0" maxOccurs="1" name="SchemeListResult">
- <s:complexType>
- <s:sequence>
<s:element ref="s:schema" />
<s:any />
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
- <wsdl:message name="ValidateUserSoapIn">
<wsdl:part name="parameters" element="tns:ValidateUser" />
</wsdl:message>
- <wsdl:message name="ValidateUserSoapOut">
<wsdl:part name="parameters" element="tns:ValidateUserResponse" />
</wsdl:message>
- <wsdl:message name="SchemeDetailsSoapIn">
<wsdl:part name="parameters" element="tns:SchemeDetails" />
</wsdl:message>
- <wsdl:message name="SchemeDetailsSoapOut">
<wsdl:part name="parameters" element="tns:SchemeDetailsResponse" />
</wsdl:message>
- <wsdl:message name="SchemeListSoapIn">
<wsdl:part name="parameters" element="tns:SchemeList" />
</wsdl:message>
- <wsdl:message name="SchemeListSoapOut">
<wsdl:part name="parameters" element="tns:SchemeListResponse" />
</wsdl:message>
- <wsdl:portType name="FlexSimpleERPSoap">
- <wsdl:operation name="ValidateUser">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Validates UserID passed in from eRewards Plus.</wsdl:documentation>
<wsdl:input message="tns:ValidateUserSoapIn" />
<wsdl:output message="tns:ValidateUserSoapOut" />
</wsdl:operation>
- <wsdl:operation name="SchemeDetails">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Current status and details of requested Flex Scheme for eRewards Plus.</wsdl:documentation>
<wsdl:input message="tns:SchemeDetailsSoapIn" />
<wsdl:output message="tns:SchemeDetailsSoapOut" />
</wsdl:operation>
- <wsdl:operation name="SchemeList">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">List of available Flex Schemes with status for requested user for eRewards Plus.</wsdl:documentation>
<wsdl:input message="tns:SchemeListSoapIn" />
<wsdl:output message="tns:SchemeListSoapOut" />
</wsdl:operation>
</wsdl:portType>
- <wsdl:binding name="FlexSimpleERPSoap" type="tns:FlexSimpleERPSoap">
<
soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="ValidateUser">
<soap:operation soapAction="http://tempuri.org/ValidateUser" style="document" />
- <wsdl:input>
<soap:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="SchemeDetails">
<soap:operation soapAction="http://tempuri.org/SchemeDetails" style="document" />
- <wsdl:input>
<soap:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="SchemeList">
<soap:operation soapAction="http://tempuri.org/SchemeList" style="document" />
- <wsdl:input>
<soap:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:binding name="FlexSimpleERPSoap12" type="tns:FlexSimpleERPSoap">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="ValidateUser">
<soap12:operation soapAction="http://tempuri.org/ValidateUser" style="document" />
- <wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="SchemeDetails">
<soap12:operation soapAction="http://tempuri.org/SchemeDetails" style="document" />
- <wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="SchemeList">
<soap12:operation soapAction="http://tempuri.org/SchemeList" style="document" />
- <wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:service name="FlexSimpleERP">
- <wsdl:port name="FlexSimpleERPSoap" binding="tns:FlexSimpleERPSoap">
<soap:address location="http://flexsimple.garfield/ws/FlexSimpleERP.asmx" />
</wsdl:port>
- <wsdl:port name="FlexSimpleERPSoap12" binding="tns:FlexSimpleERPSoap12">
<soap12:address location="http://flexsimple.garfield/ws/FlexSimpleERP.asmx" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Can someone give me pointers as what i am missing here??
[ December 04, 2008: Message edited by: Suzi Cooper ]