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 » Wed Nov 05, 2014 10:40 am

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: 423
Joined: Tue Jul 24, 2012 2:43 am
Contact:

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

Post by fjwalraven » Wed Nov 05, 2014 11:56 pm

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 » Thu Nov 06, 2014 12:55 am

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: 423
Joined: Tue Jul 24, 2012 2:43 am
Contact:

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

Post by fjwalraven » Thu Nov 06, 2014 3:29 am

even better!

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

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

Post by fjwalraven » Thu Nov 06, 2014 3:14 pm

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 » Thu Nov 06, 2014 6:20 pm

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: 123
Joined: Wed Feb 12, 2014 2:44 am
Contact:

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

Post by ramy6_1 » Tue Nov 17, 2015 6:15 am

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: 423
Joined: Tue Jul 24, 2012 2:43 am
Contact:

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

Post by fjwalraven » Wed Nov 18, 2015 12:37 am

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 » Sat Dec 05, 2015 7:23 am

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: 423
Joined: Tue Jul 24, 2012 2:43 am
Contact:

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

Post by fjwalraven » Sat Dec 05, 2015 7:52 am

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: 22
Joined: Wed Mar 16, 2016 8:38 am
Contact:

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

Post by javabean68 » Mon Apr 09, 2018 5:17 am

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: 423
Joined: Tue Jul 24, 2012 2:43 am
Contact:

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

Post by fjwalraven » Mon Apr 09, 2018 7:05 am

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