Hi,
the web service i am accessing is written in vb.net, but i am testing now with 
the C# suppliers sample. when I used the wsdl2java this file was created:
If this is the correct file, how can I read the dataset using that file?
/**
 * ShowSuppliersResponseShowSuppliersResult.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
 */

package org.tempuri;

public class ShowSuppliersResponseShowSuppliersResult  implements 
java.io.Serializable, org.apache.axis.encoding.AnyContentType {
    private org.apache.axis.message.MessageElement [] _any;

    public ShowSuppliersResponseShowSuppliersResult() {
    }

    public ShowSuppliersResponseShowSuppliersResult(
           org.apache.axis.message.MessageElement [] _any) {
           this._any = _any;
    }


    /**
     * Gets the _any value for this ShowSuppliersResponseShowSuppliersResult.
     * 
     * @return _any
     */
    public org.apache.axis.message.MessageElement [] get_any() {
        return _any;
    }


    /**
     * Sets the _any value for this ShowSuppliersResponseShowSuppliersResult.
     * 
     * @param _any
     */
    public void set_any(org.apache.axis.message.MessageElement [] _any) {
        this._any = _any;
    }

    private java.lang.Object __equalsCalc = null;
    public synchronized boolean equals(java.lang.Object obj) {
        if (!(obj instanceof ShowSuppliersResponseShowSuppliersResult)) return 
false;
        ShowSuppliersResponseShowSuppliersResult other = 
(ShowSuppliersResponseShowSuppliersResult) obj;
        if (obj == null) return false;
        if (this == obj) return true;
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = true && 
            ((this._any==null && other.get_any()==null) || 
             (this._any!=null &&
              java.util.Arrays.equals(this._any, other.get_any())));
        __equalsCalc = null;
        return _equals;
    }

    private boolean __hashCodeCalc = false;
    public synchronized int hashCode() {
        if (__hashCodeCalc) {
            return 0;
        }
        __hashCodeCalc = true;
        int _hashCode = 1;
        if (get_any() != null) {
            for (int i=0;
                 i<java.lang.reflect.Array.getLength(get_any());
                 i++) {
                java.lang.Object obj = java.lang.reflect.Array.get(get_any(), 
i);
                if (obj != null &&
                    !obj.getClass().isArray()) {
                    _hashCode += obj.hashCode();
                }
            }
        }
        __hashCodeCalc = false;
        return _hashCode;
    }

    // Type metadata
    private static org.apache.axis.description.TypeDesc typeDesc =
        new 
org.apache.axis.description.TypeDesc(ShowSuppliersResponseShowSuppliersResult.class,
 true);

    static {
        typeDesc.setXmlType(new 
javax.xml.namespace.QName("http://tempuri.org/";, 
">>ShowSuppliersResponse>ShowSuppliersResult"));
    }

    /**
     * Return type metadata object
     */
    public static org.apache.axis.description.TypeDesc getTypeDesc() {
        return typeDesc;
    }

    /**
     * Get Custom Serializer
     */
    public static org.apache.axis.encoding.Serializer getSerializer(
           java.lang.String mechType, 
           java.lang.Class _javaType,  
           javax.xml.namespace.QName _xmlType) {
        return 
          new  org.apache.axis.encoding.ser.BeanSerializer(
            _javaType, _xmlType, typeDesc);
    }

    /**
     * Get Custom Deserializer
     */
    public static org.apache.axis.encoding.Deserializer getDeserializer(
           java.lang.String mechType, 
           java.lang.Class _javaType,  
           javax.xml.namespace.QName _xmlType) {
        return 
          new  org.apache.axis.encoding.ser.BeanDeserializer(
            _javaType, _xmlType, typeDesc);
    }

}
thx.
sam.

----- Original Message ----
From: Mark Lin <[EMAIL PROTECTED]>
To: axis-user@ws.apache.org
Sent: Tuesday, January 9, 2007 3:19:36 PM
Subject: Re: consuming a .Net Dataset webservice

Hi,

What's your problem with the dataset? I checked c# dataset and it is different 
from traditional ado recordset and it is purely a collection of data, 
disconnected from any datasource, such as a db table, or an xml file. I guess 
the c# dataset might be mapped to a kind of java collection, such as arraylist 
or whatever. You can find the corresponding java collection in your java stub 
class that is generated from the C#  webservice.


 

Mark

 

On 1/9/07, sam sam <[EMAIL PROTECTED]> wrote:



Hi,
The problem is that I am writing an application that connects to an existing 
web service that I cannot control, I do not have access to the code and I 
cannot change it.

My java program has to communicate with the .Net web service as is.

thx.
sam. 



----- Original Message ----
From: Mark Lin <
[EMAIL PROTECTED]>
To: axis-user@ws.apache.org
Sent: Monday, January 8, 2007 3:58:22 PM

Subject: Re: consuming a .Net Dataset webservice


Probably it's better for your web service to return a collection of c# objects, 
each of which stores a row of data from your dataset.  The reason is that your 
java client might not get a corresponding resultset from your c# web service. I 
might be wrong. 


 

Mark 

 

On 1/8/07, sam sam <[EMAIL PROTECTED]
> wrote: 
Hi,
I have a .Net Webservice function that is returning a dataset, how can I read 
the dataset in my java program? 

I have run the wsdl2java and it generated 
ShowSuppliersResponseShowSuppliersResult.java for my suppliers.asmx file and my 
Show suppliers function.
How can I read the dataset?

thx.
sam.



__________________________________________________ 

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


--------------------------------------------------------------------- 
To unsubscribe, e-mail: 
[EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] 




 





__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around 

http://mail.yahoo.com 








__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to