You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ax...@ws.apache.org on 2004/09/23 19:19:32 UTC

[jira] Created: (AXIS-1570) Should provide automatic URL update in the WSDL when using

Message:

  A new issue has been created in JIRA.

---------------------------------------------------------------------
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: Thu, 23 Sep 2004 10:18 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


[jira] Commented: (AXIS-1570) Should provide automatic URL update in the WSDL when using

Posted by ax...@ws.apache.org.
The following comment has been added to this issue:

     Author: Sébastien Tardif
    Created: Fri, 22 Oct 2004 6:55 AM
       Body:
The instructions how to use it:

This will be trigger only if you say ask Axis to provide your own WSDL file when a user browse a URL like http://.../service?wsdl

This can be done with <wsdlFile>mywsdl.wsld</wsdlFile> just under your service element in the *.wsdd as documented in Axis online document.

The code by default will use the location as given by the web container when you call:
http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpServletRequest.html#getRequestURL()

If you want to override some part of the getRequestURL, like for example to add some stuff in the URL for a load balancer, you can set a property in the MessageContext. Like this:

messageContext.setProperty(org.apache.axis.MessageContext.WSDLGEN_SERV_LOC_URL, "http://host:port/.../myService")

You will probably want to do the setting in a Axis Handler.

---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/AXIS-1570?page=comments#action_54482

---------------------------------------------------------------------
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:55 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


[jira] Commented: (AXIS-1570) Should provide automatic URL update in the WSDL when using

Posted by ax...@ws.apache.org.
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


[jira] Updated: (AXIS-1570) Should provide automatic URL update in the WSDL when using

Posted by ax...@ws.apache.org.
The following issue has been updated:

    Updater: Ian P. Springer (mailto:ian.springer@hp.com)
       Date: Fri, 22 Oct 2004 10:19 AM
    Comment:
The attached patch is a slightly improved version of the patch that Sebastian submitted. The endpoint URL replacement logic has been added to org.apache.axis.transport.http.QSWSDLHandler instead of SOAPService. Also, WSDL 1.2/2.0 is supported, in addition to WSDL 1.1.

    Changes:
             Attachment changed to QSWSDLHandler.patch
    ---------------------------------------------------------------------
For a full history of the issue, see:

  http://issues.apache.org/jira/browse/AXIS-1570?page=history

---------------------------------------------------------------------
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 10:19 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


[jira] Resolved: (AXIS-1570) Should provide automatic URL update in the WSDL when using

Posted by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1570?page=history ]
     
Davanum Srinivas resolved AXIS-1570:
------------------------------------

    Resolution: Fixed

Applied Ian's fix. Please cross check.

thanks,
dims

> Should provide automatic URL update in the WSDL when using <wsdlFile>
> ---------------------------------------------------------------------
>
>          Key: AXIS-1570
>          URL: http://issues.apache.org/jira/browse/AXIS-1570
>      Project: Axis
>         Type: New Feature
>     Versions: 1.2 Beta
>  Environment: Axis 1.2 Beta current
>     Reporter: Sébastien Tardif
>  Attachments: QSWSDLHandler.patch
>
> 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>.

-- 
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