• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Need help in writing WebService client using XMLBeans  RSS feed

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • 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">
<wsdlperation name="getOutput">
<wsdl:input message="xsd:getOutputRequest" wsaw:Action="urn:getOutput"/>
<wsdlutput message="xsd:getOutputResponse" wsaw:Action="urn:getOutputResponse"/>
</wsdlperation>
</wsdl:portType>
<wsdl:binding name="ServiceDefSoap11Binding" type="xsd:ServiceDefPortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<wsdlperation name="getOutput">
<soapperation soapAction="urn:getOutput" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdlutput>
<soap:body use="literal"/>
</wsdlutput>
</wsdlperation>
</wsdl:binding>
<wsdl:binding name="ServiceDefSoap12Binding" type="xsd:ServiceDefPortType">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<wsdlperation name="getOutput">
<soap12peration soapAction="urn:getOutput" style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
<wsdlutput>
<soap12:body use="literal"/>
</wsdlutput>
</wsdlperation>
</wsdl:binding>
<wsdl:binding name="ServiceDefHttpBinding" type="xsd:ServiceDefPortType">
<http:binding verb="POST"/>
<wsdlperation name="getOutput">
<httpperation location="ServiceDef/getOutput"/>
<wsdl:input>
<mime:content type="text/xml" part="getOutput"/>
</wsdl:input>
<wsdlutput>
<mime:content type="text/xml" part="getOutput"/>
</wsdlutput>
</wsdlperation>
</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>
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!