This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Web Services and the fly likes Need help in writing WebService client using XMLBeans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Need help in writing WebService client using XMLBeans" Watch "Need help in writing WebService client using XMLBeans" New topic
Author

Need help in writing WebService client using XMLBeans

pramodh somashekara
Ranch Hand

Joined: Jan 30, 2006
Posts: 62
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>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need help in writing WebService client using XMLBeans
 
Similar Threads
XMLSpy won't work with our AXIS2 WSDL but our system works with it fine
Axis2 Issue, Please Help!
axis2/webshpere response != axis2/glassfish response........ why?
complextype with Axis2
XmlException on calling WSDL2Java