About Question enthuware.ocejws.v6.2.321 :

Moderators: Site Manager, fjwalraven

Post Reply
austinor
Posts: 41
Joined: Mon Oct 27, 2014 11:35 pm
Contact:

About Question enthuware.ocejws.v6.2.321 :

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

fjwalraven
Posts: 429
Joined: Tue Jul 24, 2012 2:43 am
Contact:

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

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

austinor
Posts: 41
Joined: Mon Oct 27, 2014 11:35 pm
Contact:

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

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

fjwalraven
Posts: 429
Joined: Tue Jul 24, 2012 2:43 am
Contact:

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

Post by fjwalraven »

even better!

fjwalraven
Posts: 429
Joined: Tue Jul 24, 2012 2:43 am
Contact:

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

Post 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

austinor
Posts: 41
Joined: Mon Oct 27, 2014 11:35 pm
Contact:

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

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

ramy6_1
Posts: 124
Joined: Wed Feb 12, 2014 2:44 am
Contact:

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

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

fjwalraven
Posts: 429
Joined: Tue Jul 24, 2012 2:43 am
Contact:

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

Post 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

bekocho
Posts: 1
Joined: Thu Nov 26, 2015 1:39 am
Contact:

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

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

fjwalraven
Posts: 429
Joined: Tue Jul 24, 2012 2:43 am
Contact:

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

Post 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

javabean68
Posts: 31
Joined: Wed Mar 16, 2016 8:38 am
Contact:

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

Post 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

fjwalraven
Posts: 429
Joined: Tue Jul 24, 2012 2:43 am
Contact:

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

Post 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

Post Reply

Who is online

Users browsing this forum: No registered users and 25 guests