This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Weblogic WsdlcTask modifying WSDL

 
lakhi singh
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
    Posts: 3
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    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
    Posts: 2968
    6
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    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
    Posts: 3
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    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,
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic