Clientgen error resolving 'soapenc:Array' when generating jax-ws client for RPC/encoded webservice (Doc ID 1302483.1)

Last updated on JUNE 09, 2016

Applies to:

Oracle Weblogic Server - Version: 10.3 and later   [Release: and later ]
Information in this document applies to any platform.

Symptoms

When generating jax-ws client with clientgen on SOAP RPC/Encoded webservice, the following error was thrown -

C:\myapp\myservice\client>ant build-service
Buildfile: build.xml

build-service:
[clientgen]
[clientgen] *********** jax-ws clientgen attribute settings ***************
[clientgen]
[clientgen] wsdlURI: file:///C:/myapp/myservice/client/sample.wsdl
[clientgen] packageName : myapp.myservice.client
[clientgen] destDir : C:\DOCUME~1\scvallur\LOCALS~1\Temp\_vhn32z
[clientgen]
[clientgen] *********** jax-ws clientgen attribute settings end ***************
[clientgen] Consider using <depends>/<produces> so that wsimport won't do unnecessary compilation
[clientgen] parsing WSDL...


[clientgen] [WARNING] src-resolve.4.2: Error resolving component 'soapenc:Array'. It was detected that 'soapenc:Array' is in namespace 'http://schemas.xmlsoap.org/soap/encoding/', but components from this namespace are not referenceable from schema document 'file:/C:/myapp/myservice/client/sample.wsdl#types?schema4'. If this is the incorrect namespace, perhaps the prefix of 'soapenc:Array' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:/C:/myapp/myservice/client/sample.wsdl#types?schema4'.

[clientgen] line 92 of file:/C:/myapp/myservice/client/sample.wsdl#types?schema4

[clientgen] [ERROR] undefined simple or complex type 'soapenc:Array'
[clientgen] line 92 of file:/C:/myapp/myservice/client/sample.wsdl

[clientgen] [ERROR] undefined attribute 'soapenc:arrayType'
[clientgen] line 93 of file:/C:/myapp/myservice/client/sample.wsdl
...

The ant build file snippets are as below -

...
<target name="build_client">
    <taskdef name="clientgen" classname="weblogic.wsee.tools.anttasks.ClientGenTask" />
    ...
   <clientgen
       type="JAXWS"
      wsdl="http://localhost:7001/Test/TestService?WSDL"
      destFile="./TestService.wsdl.jar"
      serviceName="TestService">
   </clientgen>
   ...
</target>
...

Snippets of WSDL of the webservice as below -

<binding name="VendorRoleBindingHttp" type="tns:VendorRolePortType">
   <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
      <operation name="createVendorRole">
      <soap:operation soapAction="urn:com-oocl-iris2-VendorRole-VendorRoleWS/createVendorRole"/>
      <input>
         <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:com-oocl-iris2-VendorRole-VendorRoleWS" use="encoded"/>
      </input>
      <output>
      ...

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms