• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Need help in writing WebService client using XMLBeans

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi, i'm new to webservices and need your help in writing webservice client which takes input as an object and return type is also an object using XMLBeans as databinding mechanism. Please find the attached WSDL file for ref. Thanks inadvance

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xsd="http://xyz.com" xmlns:ax21="http://xyz.com/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://xyz.com">
<wsdl:types>
<xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://xyz.com/xsd">
<xs:complexType name="InputObj">
<xs:sequence>
<xs:element minOccurs="0" name="empNo" nillable="true" type="xs:double"/>
<xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="OutputObj">
<xs:sequence>
<xs:element minOccurs="0" name="company" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="designation" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="empNo" nillable="true" type="xs:double"/>
<xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
<xs:schema xmlns:ax22="http://xyz.com/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://xyz.com">
<xs:import namespace="http://xyz.com/xsd"/>
<xs:element name="getOutput">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="inputObj" nillable="true" type="ax22:InputObj"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="getOutputResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" nillable="true" type="ax22:OutputObj"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</wsdl:types>
<wsdl:message name="getOutputRequest">
<wsdl:part name="parameters" element="xsd:getOutput"/>
</wsdl:message>
<wsdl:message name="getOutputResponse">
<wsdl:part name="parameters" element="xsd:getOutputResponse"/>
</wsdl:message>
<wsdl:portType name="ServiceDefPortType">
<wsdl:operation name="getOutput">
<wsdl:input message="xsd:getOutputRequest" wsaw:Action="urn:getOutput"/>
<wsdl:output message="xsd:getOutputResponse" wsaw:Action="urn:getOutputResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="ServiceDefSoap11Binding" type="xsd:ServiceDefPortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<wsdl:operation name="getOutput">
<soap:operation soapAction="urn:getOutput" 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="ServiceDefSoap12Binding" type="xsd:ServiceDefPortType">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<wsdl:operation name="getOutput">
<soap12:operation soapAction="urn:getOutput" 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="ServiceDefHttpBinding" type="xsd:ServiceDefPortType">
<http:binding verb="POST"/>
<wsdl:operation name="getOutput">
<http:operation location="ServiceDef/getOutput"/>
<wsdl:input>
<mime:content type="text/xml" part="getOutput"/>
</wsdl:input>
<wsdl:output>
<mime:content type="text/xml" part="getOutput"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="ServiceDef">
<wsdl:port name="ServiceDefHttpSoap11Endpoint" binding="xsd:ServiceDefSoap11Binding">
<soap:address location="http://localhost:8080/axis2/services/ServiceDef"/>
</wsdl:port>
<wsdl:port name="ServiceDefHttpSoap12Endpoint" binding="xsd:ServiceDefSoap12Binding">
<soap12:address location="http://localhost:8080/axis2/services/ServiceDef"/>
</wsdl:port>
<wsdl:port name="ServiceDefHttpEndpoint" binding="xsd:ServiceDefHttpBinding">
<http:address location="http://localhost:8080/axis2/services/ServiceDef"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
 
reply
    Bookmark Topic Watch Topic
  • New Topic