[
https://issues.apache.org/jira/browse/AXIS2-2353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12485258
]
Jeff Barrett commented on AXIS2-2353:
-------------------------------------
Regarding Dim's question above...
EndpointDesciptionImpl#selectWSDLPortToUse (Line 1396) says:
// Per JSR-181,
// - The portType name corresponds to the WebService.name
annotation value, which is
// returned by getName()
// - The portType namespace corresponds to the
WebService.targetNamespace annotation, which
// is returned by getTargetNamespace()
String portTypeLP = getName();
BUT, EndpointDesciptionImpl#getAnnoWebServicePortName does this:
// This is the @WebService annotation path
// Default value is the @WebService.name of the
class or interface + "Port"
// Per JSR-181 MR Sec 4.1, pg 15
annotation_PortName = getAnnoWebServiceName() +
"Port";
So which is correct?
Maybe I'm not understanding the issue yet, but they are both correct
because they are doing different things. The first snippet is working
with wsdl:portType and the second with wsdl:port.
>From JSR-181 section 4.1 "Annotation: javax.jws.WebService" section 4.1.1 says
>that WebService attributes:
- "name" maps to "wsdl:portType"
- "portName" maps to "wsdl:port"
Give that, the methods on EnpointDescription (and yes, I'll update the
javadocs!) do the following
- getName() essentially returns WebService.name and thus "wsdl:portType". This
is via delegation to
getAnnoWebServiceName()
- getPortQName() essentially returns WebService.portName and thus "wsdl:port"
(not portType). This is
via delegation to getAnnoWebServicePortName() along with some tns processing to
return a QName.
The code snippet from selectWSDLPortsToUse intends to gets the portType, then
finds all the ports that use
that portType, and then get the first one of those that has a SOAP address.
Regarding Lin's comment above ...
I tried to replace
String portTypeLP = getName();
with
String portTypeLP = getAnnoWebServicePortName();
and was able to pass this.
I don't think that was a valid change (give the above explanation). I'll look
at the
attached WSDL and Java and see why that change was necessary to locate a port
in the WSDL.
More information soon ...
> Selecting a port name / wsdl provided scenario
> ----------------------------------------------
>
> Key: AXIS2-2353
> URL: https://issues.apache.org/jira/browse/AXIS2-2353
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: jaxws
> Reporter: Davanum Srinivas
> Assigned To: Jeff Barrett
> Attachments: CalculatorClient.java, CalculatorService.java,
> CalculatorService.wsdl
>
>
> Port Name confusion.
> EndpointDesciptionImpl#selectWSDLPortToUse (Line 1396) says:
> // Per JSR-181,
> // - The portType name corresponds to the WebService.name annotation
> value, which is
> // returned by getName()
> // - The portType namespace corresponds to the
> WebService.targetNamespace annotation, which
> // is returned by getTargetNamespace()
> String portTypeLP = getName();
> BUT, EndpointDesciptionImpl#getAnnoWebServicePortName does this:
> // This is the @WebService annotation path
> // Default value is the @WebService.name of the class or
> interface + "Port"
> // Per JSR-181 MR Sec 4.1, pg 15
> annotation_PortName = getAnnoWebServiceName() + "Port";
> So which is correct?
> Here's the scenario we are trying:
> http://cwiki.apache.org/GMOxDOC20/simple-web-service-with-jax-ws.html
> We will upload the latest versions of wsdl/service/client as well.
> -- dims
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]