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 Tom Jordahl <to...@macromedia.com> on 2003/12/04 15:29:37 UTC
RE: cvs commit: ws-axis/java/src/org/apache/axis/client Service.j
ava
This is a weird area as the port name attribute is NOT a QName. It is an NCName.
You must have a service in order for the port name to be meaningful. So I believe the ports should be referred to by a String, not a QName. I think JAX-RPC might have this wrong.
--
Tom Jordahl
Macromedia Server Development
-----Original Message-----
From: Ias [mailto:iasandcb@tmax.co.kr]
Sent: Thursday, December 04, 2003 12:34 AM
To: axis-dev@ws.apache.org
Cc: ???
Subject: RE: cvs commit: ws-axis/java/src/org/apache/axis/client Service.java
Thanks to Aaron and Tom for resolving this issue that once I had thought of
for a while. Fundamentally, WSDL4J should return port name as QName
according to WSDL spec 1.1 "2.1.1 Document Naming and Linking" described at
http://www.w3.org/TR/wsdl#_document-n . Can't we suggest the essential
change to javax.wsdl.Port to WSDL4J team?
Ias
=========================================================
Lee, Changshin (Korean name)
Ias (International name)
Company Web Site: http://www.tmax.co.kr
Personal Web Site: http://www.iasandcb.pe.kr
---------------------------------------------------------
JSR 201, JSR 204 and JSR 222 EG member
Apache Axis (JAX-RPC and SAAJ) and JaxMe (JAXB) committer
R&D Institute
Tmax Soft, Inc.
=========================================================
> -----Original Message-----
> From: tomj@apache.org [mailto:tomj@apache.org]
> Sent: Thursday, December 04, 2003 4:36 AM
> To: ws-axis-cvs@apache.org
> Subject: cvs commit: ws-axis/java/src/org/apache/axis/client
> Service.java
>
> tomj 2003/12/03 11:36:29
>
> Modified: java/src/org/apache/axis/client Service.java
> Log:
> Patches submitted by Aaron Hamid (arh14@cornell.edu)
>
> Bug 25170:
> org.apache.axis.client.Service.getPorts does not return
> QName as per JAX-RPC spec, but java.lang.String instead
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25170
>
> Bug 25173
> Namespace is significant for port QNames used in
> HandlerRegistry mappings
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25173
>
> Revision Changes Path
> 1.93 +26 -3
> ws-axis/java/src/org/apache/axis/client/Service.java
>
> Index: Service.java
> ===================================================================
> RCS file:
> /home/cvs/ws-axis/java/src/org/apache/axis/client/Service.java,v
> retrieving revision 1.92
> retrieving revision 1.93
> diff -u -r1.92 -r1.93
> --- Service.java 20 Nov 2003 06:22:56 -0000 1.92
> +++ Service.java 3 Dec 2003 19:36:29 -0000 1.93
> @@ -671,7 +671,27 @@
> // Return an empty iterator;
> return new Vector().iterator();
> }
> - return wsdlService.getPorts().keySet().iterator();
> +
> + Map portmap = wsdlService.getPorts();
> + List portlist = new java.util.ArrayList(portmap.size());
> + // we could simply iterate over keys instead and skip
> + // the lookup, but while keys are probably the same as
> + // port names, the documentation does not make any
> + // guarantee on this, so we'll just play it safe
> + // Aaron Hamid
> + Iterator portiterator = portmap.values().iterator();
> + while (portiterator.hasNext()) {
> + Port port = (Port) portiterator.next();
> + // maybe we should use
> Definition.getTargetNamespace() here,
> + // but this class does not hold a reference to
> the object,
> + // so we'll just use the namespace of the service's QName
> + // (it should all be the same wsdl
> targetnamespace value, right?)
> + // Aaron Hamid
> + portlist.add(new
> QName(wsdlService.getQName().getNamespaceURI(), port.getName()));
> + }
> +
> + // ok, return the real list of QNames
> + return portlist.iterator();
> }
>
> /**
> @@ -849,7 +869,9 @@
> Map map = new HashMap();
>
> public List getHandlerChain(QName portName) {
> - List list = (List) map.get(portName);
> + // namespace is not significant, so use local
> part directly
> + String key = portName.getLocalPart();
> + List list = (List) map.get(key);
> if (list == null) {
> list = new java.util.ArrayList();
> setHandlerChain(portName, list);
> @@ -858,7 +880,8 @@
> }
>
> public void setHandlerChain(QName portName, List chain) {
> - map.put(portName, chain);
> + // namespace is not significant, so use local
> part directly
> + map.put(portName.getLocalPart(), chain);
> }
> }
>
>
>
>
>