My Oracle Support Banner

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

Last updated on OCTOBER 09, 2020

Applies to:

Oracle WebLogic Server - Version 10.3 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 -

NOTE: The WebLogic Server names and port numbers; WebService application/package/schema names; other attributes used in this article represent a fictitious sample names that made up as example. Any similarity to actual code, is purely coincidental and not intended in any other manner.

 

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

build-service:
[clientgen]
[clientgen] *********** jax-ws clientgen attribute settings ***************
[clientgen]
[clientgen] wsdlURI: file:///\path\to/myapp/myservice/client/sample.wsdl
[clientgen] packageName : myapp.myservice.client
[clientgen] destDir : \path\to\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:/\path\to/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:/\path\to/myapp/myservice/client/sample.wsdl#types?schema4'.

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

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

[clientgen] [ERROR] undefined attribute 'soapenc:arrayType'
[clientgen] line 93 of file:/\path\to/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:hostname.domain-VendorRole-VendorRoleWS/createVendorRole"/>
      <input>
         <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:hostname.domain-VendorRole-VendorRoleWS" use="encoded"/>
      </input>
      <output>
      ...

Cause

To view full details, sign in with your My Oracle Support account.

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


In this Document
Symptoms
Cause
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.