DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21687>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21687

Getting null values while using accessing a  document style web service

[EMAIL PROTECTED] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From [EMAIL PROTECTED]  2003-07-17 15:04 -------
Hi,
  I have tested this case on my PC and its working fine.I'm using axis 1.1 
built on jun13 2003. I have the pasted the files that I have used from yours. 
Try to use them as it is.
Depoly.wsdd
  <service name="documentService" provider="java:RPC" style="wrapped" 
use="literal">
      <parameter name="wsdlTargetNamespace" value="urn:documentService"/>

      <parameter name="className" value="myprograms.documentstyle.document"/>
      
      <parameter name="allowedMethods" value="*"/>

      <typeMapping
        xmlns:ns="urn:documentService"
        qname="ns:detailsBean"
        type="java:myprograms.documentstyle.detailsBean"
        serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
        deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
        encodingStyle=""
      />
  </service>    
-----------------

detailsBean.java
package myprograms.documentstyle;

public class detailsBean {

    public String zip = null;
    public String city = null;
    public String state = null;
    public int phone;

}
--------------

document.java
package myprograms.documentstyle;

public class document {

    public detailsBean getDetails() {

                detailsBean bean = new detailsBean();
                bean.zip ="560025";
                bean.city ="Bangalore";
                bean.state ="Karnatka";
                bean.phone =555;

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


Now generate the stub using WSDL2Java and then try to run your client,you can
also try the below JSP file provided you have set the clasess properly.

jspclient.jsp
<html>
<%@ page import ="documentService_pkg.*,
                 javax.xml.rpc.Service,
                 java.net.URL" %>       
<body>
<%      
        javax.xml.rpc.Service service;
        java.net.URL endpoint = new java.net.URL
("http://localhost/??/services/documentService";);       
        DocumentServiceSoapBindingStub stub = new DocumentServiceSoapBindingStub
(endpoint,null);        
        try{    
        documentService_pkg.DetailsBean dB = stub.getDetails(); 
        out.println("-"  + dB.getCity());
        out.println("-" + dB.getState());
        }catch(Exception e){  out.println(e);}
%>
</body>
</html>

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

Now We can safely close this bug

Reply via email to