• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Weblogic 8.1 WSDL 2 Java

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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)
 
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.


http://edocs.beasys.com/wls/docs81/webserv/client.html#1070561
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How did you generate the following classes with Weblogic?

SingleSignOn_Impl
SingleSignOnSoap
 
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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

xmlns:tns="http://services.printable.com/1.0/sso"
xmlns:s1="http://www.printable.com/sso"
xmlns:s2="http://www.printable.com/pti"

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
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!


P.S.
I also came across "the WebLogic
8.1 clientgen tool will not handle the xsd:choice keyword." and this WSDL contains a choice.
 
reply
    Bookmark Topic Watch Topic
  • New Topic