NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
ranju
Joined: 11 Jan 2011 Posts: 2 Location: 99
|
Posted: Tue Jan 11, 2011 9:14 am Post subject: Unable to access custom class members of axis2 webservice on client side |
|
|
Dear Sir,
I have created an axis2 webservice using netbeans6.7 .This webservice's methods consumes and return some custom class objects.But when this webservice is hosted on tomcat server these custom class members are not available in .net client. Please help how to automatically create bindings for these classes through build.xml.I have tried using wsdl2java converter but still mappings are not generated.Also definition for custom classes are not generated in wsdl file
Please help
My build.xml code
-------------------------
<?xml version="1.0" encoding="UTF-8"?>
<project name="MapleWebService" default="default" basedir=".">
<description>Builds, tests, and runs the project MapleWebService.</description>
<import file="nbproject/build-impl.xml"/>
<!-- Defining the properties for this build.xml -->
<property name="local.wsdl" value="/MapleClass.wsdl" />
<property name="gen.dir" value="src" />
<property name="service.url" value="http://192.168.1.18:8080/${ant.project.name}"/>
<target name="wsdl2java">
<axis-wsdl2java output="${gen.dir}" testcase="true" verbose="true" url="${local.wsdl}" serverside="false">
<mapping
namespace="${service.url}" package="Maple" />
</axis-wsdl2java>
</target>
</project>
My custom class
-------------------
package Maple;
import java.io.File;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
public class CommonClassServer implements Serializable
{
public class AgentDetails implements Serializable
{
private static final long serialVersionUID = 1L;
private int _id;
private String _agentcode="";
private String _name="";
private String _contactno="";
private String _email="";
private String _collegeid="";
private String _collegename="";
private String _company="";
private String _doj="";
private String _dob="";
private String _password="";
private boolean _isapproved=false;
private String _approvedby="";
private String _returnmessage="";
private String _approvaldate="";
private List<String> _columns=new ArrayList<String>();
public int getId(){return _id;}
public void setId(int value){_id=value;}
public String getAgentCode(){return _agentcode;}
public void setAgentCode(String value){_agentcode=value;}
public String getContactNo(){return _contactno;}
public void setContactNo(String value){_contactno=value;}
public String getName(){return _name;}
public void setName(String value){_name=value;}
public String getEmail(){return _email;}
public void setEmaile(String value){_email=value;}
public String getCollegeId(){return _collegeid;}
public void setCollegeId(String value){_collegeid=value;}
public String getCollegeName(){return _collegename;}
public void setCollegeName(String value){_collegename=value;}
public String getCompany(){return _company;}
public void setCompany(String value){_company=value;}
public String getDOJ(){return _doj;}
public void setDOJ(String value){_doj=value;}
public String getDOB(){return _dob;}
public void setDOB(String value){_dob=value;}
public String getPassword(){return _password;}
public void setPassword(String value){_password=value;}
public Boolean getIsApproved(){return _isapproved;}
public void setIsApproved(Boolean value){_isapproved=value;}
public String getApprovedBy(){return _approvedby;}
public void setApprovedBy(String value){_approvedby=value;}
public String getReturnMessage(){return _returnmessage;}
public void setReturnMessage(String value){_returnmessage=value;}
public String getApprovalDate(){return _approvaldate;}
public void setApprovalDate(String value){_approvaldate=value;}
public List<String> getColumns(){return _columns;}
public void setColumns(List<String> value){_columns=value;}
}
public class CollegeDetails implements Serializable
{
private static final long serialVersionUID = 1L;
public String _collegeid="";
public String _collegename="";
public File _logo;
public String _address="";
public String _phone="";
public String _returnmessage="";
public String getCollegeId(){return _collegeid;}
public void setCollegeId(String value){_collegeid=value;}
public String getName(){return _collegename;}
public void setName(String value){_collegename=value;}
public File getLogo(){return _logo;}
public void setLogo(File value){_logo=value;}
public String getAddress(){return _address;}
public void setAddress(String value){_address=value;}
public String getPhone(){return _phone;}
public void setPhone(String value){_phone=value;}
public String getReturnMessage(){return _returnmessage;}
public void setReturnMessage(String value){_returnmessage=value;}
}
}
WSDL File
----------------
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:axis2="http://ws.apache.org/axis2" xmlns:ns1="http://ws.apache.org/axis2xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ns0="http://ws.apache.org/axis2/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://ws.apache.org/axis2">
<wsdl:types>
<xs:schema xmlns:ax21="http://ws.apache.org/axis2/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://ws.apache.org/axis2/xsd">
<xs:complexType name="CommonClassServer$AgentDetails">
<xs:sequence/>
</xs:complexType>
</xs:schema>
<xs:schema xmlns:ns="http://ws.apache.org/axis2xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://ws.apache.org/axis2xsd">
<xs:element name="ApproveAgent">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="Sessionid" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="UserId" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="Password" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="AgentRowId" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ApproveAgentResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" nillable="true" type="ns0:CommonClassServer$AgentDetails"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="getAllApprovedAgentDetailsForMonth">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="Sessionid" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="UserId" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="Password" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="month" type="xs:int"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="getAllApprovedAgentDetailsForMonthResponse">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ns0:CommonClassServer$AgentDetails"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="getAllUnApprovedAgentDetailsForMonth">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="Sessionid" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="UserId" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="Password" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="month" type="xs:int"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="getAllUnApprovedAgentDetailsForMonthResponse">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ns0:CommonClassServer$AgentDetails"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AddAgentDetails">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="agtDetails" nillable="true" type="ns0:CommonClassServer$AgentDetails"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AddAgentDetailsResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="CheckLogin">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="Userid" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="Password" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="Role" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="CheckLoginResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</wsdl:types>
<wsdl:message name="getAllUnApprovedAgentDetailsForMonthRequest">
<wsdl:part name="parameters" element="ns1:getAllUnApprovedAgentDetailsForMonth"/>
</wsdl:message>
<wsdl:message name="getAllUnApprovedAgentDetailsForMonthResponse">
<wsdl:part name="parameters" element="ns1:getAllUnApprovedAgentDetailsForMonthResponse"/>
</wsdl:message>
<wsdl:message name="AddAgentDetailsRequest">
<wsdl:part name="parameters" element="ns1:AddAgentDetails"/>
</wsdl:message>
<wsdl:message name="AddAgentDetailsResponse">
<wsdl:part name="parameters" element="ns1:AddAgentDetailsResponse"/>
</wsdl:message>
<wsdl:message name="CheckLoginRequest">
<wsdl:part name="parameters" element="ns1:CheckLogin"/>
</wsdl:message>
<wsdl:message name="CheckLoginResponse">
<wsdl:part name="parameters" element="ns1:CheckLoginResponse"/>
</wsdl:message>
<wsdl:message name="getAllApprovedAgentDetailsForMonthRequest">
<wsdl:part name="parameters" element="ns1:getAllApprovedAgentDetailsForMonth"/>
</wsdl:message>
<wsdl:message name="getAllApprovedAgentDetailsForMonthResponse">
<wsdl:part name="parameters" element="ns1:getAllApprovedAgentDetailsForMonthResponse"/>
</wsdl:message>
<wsdl:message name="ApproveAgentRequest">
<wsdl:part name="parameters" element="ns1:ApproveAgent"/>
</wsdl:message>
<wsdl:message name="ApproveAgentResponse">
<wsdl:part name="parameters" element="ns1:ApproveAgentResponse"/>
</wsdl:message>
<wsdl:portType name="MapleClassPortType">
<wsdl:operation name="getAllUnApprovedAgentDetailsForMonth">
<wsdl:input message="axis2:getAllUnApprovedAgentDetailsForMonthRequest" wsaw:Action="urn:getAllUnApprovedAgentDetailsForMonth"/>
<wsdl:output message="axis2:getAllUnApprovedAgentDetailsForMonthResponse" wsaw:Action="urn:getAllUnApprovedAgentDetailsForMonthResponse"/>
</wsdl:operation>
<wsdl:operation name="AddAgentDetails">
<wsdl:input message="axis2:AddAgentDetailsRequest" wsaw:Action="urn:AddAgentDetails"/>
<wsdl:output message="axis2:AddAgentDetailsResponse" wsaw:Action="urn:AddAgentDetailsResponse"/>
</wsdl:operation>
<wsdl:operation name="CheckLogin">
<wsdl:input message="axis2:CheckLoginRequest" wsaw:Action="urn:CheckLogin"/>
<wsdl:output message="axis2:CheckLoginResponse" wsaw:Action="urn:CheckLoginResponse"/>
</wsdl:operation>
<wsdl:operation name="getAllApprovedAgentDetailsForMonth">
<wsdl:input message="axis2:getAllApprovedAgentDetailsForMonthRequest" wsaw:Action="urn:getAllApprovedAgentDetailsForMonth"/>
<wsdl:output message="axis2:getAllApprovedAgentDetailsForMonthResponse" wsaw:Action="urn:getAllApprovedAgentDetailsForMonthResponse"/>
</wsdl:operation>
<wsdl:operation name="ApproveAgent">
<wsdl:input message="axis2:ApproveAgentRequest" wsaw:Action="urn:ApproveAgent"/>
<wsdl:output message="axis2:ApproveAgentResponse" wsaw:Action="urn:ApproveAgentResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="MapleClassSOAP11Binding" type="axis2:MapleClassPortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<wsdl:operation name="getAllUnApprovedAgentDetailsForMonth">
<soap:operation soapAction="urn:getAllUnApprovedAgentDetailsForMonth" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="AddAgentDetails">
<soap:operation soapAction="urn:AddAgentDetails" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="CheckLogin">
<soap:operation soapAction="urn:CheckLogin" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getAllApprovedAgentDetailsForMonth">
<soap:operation soapAction="urn:getAllApprovedAgentDetailsForMonth" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="ApproveAgent">
<soap:operation soapAction="urn:ApproveAgent" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="MapleClassSOAP12Binding" type="axis2:MapleClassPortType">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<wsdl:operation name="getAllUnApprovedAgentDetailsForMonth">
<soap12:operation soapAction="urn:getAllUnApprovedAgentDetailsForMonth" style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="AddAgentDetails">
<soap12:operation soapAction="urn:AddAgentDetails" style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="CheckLogin">
<soap12:operation soapAction="urn:CheckLogin" style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getAllApprovedAgentDetailsForMonth">
<soap12:operation soapAction="urn:getAllApprovedAgentDetailsForMonth" style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="ApproveAgent">
<soap12:operation soapAction="urn:ApproveAgent" style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="MapleClassHttpBinding" type="axis2:MapleClassPortType">
<http:binding verb="POST"/>
<wsdl:operation name="getAllUnApprovedAgentDetailsForMonth">
<http:operation location="MapleClass/getAllUnApprovedAgentDetailsForMonth"/>
<wsdl:input>
<mime:content type="text/xml" part="getAllUnApprovedAgentDetailsForMonth"/>
</wsdl:input>
<wsdl:output>
<mime:content type="text/xml" part="getAllUnApprovedAgentDetailsForMonth"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="AddAgentDetails">
<http:operation location="MapleClass/AddAgentDetails"/>
<wsdl:input>
<mime:content type="text/xml" part="AddAgentDetails"/>
</wsdl:input>
<wsdl:output>
<mime:content type="text/xml" part="AddAgentDetails"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="CheckLogin">
<http:operation location="MapleClass/CheckLogin"/>
<wsdl:input>
<mime:content type="text/xml" part="CheckLogin"/>
</wsdl:input>
<wsdl:output>
<mime:content type="text/xml" part="CheckLogin"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getAllApprovedAgentDetailsForMonth">
<http:operation location="MapleClass/getAllApprovedAgentDetailsForMonth"/>
<wsdl:input>
<mime:content type="text/xml" part="getAllApprovedAgentDetailsForMonth"/>
</wsdl:input>
<wsdl:output>
<mime:content type="text/xml" part="getAllApprovedAgentDetailsForMonth"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="ApproveAgent">
<http:operation location="MapleClass/ApproveAgent"/>
<wsdl:input>
<mime:content type="text/xml" part="ApproveAgent"/>
</wsdl:input>
<wsdl:output>
<mime:content type="text/xml" part="ApproveAgent"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="MapleClass">
<wsdl:port name="MapleClassSOAP11port_http" binding="axis2:MapleClassSOAP11Binding">
<soap:address location="http://localhost:8080/axis2/services/MapleClass"/>
</wsdl:port>
<wsdl:port name="MapleClassSOAP12port_http" binding="axis2:MapleClassSOAP12Binding">
<soap12:address location="http://localhost:8080/axis2/services/MapleClass"/>
</wsdl:port>
<wsdl:port name="MapleClassHttpport" binding="axis2:MapleClassHttpBinding">
<http:address location="http://localhost:8080/axis2/services/MapleClass"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Thanks
Ranju Malhotra |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|