Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.2RC2
-
None
-
None
-
Axis service deployed to websphere server
WebSphere Platform 5.0 [BASE 5.0.0 s0245.03]
Host Operating System is Windows 2000, version 5.0
Java version = J2RE 1.3.1 IBM Windows 32 build cn131-20021107 (JIT enabled: jitc)
Microsoft Development Environment 2003
Microsoft .NET Framework 1.1
Microsoft Visual C# .NET 69586-335-0000007-18998Axis service deployed to websphere server WebSphere Platform 5.0 [BASE 5.0.0 s0245.03] Host Operating System is Windows 2000, version 5.0 Java version = J2RE 1.3.1 IBM Windows 32 build cn131-20021107 (JIT enabled: jitc) Microsoft Development Environment 2003 Microsoft .NET Framework 1.1 Microsoft Visual C# .NET 69586-335-0000007-18998
Description
The .NET web reference created from the WSDL (1) produced by appending ?wsdl to my Axis 1.2RC2 service name is incorrect and different to the web reference created from the WSDL (2) generated by org.apache.axis.wsdl.Java2WSDL.
The only difference between the WSDL is how custom SimpleTypes (e.g., FinancialStatus in my WSDL) are represented:
(1)
They have a base type of soapenc:string where xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/
(2)
They have a base type of xsd:string where xmlns:xsd=http://www.w3.org/2001/XMLSchema
The generated .NET webreference from (1) defines the SimpleType as a string
The generated .NET webreference from (2) defines the SimpleType as an Enum
The steps I have followed from pre Axis1.1 to deploy my service are
1. Create interface and implementation classes
2. Use org.apache.axis.wsdl.Java2WSDL to generate the WSDL
3. Use org.apache.axis.wsdl.WSDL2Java to generate the deploy.wsdd
4. deploy using org.apache.axis.client.AdminService -http://localhost:9080/InquiryWeb/services/AdminService deploy.wsdd
5. The .NET client code is generated by adding a web reference to http://localhost:9080/InquiryWeb/services/Inquiry?wsdl
I did not experience this problem with Axis 1.1.
The wsdl and associated c# files are pasted in below:
(1) WSDL
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="urn:Inquiry" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="urn:Inquiry" xmlns:intf="urn:Inquiry" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns1="http://util.gpb.rbc.com" xmlns:tns2="http://customer.util.gpb.rbc.com" xmlns:tns3="http://lang.java" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!--WSDL created by Apache Axis version: 1.2RC2
Built on Nov 16, 2004 (12:19:44 EST)-->
<wsdl:types>
<schema targetNamespace="http://util.gpb.rbc.com" xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://lang.java"/>
<import namespace="http://customer.util.gpb.rbc.com"/>
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType name="BankIdentifier">
<sequence>
<element name="bank" type="xsd:int"/>
<element name="transit" type="xsd:int"/>
<element name="key" nillable="true" type="soapenc:string"/>
<element name="number" type="xsd:int"/>
</sequence>
</complexType>
<simpleType name="ErrorSeverity">
<restriction base="soapenc:string">
<enumeration value="Low"/>
<enumeration value="Medium"/>
<enumeration value="High"/>
<enumeration value="BusinessCritical"/>
<enumeration value="MissionCritical"/>
</restriction>
</simpleType>
<complexType name="GPBException">
<sequence>
<element name="exception" nillable="true" type="xsd:anyType"/>
<element name="message" nillable="true" type="soapenc:string"/>
<element name="errorSeverity" nillable="true" type="tns1:ErrorSeverity"/>
</sequence>
</complexType>
</schema>
<schema targetNamespace="http://customer.util.gpb.rbc.com" xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://util.gpb.rbc.com"/>
<import namespace="http://lang.java"/>
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<simpleType name="FinancialStatus">
<restriction base="soapenc:string">
<enumeration value="Loss"/>
<enumeration value="Doubtful"/>
<enumeration value="Substandard"/>
<enumeration value="SpecialMention"/>
<enumeration value="Watchlist"/>
<enumeration value="Bankrupt"/>
<enumeration value="Chapter11"/>
<enumeration value="Restraint"/>
<enumeration value="Regular"/>
</restriction>
</simpleType>
<complexType name="CustomerSummaryDTO">
<sequence>
<element name="shortName" nillable="true" type="soapenc:string"/>
<element name="currency" nillable="true" type="soapenc:string"/>
<element name="isRestrained" type="xsd:boolean"/>
<element name="status" nillable="true" type="tns2:FinancialStatus"/>
<element name="hasWarnings" type="xsd:boolean"/>
<element name="id" nillable="true" type="tns1:BankIdentifier"/>
</sequence>
</complexType>
</schema>
</wsdl:types>
<wsdl:message name="getCustomerResponse">
<wsdl:part name="getCustomerReturn" type="tns2:CustomerSummaryDTO"/>
</wsdl:message>
<wsdl:message name="GPBException">
<wsdl:part name="fault" type="tns1:GPBException"/>
</wsdl:message>
<wsdl:message name="getCustomerRequest">
<wsdl:part name="aCustomerIdentifier" type="tns1:BankIdentifier"/>
</wsdl:message>
<wsdl:portType name="Inquiry">
<wsdl:operation name="getCustomer" parameterOrder="aCustomerIdentifier">
<wsdl:input message="impl:getCustomerRequest" name="getCustomerRequest"/>
<wsdl:output message="impl:getCustomerResponse" name="getCustomerResponse"/>
<wsdl:fault message="impl:GPBException" name="GPBException"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="InquirySoapBinding" type="impl:Inquiry">
<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getCustomer">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="getCustomerRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:Inquiry" use="encoded"/>
</wsdl:input>
<wsdl:output name="getCustomerResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:Inquiry" use="encoded"/>
</wsdl:output>
<wsdl:fault name="GPBException">
<wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="GPBException" namespace="urn:Inquiry" use="encoded"/>
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="InquiryService">
<wsdl:port binding="impl:InquirySoapBinding" name="Inquiry">
<wsdlsoap:address location="http://localhost:9080/InquiryWeb/services/ChannelIsland/Inquiry"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
(2) WSDL
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="urn:Inquiry" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="urn:Inquiry" xmlns:intf="urn:Inquiry" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns2="http://util.gpb.rbc.com" xmlns:tns3="http://customer.util.gpb.rbc.com" xmlns:tns4="http://lang.java" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!--WSDL created by Apache Axis version: 1.2RC2
Built on Nov 16, 2004 (12:19:44 EST)-->
<wsdl:types>
<schema targetNamespace="http://util.gpb.rbc.com" xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://lang.java"/>
<import namespace="http://customer.util.gpb.rbc.com"/>
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType name="BankIdentifier">
<sequence>
<element name="bank" type="xsd:int"/>
<element name="transit" type="xsd:int"/>
<element name="key" nillable="true" type="xsd:string"/>
<element name="number" type="xsd:int"/>
</sequence>
</complexType>
<simpleType name="ErrorSeverity">
<restriction base="xsd:string">
<enumeration value="Low"/>
<enumeration value="Medium"/>
<enumeration value="High"/>
<enumeration value="BusinessCritical"/>
<enumeration value="MissionCritical"/>
</restriction>
</simpleType>
<complexType name="GPBException">
<sequence>
<element name="exception" nillable="true" type="xsd:anyType"/>
<element name="message" nillable="true" type="xsd:string"/>
<element name="errorSeverity" nillable="true" type="tns2:ErrorSeverity"/>
</sequence>
</complexType>
</schema>
<schema targetNamespace="http://customer.util.gpb.rbc.com" xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://util.gpb.rbc.com"/>
<import namespace="http://lang.java"/>
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<simpleType name="FinancialStatus">
<restriction base="xsd:string">
<enumeration value="Loss"/>
<enumeration value="Doubtful"/>
<enumeration value="Substandard"/>
<enumeration value="SpecialMention"/>
<enumeration value="Watchlist"/>
<enumeration value="Bankrupt"/>
<enumeration value="Chapter11"/>
<enumeration value="Restraint"/>
<enumeration value="Regular"/>
</restriction>
</simpleType>
<complexType name="CustomerSummaryDTO">
<sequence>
<element name="shortName" nillable="true" type="xsd:string"/>
<element name="currency" nillable="true" type="xsd:string"/>
<element name="isRestrained" type="xsd:boolean"/>
<element name="status" nillable="true" type="tns3:FinancialStatus"/>
<element name="hasWarnings" type="xsd:boolean"/>
<element name="id" nillable="true" type="tns2:BankIdentifier"/>
</sequence>
</complexType>
</schema>
</wsdl:types>
<wsdl:message name="getCustomerResponse">
<wsdl:part name="getCustomerReturn" type="tns3:CustomerSummaryDTO"/>
</wsdl:message>
<wsdl:message name="GPBException">
<wsdl:part name="fault" type="tns2:GPBException"/>
</wsdl:message>
<wsdl:message name="getCustomerRequest">
<wsdl:part name="aCustomerIdentifier" type="tns2:BankIdentifier"/>
</wsdl:message>
<wsdl:portType name="Inquiry">
<wsdl:operation name="getCustomer" parameterOrder="aCustomerIdentifier">
<wsdl:input message="impl:getCustomerRequest" name="getCustomerRequest"/>
<wsdl:output message="impl:getCustomerResponse" name="getCustomerResponse"/>
<wsdl:fault message="impl:GPBException" name="GPBException"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="InquirySoapBinding" type="impl:Inquiry">
<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getCustomer">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="getCustomerRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:Inquiry" use="encoded"/>
</wsdl:input>
<wsdl:output name="getCustomerResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:Inquiry" use="encoded"/>
</wsdl:output>
<wsdl:fault name="GPBException">
<wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="GPBException" namespace="urn:Inquiry" use="encoded"/>
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="InquiryService">
<wsdl:port binding="impl:InquirySoapBinding" name="Inquiry">
<wsdlsoap:address location="http://localhost:9080/InquiryWeb/services/Inquiry"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
(1) c#
//------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
// Runtime Version: 1.1.4322.573
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
//------------------------------------------------------------------------------
//
// This source code was auto-generated by Microsoft.VSDesigner, Version 1.1.4322.573.
//
namespace Transactions.dynamic {
using System.Diagnostics;
using System.Xml.Serialization;
using System;
using System.Web.Services.Protocols;
using System.ComponentModel;
using System.Web.Services;
/// <remarks/>
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="InquirySoapBinding", Namespace="urn:Inquiry")]
public class InquiryService : System.Web.Services.Protocols.SoapHttpClientProtocol {
/// <remarks/>
public InquiryService()
/// <remarks/>
[System.Web.Services.Protocols.SoapRpcMethodAttribute("", RequestNamespace="urn:Inquiry", ResponseNamespace="urn:Inquiry")]
[return: System.Xml.Serialization.SoapElementAttribute("getCustomerReturn")]
public CustomerSummaryDTO getCustomer(BankIdentifier aCustomerIdentifier) {
object[] results = this.Invoke("getCustomer", new object[]
return ((CustomerSummaryDTO)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BegingetCustomer(BankIdentifier aCustomerIdentifier, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("getCustomer", new object[] { aCustomerIdentifier}
, callback, asyncState);
}
/// <remarks/>
public CustomerSummaryDTO EndgetCustomer(System.IAsyncResult asyncResult)
}
/// <remarks/>
[System.Xml.Serialization.SoapTypeAttribute("BankIdentifier", "http://util.gpb.rbc.com")]
public class BankIdentifier { /// <remarks/> public int bank; /// <remarks/> public int transit; /// <remarks/> public string key; /// <remarks/> public int number; }
/// <remarks/>
[System.Xml.Serialization.SoapTypeAttribute("CustomerSummaryDTO", "http://customer.util.gpb.rbc.com")]
public class CustomerSummaryDTO { /// <remarks/> public string shortName; /// <remarks/> public string currency; /// <remarks/> public bool isRestrained; /// <remarks/> public string status; /// <remarks/> public bool hasWarnings; /// <remarks/> public BankIdentifier id; }
}
(2) c#
//------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
// Runtime Version: 1.1.4322.573
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
//------------------------------------------------------------------------------
//
// This source code was auto-generated by Microsoft.VSDesigner, Version 1.1.4322.573.
//
namespace Transactions.static {
using System.Diagnostics;
using System.Xml.Serialization;
using System;
using System.Web.Services.Protocols;
using System.ComponentModel;
using System.Web.Services;
/// <remarks/>
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="InquirySoapBinding", Namespace="urn:Inquiry")]
public class InquiryService : System.Web.Services.Protocols.SoapHttpClientProtocol {
/// <remarks/>
public InquiryService() { this.Url = "http://localhost:9080/InquiryWeb/services/Inquiry"; }
/// <remarks/>
[System.Web.Services.Protocols.SoapRpcMethodAttribute("", RequestNamespace="urn:Inquiry", ResponseNamespace="urn:Inquiry")]
[return: System.Xml.Serialization.SoapElementAttribute("getCustomerReturn")]
public CustomerSummaryDTO getCustomer(BankIdentifier aCustomerIdentifier) {
object[] results = this.Invoke("getCustomer", new object[] { aCustomerIdentifier});
return ((CustomerSummaryDTO)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BegingetCustomer(BankIdentifier aCustomerIdentifier, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("getCustomer", new object[] { aCustomerIdentifier}, callback, asyncState);
}
/// <remarks/>
public CustomerSummaryDTO EndgetCustomer(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((CustomerSummaryDTO)(results[0])); }
}
/// <remarks/>
[System.Xml.Serialization.SoapTypeAttribute("BankIdentifier", "http://util.gpb.rbc.com")]
public class BankIdentifier
/// <remarks/>
[System.Xml.Serialization.SoapTypeAttribute("CustomerSummaryDTO", "http://customer.util.gpb.rbc.com")]
public class CustomerSummaryDTO
/// <remarks/>
[System.Xml.Serialization.SoapTypeAttribute("FinancialStatus", "http://customer.util.gpb.rbc.com")]
public enum FinancialStatus
}