wood burning stoves*
The moose likes Web Services and the fly likes Weblogic WsdlcTask modifying WSDL 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 WsdlcTask modifying WSDL" Watch "Weblogic WsdlcTask modifying WSDL" New topic
Author

Weblogic WsdlcTask modifying WSDL

lakhi singh
Greenhorn

Joined: Feb 12, 2009
Posts: 3
I am using ant task to generate webservices specific java classes, but published WSDL is always different than original. Any ideas, how this can be prevented?

<target name="generate.from.wsdl">
<taskdef name="wsdlc" classpathref="compile.classpath" classname="weblogic.wsee.tools.anttasks.WsdlcTask"/>

Before:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://www.views.db/GetViewsWs/"
xmlns:tns="http://www.views.db/GetViewsWs/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<wsdl:types>
<xsd:schema>
<xsd:import namespace="http://www.views.db/GetViewsWs/" schemaLocation="type.xsd" />
</xsd:schema>
</wsdl:types>

<wsdl:message name="getViewsRequest">
<wsdl:part name="getViewsVO" type="tns:GetViewsVO"/>
</wsdl:message>

<wsdl:message name="saveViewsRequest">
<wsdl:part name="getViewsVO" type="tns:GetViewsVO"/>
</wsdl:message>

<wsdl:message name="deleteViewsRequest">
<wsdl:part name="getViewsVO" type="tns:GetViewsVO"/>
</wsdl:message>


After :

<?xml version='1.0' encoding='UTF-8'?>
<s0:definitions targetNamespace="http://www.views.db/GetViewsWs/" xmlns="" xmlns:s0="http://schemas.xmlsoap.org/wsdl/" xmlns:s1="http://www.views.db/GetViewsWs/" xmlns:s2="http://www.w3.org/2001/XMLSchema" xmlns:s3="http://schemas.xmlsoap.org/wsdl/soap/">
<s0:types>
<s2:schema xmlns:s0="http://schemas.xmlsoap.org/wsdl/" xmlns:s1="http://www.views.db/GetViewsWs/" xmlns:s2="http://www.w3.org/2001/XMLSchema" xmlns:s3="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.views.db/GetViewsWs/" xmlns:wsd="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<s2:import namespace="http://www.views.db/GetViewsWs/" schemaLocation="type.xsd"/>
</s2:schema>
</s0:types>
<s0:message name="getViewsRequest">
<s0:part name="getViewsVO" type="s1:GetViewsVO"/>
</s0:message>
<s0:message name="saveViewsRequest">
<s0:part name="getViewsVO" type="s1:GetViewsVO"/>
</s0:message>
<s0:message name="deleteViewsRequest">
<s0:part name="getViewsVO" type="s1:GetViewsVO"/>
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2922
    
    5
The difference is irrelevant. The prefixes are irrelevant. Both
  • s0:definitions xmlns:s0="http://schemas.xmlsoap.org/wsdl/"
  • wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"

  • resolve to {http://schemas.xmlsoap.org/wsdl/}definitions and any namespace aware XML parser will be able to handle that.

    Ronald Bourret's XML Namespaces FAQ
    James Clark: XML Namespaces
    lakhi singh
    Greenhorn

    Joined: Feb 12, 2009
    Posts: 3
    I agree, but is there any way to prevent this from happening? Why would there be any real need to modify WSDL in first place?
    Peer Reynders
    Bartender

    Joined: Aug 19, 2005
    Posts: 2922
        
        5
    lakhi singh wrote:Why would there be any real need to modify WSDL in first place?

    It not really modified. The WSDL that you see is generated by the environment that hosts the endpoint based on the deployment information and endpoint characteristics.
    lakhi singh
    Greenhorn

    Joined: Feb 12, 2009
    Posts: 3
    It occurs when I try to generate java classes, not at published endpoints. Weblogic publishes modified WSDLs as such from deployed services.
    WSDL that get bundled into jars look manipulated. I would like to figure out what deployment attributes can help clean up our WSDLs? I have lot of WSDL to deploy and prefer to get rid of extra noise with multiple namespace aliases. Any ideas?

    Cheer,
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: Weblogic WsdlcTask modifying WSDL
     
    Similar Threads
    order of request parameters causing unexpected subelement exception
    weblogic.webservice.tools.wsdlp.WSDLParseException: [WSDL Parser]:first element is not definitions
    soap fault return empty <detail> element.
    error in wsdl
    Namespace based element identification