function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
jlojlo 

WebLogic "clientgen" + Partner WSDL problems

Has anyone ever had problems generating correct java stub classes with WebLogic's 8.1 "clientgen" appliation and the Partner WSDL?

Here's the error message that we're encountering:

generate-client:

[clientgen] Generating client jar for d:\temp\salesforce\partner.wsdl ...

[clientgen] WARNING: Unable to fully map ['urn:sobject.partner.soap.sforce.com']:sObject using javax.xml.soap.SOAPElement
…<many more similar warnings> 

The sObject definition in the partner.wsdl has:
           <complexType name="sObject">
               
<sequence>
                   
<element name="type" type="xsd:string"/>
                   
<element name="fieldsToNull" type="xsd:string" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
                   
<element name="Id" type="tns:ID" nillable="true"/>
                   
<any namespace="##targetNamespace" minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
               
</sequence>
           
</complexType> 


I think that “<any>” tag is only supported in JAX-RPC Spec 1.1 (at least that’s what this thread implies: http://forums.bea.com/bea/message.jspa?messageID=400007979&tstart=60 ). And to get support for JAX-RPC Spec 1.1, we’d have to upgrade to Weblogic 9.X, which is not currently an  option.




jlojlo
Also, we've considered using wsdl2java to to generate the stubs, but that doesn't look like it will work either:

http://ws.apache.org/axis/java/install.html#ThingsYouHaveToKnow  . Under the Weblogic 8.1 heading, it states that there are conflicts between using Axis and Weblogic in the same web application:

WebLogic 8.1

WebLogic 8.1 ships with webservices.jar that conflicts with Axis' saaj.jar and prevents Axis 1.4 from working right out of the box. This conflict exists because WebLogic uses an older definition of javax.xml.soap.* package from Java Web Services Developer Pack Version 1.0, whereas Axis uses a newer revision from J2EE 1.4.

However, there are two alternative configuration changes that enable Axis based web services to run on Weblogic 8.1.

  • In a webapp containing Axis, set <prefer-web-inf-classes> element in WEB-INF/weblogic.xml to true. An example of weblogic.xml is shown below:
·                <weblogic-web-app>
·                 <container-descriptor>
·                  <prefer-web-inf-classes>true</prefer-web-inf-classes>
·                 </container-descriptor>
·                </weblogic-web-app>

If set to true, the <prefer-web-inf-classes> element will force WebLogic's classloader to load classes located in the WEB-INF directory of a web application in preference to application or system classes. This is a recommended approach since it only impacts a single web module.

  • In a script used to start WebLogic server, modify CLASSPATH property by placing Axis's saaj.jar library in front of WeLlogic's webservices.jar. NOTE: This approach impacts all applications deployed on a particular WebLogic instance and may prevent them from using WebLogic's webservices.

…So it sounds like I cannot have a single web application that sometimes uses Weblogic’s implementation of webservices (from bea’s webservices.jar) and sometimes uses Axis.

 

That makes the Axis approach far less desirable (because I’d have to redo/retest my interfaces with other webservices—converting from Weblogic to Axis).
dapkusdapkus
I think it is just a warning. JAX-RPC 1.0 does not require support for any. Schema constructs that are not supported in the spec are mapped to SOAPElement (which is similar to a DOM element).