Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Generating WS Client from WSDL gives faulty code
Generating WS Client from WSDL gives faulty code [message #210117] Mon, 10 March 2008 15:15 Go to next message
Eclipse UserFriend
Originally posted by:

Hi - I have a problem generating a Web Services client from an existing
web service from its WSDL - the generated code contains errors.

The problem is that the wsdl file uses an MXMeta.xsd which contains
among other things these definitions:

<xsd:simpleType name="BooleanType">
<xsd:restriction base="xsd:boolean">
<xsd:pattern value="0|1" />

<xsd:complexType name="MXBooleanType">
<xsd:extension base="BooleanType">
<xsd:attribute name="changed" type="ChangeIndicatorType"
use="optional" />

From that I generate the web services client, which results in this
code in

public class MXBooleanType implements,
org.apache.axis.encoding.SimpleType {
private java.lang.Boolean changed; // attribute

public MXBooleanType() {

// Simple Types must have a String constructor
public MXBooleanType(boolean _value) {

which shows a compile error at the last super(_value) because there is
no such constructor for java.long.Object.

This looks like it missed to create the BooleanType, and making
MXBooleanType and extension of it. In this way, no actual boolean value
is kept anywhere ...

I tried the latest stable Europa release of Eclipse JEE
(eclipse-jee-europa-fall2-win32) and the latest build
(20080304-0640_eclipse-jee-ganymede-M5-win32.win32.x86) - both with the
same results.

I tried to fix that with two approaches:

1. fix the MXMeta.xsd to read:
<xsd:complexType name="MXBooleanType">
<xsd:extension base="xsd:boolean">
<xsd:attribute name="changed" type="ChangeIndicatorType"
use="optional" />

2. add explicit code for a boolean value to the generated

In both cases I will get compiling code, but the variable of type
MXBooleanType will still not be set correctly from the SOAP response
(which does contain values) - so somehow the machinery still doesn't
pick it up correctly.

Thanks for any help and hints!
Re: Generating WS Client from WSDL gives faulty code [message #1223393 is a reply to message #210117] Mon, 23 December 2013 08:53 Go to previous message
oon man is currently offline oon manFriend
Messages: 1
Registered: December 2013
Junior Member
These steps only success for retrieving data.
1. Change the WSDL file manually for every attribute from MXBooleanType type to MXStringType type.
2. Generate the WS Client
3. Retrieve the attribute value
Previous Topic:Deployment issue from glassfish 4.0 using eclipse plug-in
Next Topic:Could not publish to the server
Goto Forum:

Current Time: Sun Apr 22 06:55:55 GMT 2018

Powered by FUDForum. Page generated in 0.01880 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software