wood burning stoves 2.0*
The moose likes Web Services and the fly likes Weblogic 8.1 WSDL 2 Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Weblogic 8.1 WSDL 2 Java" Watch "Weblogic 8.1 WSDL 2 Java" New topic

Weblogic 8.1 WSDL 2 Java

Brett Daburn

Joined: Nov 25, 2008
Posts: 10
I am trying to develop a web service client using code generated from weblogic 8.1. I am having trouble getting started in creating the request. (I was able to do it fine with Axis2, but we are unable to use Axis due to in-house standards and other issues.)

In the code, I am getting the stub class as follows:

What I'm not understanding is how to set up and send the request with the generated classes. The operation name is Authenticate. In order to get the Authenticate response, I am provided with the following.:

What I'm not following is parameters is a javax.xml.soap.SOAPElement object. I'm not familiar with SOAPElement, but it seams to me that it is wanting me to manually create the SOAP XML and send it as the parameter. Am I following this correctly? If so, why create all of the classes for all of the types in the WSDL? If not, how do I use the generated classes to create the request?

(The WSDL is https://services.pj1.staging.printable.com/TRANS/0.9/SSO.asmx?WSDL)
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
Does version 8 of Weblogic contain a SOAP engine? Is there any documentation that covers how to use the classes generated by Weblogic?
Brett Daburn

Joined: Nov 25, 2008
Posts: 10
This below link is to the documentation I came across. I could almost follow their example, but my 'operation method' to return the result object is asking for a SOAPElement object as the parameter. That is what I am not following.

Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
How did you generate the following classes with Weblogic?

Peer Reynders

Joined: Aug 19, 2005
Posts: 2922
Originally posted by Brett Daburn:
but my 'operation method' to return the result object is asking for a SOAPElement object as the parameter. That is what I am not following.

My guess is that the WebLogic clientgen tool did the best it could given that {http://services.printable.com/1.0/sso}Authenticate references {http://www.printable.com/pti}PartnerCredentialsType and other elements in the "http://www.printable.com/pti" namespace

The WSDL doesn't even declare namespace prefixes - I had to guess at


The WSDL (XML schema) imports "http://www.printable.com/sso" and "http://www.printable.com/pti" - but it doesn't provide a schemaLocation! So clientgen wouldn't know what any of the XML types in the "http://www.printable.com/pti" namespace would look like. So it defaulted to assuming that {http://services.printable.com/1.0/sso}Authenticate is some kind of XML document. JAX-RPC uses javax.xml.soap.SOAPElement for generic XML document parameters.

So you can build the "Authenticate" XML parameter as a javax.xml.soap.SOAPElement. However if you are doing that already then using plain old SAAJ (weblogic 8.1 includes SAAJ 1.1) can become a serious consideration as you are barred from using a more modern web service stack. (SAAJ client "Java Web Services in a Nutshell" Sample: Chapter 3 SAAJ (PDF))

You shouldn't expect too much from WebLogic 8.1 - it is an J2EE 1.3 compliant application server. Web services didn't become part of the Java Enterprise standard until J2EE 1.4. So any web service support in WebLogic 8.1 is vendor specific, non-standard and minimal (i.e. Axis 1.x is even more "standard"). Ultimately that is going to limit to what extent you can coerce clientgen to generate the type of code that you are looking for. clientgen was mainly intended to generate clients for the type of SOAP web services that can be published by a WebLogic 8.1 application server.
Brett Daburn

Joined: Nov 25, 2008
Posts: 10
For some reason, FireFox 2 doesn't display the entire WSDL. You have to view the source.

<wsdl efinitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://services.printable.com/1.0/sso" xmlns:s1="http://www.printable.com/sso" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s2="http://www.printable.com/pti" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://services.printable.com/1.0/sso" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">

I will have to discuss with the 'big guys' on what to do about WebLogic clientgen and this WSDL. Thank you for your assistance!

I also came across "the WebLogic
8.1 clientgen tool will not handle the xsd:choice keyword." and this WSDL contains a choice.
I agree. Here's the link: http://aspose.com/file-tools
subject: Weblogic 8.1 WSDL 2 Java
Similar Threads
Problems with use of security realm with custom authentication provider???
Eclipse & weblogic
Webservice client code generation using axis2 and eclipse galilio
How could there be multiple wsdl:message parts for a response?
clientgen error during weblogic 8.1 client stub generation from weblogic 9.2 WSDL