Oracle Web Services On Demand Guide > Best Practices for Designing Client Application > Best Practices for Integration Design >

Best Practices for Generating Web Services Proxy Classes in Java Environments


This topic provides information on commonly encountered issues while generating Web services proxy classes in the Java integrated development environments (IDE) Oracle JDeveloper and Axis. Solutions and workarounds are provided to successfully generate the Web Services v2.0 API proxy classes in these Java IDEs.

Oracle JDeveloper Workaround

For WSDLS that have a large number of fields, proxy generation succeeds for all WSDL files, but compilation might fail due to the doSerialize() or doDeserialize() method being more than 64KB in size.

To work around the failure

  1. Avoid proxy class compilation failure.

    See Avoiding Proxy Class Compilation Failure Due to the Java 64KB Limit.

  2. Increase the Java heap size in the jdev.conf file.

Axis Workaround

Proxy generation can fail for large WSDL files, and throw the following exception:

java.lang.OutOfMemoryError: Java heap space

To work around the failure

  1. Remove unused child objects from WSDL files.
  2. Increase the Java heap size in the wsdl2java.bat/wsdl2java.sh file.

To remove child objects from Web Services v2.0 WSDL files

  1. In the <Types> section in the WSDL, find the <xsd:schema> element with the target namespace "urn:/crmondemand/xml/ParentName/Query", and do the following:
    1. Traverse to the <xsd:complexType> element with the name "ParentNameQuery".
    2. Remove the <xsd:element> element with the name "ListOfChildNameQuery".
    3. Remove the <xsd:complexType> element with the name "ListOfChildNameQuery".
    4. Remove the <xsd:complexType> element with the name "ChildNameQuery".
  2. Find the <xsd:schema> element with the target namespace "urn:/crmondemand/xml/ParentName/Data" and do the following:
    1. Traverse to the <xsd:complexType> element with the name "ParentNameData".
    2. Remove the <xsd:element> element with the name "ListOfChildNameData".
    3. Remove the <xsd:complexType> element with the name "ListOfChildNameData".
    4. Remove the <xsd:complexType> element with the name "ChildNameData".
Oracle Web Services On Demand Guide, Version 25.0 (Oracle CRM On Demand Release 37) Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices.