.NET 2.0 client / Axis 1.3 Server problem with java.lang.Integer

R

robert28

Axis 1.3 on server / .NET 2.0 client (Visual Studio 2005 - using Add
Web Reference)

I have a class that contains a java.lang.String and a
java.lang.Integer.

The client consumes the string fine but the Integer value is always
delivered as a null.

Any suggestions?

Method in question is getApplication()

<?xml version="1.0" encoding="UTF-8" ?>
- <wsdl:definitions targetNamespace="urn:provisionService"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="urn:provisionService" xmlns:intf="urn:provisionService"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns1="urn:provisionServiceBean_System"
xmlns:tns2="urn:provisionServiceFault"
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.3
Built on Oct 05, 2005 (05:23:37 EDT)
-->
- <wsdl:types>
- <schema targetNamespace="urn:provisionServiceBean_System"
xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="urn:provisionService" />
<import namespace="urn:provisionServiceFault" />
<import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
- <complexType name="Application">
- <sequence>
<element name="desc" nillable="true" type="xsd:string" />
<element name="id" nillable="true" type="xsd:int" />
</sequence>
</complexType>
- <complexType name="DispServer">
- <sequence>
<element name="deleted" nillable="true" type="xsd:int" />
<element name="id" nillable="true" type="xsd:int" />
<element name="machineName" nillable="true" type="xsd:string" />
<element name="serverName" nillable="true" type="xsd:string" />
<element name="siteId" nillable="true" type="xsd:int" />
</sequence>
</complexType>
</schema>
- <schema targetNamespace="urn:provisionServiceFault"
xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="urn:provisionService" />
<import namespace="urn:provisionServiceBean_System" />
<import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
- <complexType name="FaultCause">
- <sequence>
<element name="code" type="xsd:int" />
<element name="message" nillable="true" type="xsd:string" />
</sequence>
</complexType>
- <complexType name="ProvisionFault">
- <sequence>
<element name="faultCause" nillable="true" type="tns2:FaultCause" />
<element name="message" nillable="true" type="xsd:string" />
</sequence>
</complexType>
</schema>
- <schema targetNamespace="urn:provisionService"
xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="urn:provisionServiceBean_System" />
<import namespace="urn:provisionServiceFault" />
<import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
- <complexType name="ArrayOf_tns1_DispServer">
- <complexContent>
- <restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="tns1:DispServer[]"
/>
</restriction>
</complexContent>
</complexType>
</schema>
</wsdl:types>
- <wsdl:message name="getApplicationRequest">
<wsdl:part name="o" type="tns1:Application" />
</wsdl:message>
<wsdl:message name="getServersRequest" />
- <wsdl:message name="getBeanResponse">
<wsdl:part name="getBeanReturn" type="xsd:anyType" />
</wsdl:message>
- <wsdl:message name="getBeanRequest">
<wsdl:part name="o" type="xsd:anyType" />
</wsdl:message>
- <wsdl:message name="ProvisionFault">
<wsdl:part name="fault" type="tns2:provisionFault" />
</wsdl:message>
- <wsdl:message name="getServersResponse">
<wsdl:part name="getServersReturn"
type="impl:ArrayOf_tns1_DispServer" />
</wsdl:message>
- <wsdl:message name="getApplicationResponse">
<wsdl:part name="getApplicationReturn" type="tns1:Application" />
</wsdl:message>
- <wsdl:portType name="ProvisioningService">
- <wsdl:blush:peration name="getApplication" parameterOrder="o">
<wsdl:input message="impl:getApplicationRequest"
name="getApplicationRequest" />
<wsdl:blush:utput message="impl:getApplicationResponse"
name="getApplicationResponse" />
<wsdl:fault message="impl:provisionFault" name="ProvisionFault" />
</wsdl:blush:peration>
- <wsdl:blush:peration name="getBean" parameterOrder="o">
<wsdl:input message="impl:getBeanRequest" name="getBeanRequest" />
<wsdl:blush:utput message="impl:getBeanResponse" name="getBeanResponse" />

<wsdl:fault message="impl:provisionFault" name="ProvisionFault" />
</wsdl:blush:peration>
- <wsdl:blush:peration name="getServers">
<wsdl:input message="impl:getServersRequest" name="getServersRequest"
/>
<wsdl:blush:utput message="impl:getServersResponse"
name="getServersResponse" />
<wsdl:fault message="impl:provisionFault" name="ProvisionFault" />
</wsdl:blush:peration>
</wsdl:portType>
- <wsdl:binding name="ProvisionServiceSoapBinding"
type="impl:provisioningService">
<wsdlsoap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:blush:peration name="getApplication">
<wsdlsoap:blush:peration soapAction="" />
- <wsdl:input name="getApplicationRequest">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:provisionService" use="encoded" />
</wsdl:input>
- <wsdl:blush:utput name="getApplicationResponse">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:provisionService" use="encoded" />
</wsdl:blush:utput>
- <wsdl:fault name="ProvisionFault">
<wsdlsoap:fault
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
name="ProvisionFault" namespace="urn:provisionService" use="encoded" />

</wsdl:fault>
</wsdl:blush:peration>
- <wsdl:blush:peration name="getBean">
<wsdlsoap:blush:peration soapAction="" />
- <wsdl:input name="getBeanRequest">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:provisionService" use="encoded" />
</wsdl:input>
- <wsdl:blush:utput name="getBeanResponse">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:provisionService" use="encoded" />
</wsdl:blush:utput>
- <wsdl:fault name="ProvisionFault">
<wsdlsoap:fault
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
name="ProvisionFault" namespace="urn:provisionService" use="encoded" />

</wsdl:fault>
</wsdl:blush:peration>
- <wsdl:blush:peration name="getServers">
<wsdlsoap:blush:peration soapAction="" />
- <wsdl:input name="getServersRequest">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:provisionService" use="encoded" />
</wsdl:input>
- <wsdl:blush:utput name="getServersResponse">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:provisionService" use="encoded" />
</wsdl:blush:utput>
- <wsdl:fault name="ProvisionFault">
<wsdlsoap:fault
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
name="ProvisionFault" namespace="urn:provisionService" use="encoded" />

</wsdl:fault>
</wsdl:blush:peration>
</wsdl:binding>
- <wsdl:service name="ProvisioningServiceService">
- <wsdl:port binding="impl:provisionServiceSoapBinding"
name="ProvisionService">
<wsdlsoap:address
location="http://192.168.20.129:8080/ProvisionService/services/ProvisionService"
/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

=====================
proxy.cs file
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.42
//
// Changes to this file may cause incorrect behavior and will be
lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

//
// This source code was auto-generated by Microsoft.VSDesigner, Version
2.0.50727.42.
//
#pragma warning disable 1591

namespace ConsoleApplication1.Aaron {
using System.Diagnostics;
using System.Web.Services;
using System.ComponentModel;
using System.Web.Services.Protocols;
using System;
using System.Xml.Serialization;


/// <remarks/>

[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services",
"2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]

[System.Web.Services.WebServiceBindingAttribute(Name="ProvisionServiceSoapBinding",
Namespace="urn:provisionService")]

[System.Xml.Serialization.SoapIncludeAttribute(typeof(ProvisionFault))]
[System.Xml.Serialization.SoapIncludeAttribute(typeof(DispServer))]
public partial class ProvisioningServiceService :
System.Web.Services.Protocols.SoapHttpClientProtocol {

private System.Threading.SendOrPostCallback
getApplicationOperationCompleted;

private System.Threading.SendOrPostCallback
getBeanOperationCompleted;

private System.Threading.SendOrPostCallback
getServersOperationCompleted;

private bool useDefaultCredentialsSetExplicitly;

/// <remarks/>
public ProvisioningServiceService() {
this.Url =
global::ConsoleApplication1.Properties.Settings.Default.ConsoleApplication1_Aaron_ProvisioningServiceService;
if ((this.IsLocalFileSystemWebService(this.Url) == true)) {
this.UseDefaultCredentials = true;
this.useDefaultCredentialsSetExplicitly = false;
}
else {
this.useDefaultCredentialsSetExplicitly = true;
}
}

public new string Url {
get {
return base.Url;
}
set {
if ((((this.IsLocalFileSystemWebService(base.Url) ==
true)
&& (this.useDefaultCredentialsSetExplicitly
== false))
&& (this.IsLocalFileSystemWebService(value)
== false))) {
base.UseDefaultCredentials = false;
}
base.Url = value;
}
}

public new bool UseDefaultCredentials {
get {
return base.UseDefaultCredentials;
}
set {
base.UseDefaultCredentials = value;
this.useDefaultCredentialsSetExplicitly = true;
}
}

/// <remarks/>
public event getApplicationCompletedEventHandler
getApplicationCompleted;

/// <remarks/>
public event getBeanCompletedEventHandler getBeanCompleted;

/// <remarks/>
public event getServersCompletedEventHandler
getServersCompleted;

/// <remarks/>
[System.Web.Services.Protocols.SoapRpcMethodAttribute("",
RequestNamespace="urn:provisionService",
ResponseNamespace="urn:provisionService")]
[return:
System.Xml.Serialization.SoapElementAttribute("getApplicationReturn")]
public Application getApplication(Application o) {
object[] results = this.Invoke("getApplication", new
object[] {
o});
return ((Application)(results[0]));
}

/// <remarks/>
public void getApplicationAsync(Application o) {
this.getApplicationAsync(o, null);
}

/// <remarks/>
public void getApplicationAsync(Application o, object
userState) {
if ((this.getApplicationOperationCompleted == null)) {
this.getApplicationOperationCompleted = new
System.Threading.SendOrPostCallback(this.OngetApplicationOperationCompleted);
}
this.InvokeAsync("getApplication", new object[] {
o}, this.getApplicationOperationCompleted,
userState);
}

private void OngetApplicationOperationCompleted(object arg) {
if ((this.getApplicationCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs
invokeArgs =
((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.getApplicationCompleted(this, new
getApplicationCompletedEventArgs(invokeArgs.Results, invokeArgs.Error,
invokeArgs.Cancelled, invokeArgs.UserState));
}
}

/// <remarks/>
[System.Web.Services.Protocols.SoapRpcMethodAttribute("",
RequestNamespace="urn:provisionService",
ResponseNamespace="urn:provisionService")]
[return:
System.Xml.Serialization.SoapElementAttribute("getBeanReturn")]
public object getBean(object o) {
object[] results = this.Invoke("getBean", new object[] {
o});
return ((object)(results[0]));
}

/// <remarks/>
public void getBeanAsync(object o) {
this.getBeanAsync(o, null);
}

/// <remarks/>
public void getBeanAsync(object o, object userState) {
if ((this.getBeanOperationCompleted == null)) {
this.getBeanOperationCompleted = new
System.Threading.SendOrPostCallback(this.OngetBeanOperationCompleted);
}
this.InvokeAsync("getBean", new object[] {
o}, this.getBeanOperationCompleted, userState);
}

private void OngetBeanOperationCompleted(object arg) {
if ((this.getBeanCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs
invokeArgs =
((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.getBeanCompleted(this, new
getBeanCompletedEventArgs(invokeArgs.Results, invokeArgs.Error,
invokeArgs.Cancelled, invokeArgs.UserState));
}
}

/// <remarks/>
[System.Web.Services.Protocols.SoapRpcMethodAttribute("",
RequestNamespace="urn:provisionService",
ResponseNamespace="urn:provisionService")]
[return:
System.Xml.Serialization.SoapElementAttribute("getServersReturn")]
public DispServer[] getServers() {
object[] results = this.Invoke("getServers", new
object[0]);
return ((DispServer[])(results[0]));
}

/// <remarks/>
public void getServersAsync() {
this.getServersAsync(null);
}

/// <remarks/>
public void getServersAsync(object userState) {
if ((this.getServersOperationCompleted == null)) {
this.getServersOperationCompleted = new
System.Threading.SendOrPostCallback(this.OngetServersOperationCompleted);
}
this.InvokeAsync("getServers", new object[0],
this.getServersOperationCompleted, userState);
}

private void OngetServersOperationCompleted(object arg) {
if ((this.getServersCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs
invokeArgs =
((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.getServersCompleted(this, new
getServersCompletedEventArgs(invokeArgs.Results, invokeArgs.Error,
invokeArgs.Cancelled, invokeArgs.UserState));
}
}

/// <remarks/>
public new void CancelAsync(object userState) {
base.CancelAsync(userState);
}

private bool IsLocalFileSystemWebService(string url) {
if (((url == null)
|| (url == string.Empty))) {
return false;
}
System.Uri wsUri = new System.Uri(url);
if (((wsUri.Port >= 1024)
&& (string.Compare(wsUri.Host, "localHost",
System.StringComparison.OrdinalIgnoreCase) == 0))) {
return true;
}
return false;
}
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml",
"2.0.50727.42")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]

[System.Xml.Serialization.SoapTypeAttribute(Namespace="urn:provisionServiceBean_System")]
public partial class Application {

private string descField;

private System.Nullable<int> idField;

/// <remarks/>

[System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]
public string desc {
get {
return this.descField;
}
set {
this.descField = value;
}
}

/// <remarks/>

[System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]
public System.Nullable<int> id {
get {
return this.idField;
}
set {
this.idField = value;
}
}
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml",
"2.0.50727.42")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]

[System.Xml.Serialization.SoapTypeAttribute(Namespace="urn:provisionServiceFault")]
public partial class ProvisionFault {

private FaultCause faultCauseField;

private string messageField;

/// <remarks/>

[System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]
public FaultCause faultCause {
get {
return this.faultCauseField;
}
set {
this.faultCauseField = value;
}
}

/// <remarks/>

[System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]
public string message {
get {
return this.messageField;
}
set {
this.messageField = value;
}
}
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml",
"2.0.50727.42")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]

[System.Xml.Serialization.SoapTypeAttribute(Namespace="urn:provisionServiceFault")]
public partial class FaultCause {

private int codeField;

private string messageField;

/// <remarks/>
public int code {
get {
return this.codeField;
}
set {
this.codeField = value;
}
}

/// <remarks/>

[System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]
public string message {
get {
return this.messageField;
}
set {
this.messageField = value;
}
}
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml",
"2.0.50727.42")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]

[System.Xml.Serialization.SoapTypeAttribute(Namespace="urn:provisionServiceBean_System")]
public partial class DispServer {

private System.Nullable<int> deletedField;

private System.Nullable<int> idField;

private string machineNameField;

private string serverNameField;

private System.Nullable<int> siteIdField;

/// <remarks/>

[System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]
public System.Nullable<int> deleted {
get {
return this.deletedField;
}
set {
this.deletedField = value;
}
}

/// <remarks/>

[System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]
public System.Nullable<int> id {
get {
return this.idField;
}
set {
this.idField = value;
}
}

/// <remarks/>

[System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]
public string machineName {
get {
return this.machineNameField;
}
set {
this.machineNameField = value;
}
}

/// <remarks/>

[System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]
public string serverName {
get {
return this.serverNameField;
}
set {
this.serverNameField = value;
}
}

/// <remarks/>

[System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]
public System.Nullable<int> siteId {
get {
return this.siteIdField;
}
set {
this.siteIdField = value;
}
}
}

/// <remarks/>

[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services",
"2.0.50727.42")]
public delegate void getApplicationCompletedEventHandler(object
sender, getApplicationCompletedEventArgs e);

/// <remarks/>

[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services",
"2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class getApplicationCompletedEventArgs :
System.ComponentModel.AsyncCompletedEventArgs {

private object[] results;

internal getApplicationCompletedEventArgs(object[] results,
System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}

/// <remarks/>
public Application Result {
get {
this.RaiseExceptionIfNecessary();
return ((Application)(this.results[0]));
}
}
}

/// <remarks/>

[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services",
"2.0.50727.42")]
public delegate void getBeanCompletedEventHandler(object sender,
getBeanCompletedEventArgs e);

/// <remarks/>

[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services",
"2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class getBeanCompletedEventArgs :
System.ComponentModel.AsyncCompletedEventArgs {

private object[] results;

internal getBeanCompletedEventArgs(object[] results,
System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}

/// <remarks/>
public object Result {
get {
this.RaiseExceptionIfNecessary();
return ((object)(this.results[0]));
}
}
}

/// <remarks/>

[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services",
"2.0.50727.42")]
public delegate void getServersCompletedEventHandler(object sender,
getServersCompletedEventArgs e);

/// <remarks/>

[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services",
"2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class getServersCompletedEventArgs :
System.ComponentModel.AsyncCompletedEventArgs {

private object[] results;

internal getServersCompletedEventArgs(object[] results,
System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}

/// <remarks/>
public DispServer[] Result {
get {
this.RaiseExceptionIfNecessary();
return ((DispServer[])(this.results[0]));
}
}
}
}

#pragma warning restore 1591
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top