axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From axis-...@ws.apache.org
Subject [jira] Commented: (AXIS-1570) Should provide automatic URL update in the WSDL when using <wsdlFile>
Date Fri, 22 Oct 2004 13:43:27 GMT
The following comment has been added to this issue:

     Author: S├ębastien Tardif
    Created: Fri, 22 Oct 2004 6:42 AM
       Body:
Here the patch so everybody can enjoy the same quality as JWSDP in the area of rendering a
complete WSDL with a good location.

[C:\axis-src\ws-axis\java\src\org\apache\axis\handlers\soap]cvs diff SOAPService.java
Index: SOAPService.java
===================================================================
RCS file: /home/cvspublic/ws-axis/java/src/org/apache/axis/handlers/soap/SOAPService.java,v
retrieving revision 1.122
diff -r1.122 SOAPService.java
44a45,46
> import org.w3c.dom.Element;
> import org.w3c.dom.NodeList;
345a348
>             updateAddress( msgContext, doc );
356a360,424
>
>     /**
>      * Code copied from Basic Provider, please refactor!
>      * @param msgContext
>      * @return
>      * @throws AxisFault
>      */
>     private String getLocation(MessageContext msgContext) throws AxisFault {
>         SOAPService service = msgContext.getService();
>
>         ServiceDesc serviceDesc = service.getInitializedServiceDesc(msgContext);
>
>         // Calculate the appropriate namespaces for the WSDL we're going
>         // to put out.
>         //
>         // If we've been explicitly told which namespaces to use, respect
>         // that.  If not:
>         //
>         // The "interface namespace" should be either:
>         // 1) The namespace of the ServiceDesc
>         // 2) The transport URL (if there's no ServiceDesc ns)
>
>
>             // Location URL is whatever is explicitly set in the MC
>             String locationUrl = msgContext.getStrProp(MessageContext.WSDLGEN_SERV_LOC_URL);
>
>             if (locationUrl == null) {
>                 // If nothing, try what's explicitly set in the ServiceDesc
>                 locationUrl = serviceDesc.getEndpointURL();
>             }
>
>             if (locationUrl == null) {
>                 // If nothing, use the actual transport URL
>                 locationUrl = msgContext.getStrProp(MessageContext.TRANS_URL);
>             }
>
>             return locationUrl;
>     }
>     /**
>      * Update location using URL from the request, so we are sure we put public URL in
the wsdl
>      * @param msgContext
>      * @param doc
>      * @throws AxisFault
>      */
>     void updateAddress(MessageContext msgContext, Document doc) throws AxisFault {
>         NodeList servicesNodes = ((Element)doc.getFirstChild()).getElementsByTagNameNS("http://schemas.xmlsoap.org/wsd
l/","service");
>         // for all services
>         for ( int i=0; i<servicesNodes.getLength();i++)
>         {
>             Element serviceElement = (Element)servicesNodes.item(i);
>             NodeList portsNodes = serviceElement.getElementsByTagNameNS("http://schemas.xmlsoap.org/wsdl/","port");
>             // for all port
>             for ( int j=0; j<portsNodes.getLength();j++)
>             {
>                 Element portElement = (Element)portsNodes.item(j);
>                 NodeList addressesNodes = portElement.getElementsByTagNameNS("http://schemas.xmlsoap.org/wsdl/soap/","
address");
>                 // expect just one inside
>                 Element address = (Element)addressesNodes.item(0);
>                 String location = getLocation(msgContext);
>                 address.setAttribute("location", location );
>             }
>         }
>
>     }
>
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/AXIS-1570?page=comments#action_54480

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/AXIS-1570

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXIS-1570
    Summary: Should provide automatic URL update in the WSDL when using <wsdlFile>
       Type: New Feature

     Status: Unassigned
   Priority: Major

    Project: Axis
   Versions:
             1.2 Beta

   Assignee: 
   Reporter: S├ębastien Tardif

    Created: Thu, 23 Sep 2004 10:18 AM
    Updated: Fri, 22 Oct 2004 6:42 AM
Environment: Axis 1.2 Beta current

Description:
You all know that the best practice is to drive the web services by writting the WSDL. But
Axis is not completly supporting this use case.

First: even if I provided to Axis the WSDL at some point in the process (WSDL2Java). When
the user use the url-> http://host/axis/services/mywebservices?wsdl Axis do not send the
original WSDL or an equivalent. Definition change, like null/not null and comment are gone
from the WSDL.

So the Axis way right now is to specify the <wsdlFile> element in the .wsdd. But this
doesn't update the url in the .wsdl file. Other framework like JWSDP do it. 

So this suggestion is to add to Axis by default the rewrite of the URL inside the wsdl that
is found when using the element <wsdlFile>.




---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message