Hi

Previously I have been using Axis-rc1.
I've tried the same program with Axis-1.1.

Now the WSDL generated by AXIS is correct and I'm able to generate stub classes.

I'm getting the correct Soap response when I try to access the method using
?method=methodname on a URL.

However, when I try to access the bean from client, I'm still getting null values of 
various fields 
of the bean returned by function call.

1) deploy.wsdd
--------------------
deployment xmlns="http://xml.apache.org/axis/wsdd/"; 
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";>
        <service name="documentstyle" style="document">
        <parameter name="className" value="myprograms.documentstyle.document"/>
        <parameter name="allowedMethods" value="*"/>
        <beanMapping qname="myNS:detailsBean" xmlns:myNS="urn:BeanService" 
languageSpecificType="java:myprograms.documentstyle.detailsBean"/>
    </service>
</deployment>
--------------------

2)document.java (the main class, which implements the service)
-------------------

ackage myprograms.documentstyle;

public class document {


    public document() {
    }

    public      detailsBean getDetails() {

                detailsBean bean = new detailsBean();
                bean.setZip("560025");
                bean.setCity("Bangalore");
                bean.setState("Karnatka");
                bean.setPhone(555);

                return bean;
    }
}
-------------------


3)detailsBean.java(the java bean class)
---------------------
package myprograms.documentstyle;

public class detailsBean {
    
    String zip = null;
    String city = null;
    String state = null;
    int phone;

    public detailsBean() {
    }

    public void setZip(String theZip) {
                zip = theZip;
        }

        public String getZip() {
                return zip;
        }

        public void setCity(String theCity) {
                city = theCity;
        }

        public String getCity() {
                return city;
        }

        public void setState(String theState) {
                state= theState;
        }

        public String getState() {
                return state;
        }

        public void setPhone(int thePhone) {
                phone = thePhone;
        }

        public int getPhone() {
                return phone;
        }


}

---------------------


The SOAP response, when i invoke the function "getDetails" is as follows:

-----------------
HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Date: Thu, 17 Jul 2003 12:36:33 
GMT Server: Apache Coyote/1.0 Connection: close  <?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
 <soapenv:Body>
  <getDetailsReturn xmlns="http://documentstyle.myprograms";>
   <phone>555</phone>
   <zip>560025</zip>
   <state>Karnatka</state>
   <city>Bangalore</city>
  </getDetailsReturn>
 </soapenv:Body>
</soapenv:Envelope>
-----------------

However, when I try to access the fields (phone, zip etc..) from stub classes, i'm 
getting null values in case of string and 0 in case of integer.

Is this a bug in AXIS?

thanks & regards,
Naresh Agarwal          

-----Original Message-----
From: Balaji D L [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 17, 2003 4:26 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Possible bug in Axis while creation of stub classes from
WSDL2Java for Document style Web Service


If I understood your problem correctly, then I would
say it is NOT a bug!..
  I have been able to deploy a service which returns
object(java bean)with document/literal style.
  The generated wsdl is also correct. The service
works fine if i invoke a method with
?method=methodname on a URL. I'm also able generate
stub classes using wsdl2java, invoke and get results
back.
 Its also works fine with webservicestudio(.net). 
 Please see whether you have deployed the service
properly with proper de/serializer etc., 

Regards
Balaji
 --- Davanum Srinivas <[EMAIL PROTECTED]> wrote: >
Naresh,
> 
> Please log a bug report. I saw something similar
> yesterday.
> 
> Thanks,
> dims
> 
> --- "Agarwal, Naresh" <[EMAIL PROTECTED]>
> wrote:
> > Hi
> >  
> > I've developed a simple document style web service
> (contains a function, which return a bean)
> > using AXIS . I've generated the WSDL file for
> this.
> > The WSDL file generated by AXIS has two bugs
> (empty targetNameSpace and missing namespace
> > prefix) due to which WSDL2Java fails to generate
> stub classes.
> >  
> > I have manually edited the WSDL file and was able
> to generate the stub classes from WSDL2Java
> > tool.
> >  
> > I developed a client application from the stub
> classes. When I run the client, I am receiving
> > various fields of bean (return value of the
> function) as null. 
> > However,  I have checked from TCPMon and found
> that data is not null in Soap response.
> >  
> > Could any one help me out? Is there a bug in stub
> classes generated for document style Web
> > Service    
> >  
> > thanks & regards,
> > Naresh Agarwal
> >  
> >  
> >  
> >  
> >  
> > 
> 
> 
> =====
> Davanum Srinivas -
> http://webservices.apache.org/~dims/
> 
> __________________________________
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com 


http://mobile.yahoo.com.au - Yahoo! Mobile
- Check & compose your email via SMS on your Telstra or Vodafone mobile.

Reply via email to