Forum Stats

  • 3,854,156 Users
  • 2,264,328 Discussions
  • 7,905,580 Comments

Discussions

Incorrect web service types generation

Andrey Dokuchaev
Andrey Dokuchaev Member Posts: 87 Blue Ribbon
edited Aug 27, 2014 9:21AM in JDeveloper and ADF

Hi all!

I use JDeveloper 11.1.1.3 to generate web service from WSDL. XSD file contains structure like this

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
           xmlns:tns="..." targetNamespace="...">
  <xs:element name="banks">
  <xs:complexType>
  <xs:sequence>
  <xs:element name="item" minOccurs="0" maxOccurs="unbounded">
  <xs:complexType>
  <xs:sequence>
  <xs:element name="bank_id" type="xs:long" minOccurs="0">
  </xs:element>
  <xs:element name="address" minOccurs="0">
  <xs:complexType>
  <xs:sequence>
  <xs:element name="item" minOccurs="0" maxOccurs="unbounded">
  <xs:complexType>
  <xs:sequence>
  <xs:element name="addresstype" minOccurs="0">
  <xs:simpleType>
  <xs:restriction base="xs:string">
  <xs:maxLength value="100"/>
  </xs:restriction>
  </xs:simpleType>
  </xs:element>
  more elements...
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  </xs:sequence>
  </xs:complexType>
  </xs:element>
</xs:schema>

Wizard create java class like this:

package ru.rdtex.b2b.registration.view.contragents.types;

public class testBanks {
    public static class Item {
        public static class Address {
             public static class Item {
            }
        }
    }
}

Compilations give me error

  • Error(6,29): ru.rdtex.b2b.registration.view.contragents.types.testBanks.Item is already defined in ru.rdtex.b2b.registration.view.contragents.types.testBanks

How can I avoid this situation? XSD file structure is incorrect? Or it's maybe a bug in wizard?

Tagged:

Answers

  • kdario
    kdario Member Posts: 3,533 Silver Crown
     How can I avoid this situation? XSD file structure is incorrect? Or it's maybe a bug in wizard?
    

    It is hard to say from this partial example.

    You can try to generate ws in newer version of jdev(for example, 12c), or in some other technology(Apache CXF, JAX-WS (Metro), ...)

    Dario

  • Andrey Dokuchaev
    Andrey Dokuchaev Member Posts: 87 Blue Ribbon

    Same in JDev 12c. :-(

  • kdario
    kdario Member Posts: 3,533 Silver Crown

    At least, it is consistent

    You can try to generate ws in some other technology/tool and this will show you if wsdl is correct or not.

    If you can generate ws in some other tool, then your options are:

    - create service request (if you have support account)

    - don't use jdev for this task

    - change wsdl/xsd (if possible)

    Dario

This discussion has been closed.