Page 1 of 1

About Question enthuware.ocejws.v6.2.321 :

Posted: Wed Nov 05, 2014 10:40 am
by austinor
For the question:
What is/are the correct statement(s) about the following WSDL extract?

<definitions>
    . . .
   <portType name="StringUtilityServer">
      <operation name="Echo">
       . . .
      </operation>
   </portType>
   <portType name="UtilityServer">
      <operation name="Echo">
       . . .
      </operation>
   </portType>
    . . .
</definitions>

Correct answers:

- This WSDL is Basic Profile v1.1 compliant.
- If you remove the portType with name UtilityServer the WSDL will be Basic Profile v1.1 compliant.
How can you have more than one operation of the same name, regardless of whether they belong to same or different portTypes, when each operation has a corresponding wsimport-generated wrapper class named after the operation name???

Re: About Question enthuware.ocejws.v6.2.321 :

Posted: Wed Nov 05, 2014 11:56 pm
by fjwalraven
How can you have more than one operation of the same name, regardless of whether they belong to same or different portTypes, when each operation has a corresponding wsimport-generated wrapper class named after the operation name???
This question is about the WSDL specifications and according to these specifications it is allowed.

Re: About Question enthuware.ocejws.v6.2.321 :

Posted: Thu Nov 06, 2014 12:55 am
by austinor
How about Basic Profile v1.1... does BPv1.1 allow duplication of operation names as long as those operations belong to different portTypes?

Re: About Question enthuware.ocejws.v6.2.321 :

Posted: Thu Nov 06, 2014 3:29 am
by fjwalraven
even better!

Re: About Question enthuware.ocejws.v6.2.321 :

Posted: Thu Nov 06, 2014 3:14 pm
by fjwalraven
I misread your question, I thought you had looked it up in Basic Profile v1.1.

Anyway here is the conformation from BP:
R2304 A wsdl:portType in a DESCRIPTION MUST have operations with distinct values for their name attributes.

Note that this requirement applies only to the wsdl:operations within a given wsdl:portType. A wsdl:portType may have wsdl:operations with names that are the same as those found in other wsdl:portTypes.
Regards,
Frits

Re: About Question enthuware.ocejws.v6.2.321 :

Posted: Thu Nov 06, 2014 6:20 pm
by austinor
fjwalraven wrote:I misread your question, I thought you had looked it up in Basic Profile v1.1.

Anyway here is the conformation from BP:
R2304 A wsdl:portType in a DESCRIPTION MUST have operations with distinct values for their name attributes.

Note that this requirement applies only to the wsdl:operations within a given wsdl:portType. A wsdl:portType may have wsdl:operations with names that are the same as those found in other wsdl:portTypes.
Regards,
Frits
Ok got it. I looked up the BP specs to find out, but I think I missed this last part of the explanation so I had to ask.

Thanks again.

Re: About Question enthuware.ocejws.v6.2.321 :

Posted: Tue Nov 17, 2015 6:15 am
by ramy6_1
Hello ,

If this WSDL is a Basic Profile v1.1 compliant with two operations with the same name, how ws-import will create the java artifices ?

Which operation parameter will be used and which will take the percipience ?

Re: About Question enthuware.ocejws.v6.2.321 :

Posted: Wed Nov 18, 2015 12:37 am
by fjwalraven
Hi

The thing to grab here is that the operation (with the same name) is exposed in two different interfaces (SEI <- wsdl:portType).

Regards,
Frits

Re: About Question enthuware.ocejws.v6.2.321 :

Posted: Sat Dec 05, 2015 7:23 am
by bekocho
Hello,

We have the same question v6.2.323 and v6.2.321 and each question has diferent answers. What is the correct one?

Thxs!!

Re: About Question enthuware.ocejws.v6.2.321 :

Posted: Sat Dec 05, 2015 7:52 am
by fjwalraven
Hi!
We have the same question v6.2.323 and v6.2.321
Not entirely.

Question 323 has two operations with the same name inside one portType:

Code: Select all

<portType name="StringUtilityServer"> 
      <operation name="Echo">
       . . .
      </operation>
      <operation name="Echo">
       . . .
      </operation>
</portType>
This is not allowed, however the same operation name in two different portTypes is allowed:

Code: Select all

<portType name="StringUtilityServer"> 
      <operation name="Echo">
       . . .
      </operation>
</portType>
<portType name="UtilityServer"> 
      <operation name="Echo">
       . . .
      </operation>
</portType>
Regards,
Frits

Re: About Question enthuware.ocejws.v6.2.321 :

Posted: Mon Apr 09, 2018 5:17 am
by javabean68
Hello,

on Java Webservices Up and Running I found:
Recall that a WSDL has but one portType
Who is right? :-)

Thank you
Fabio

Re: About Question enthuware.ocejws.v6.2.321 :

Posted: Mon Apr 09, 2018 7:05 am
by fjwalraven
Hi Fabio,

The WSDL v1.1 specification allows multiple portTypes:
2.4 Port Types
A port type is a named set of abstract operations and the abstract messages involved.

<wsdl:definitions .... >
<wsdl:portType name="nmtoken">
<wsdl:operation name="nmtoken" .... /> *
</wsdl:portType>
</wsdl:definitions>

The port type name attribute provides a unique name among all port types defined within in the enclosing WSDL document.
Regards,
Frits