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?
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
Greenhorn
Joined: Nov 25, 2008
Posts: 10
posted
0
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.
How did you generate the following classes with Weblogic?
SingleSignOn_Impl SingleSignOnSoap
Peer Reynders
Bartender
Joined: Aug 19, 2005
Posts: 2906
posted
0
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.
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.