Bruno,

WSDL 1.0 doesn't include inheritance..That is the issue.  That is why
you copy and paste what you want into your wsdl....
I think that's answering part of your question...

We generate based on port because the port references the binding which
references the portType which contains the operations....The ports seem
like the obvious place to separate the endpoints...That being said,
there is no reason you couldn't alter the generated interface and code
to contain all the operations and map the resource to a single
type....You can do this to meet your needs.  The thing to watch out for
is common operations in portTypes...If you had the same operation
defined in two portTypes and you collapse this to one, does it still
make sense for you?

Bottom line is you can do it.  I do not, however think we should
generate one class just for the service as opposed to generating on the
ports...

-S

 

-----Original Message-----
From: Bruno Harbulot [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 04, 2006 9:38 AM
To: wsrf-user@ws.apache.org
Subject: WSDL Structure and port types

Hello,


I'm trying to reuse WSDL files for WSRF services (that weren't using
Apache WSRF).
I'm only interested in the operations regarding the resource properties
for the moment. I have several of these services, so I would like to
avoid duplicating the same thing, in particular the port types for the
WS-ResourceProperties operations.

At the moment, I've written a common WSRF.wsdl file that contains a port
type of this form:

<wsdl:portType name="WSRFOperations">
   <wsdl:operation name="GetResourceProperty">
      <wsdl:input message="wsrp:GetResourcePropertyRequest" 
name="GetResourcePropertyRequest"/>
      <wsdl:output message="wsrp:GetResourcePropertyResponse" 
name="GetResourcePropertyResponse"/>
      <wsdl:fault message="wsrp:ResourceUnknownFault" 
name="ResourceUnknownFault"/>
      <wsdl:fault message="wsrp:InvalidResourcePropertyQNameFault" 
name="InvalidResourcePropertyQNameFault"/>
   </wsdl:operation>

   <wsdl:operation name="GetMultipleResourceProperties">
      <!-- ... -->
   </wsdl:operation>

   <!-- + other operations of WS-ResourceProperties ... -->

</wsdl:porttype>


In short, this is the same as
<http://docs.oasis-open.org/wsrf/rpw-2.wsdl>, except that I've merged
all the port types for all the operations into a single one.


Then, each resource WSDL uses:

   <import location="WSRF.wsdl" 
namespace="http://www.ibm.com/xmlns/stdwip/web-services/WS-ResourcePrope
rties"/>

   <service name="MyResource">
     <port binding="tns:MyResourceSpecificSoapBinding" 
name="MyResourcePort">
        <soap:address location="http://localhost/.../"/>
     </port>
     <port binding="wsrf:WSRFOperationsSoapBinding" 
name="MyResourceWSRFPort">
        <soap:address location="http://localhost/.../"/>
     </port>
   </service>

(I'm using two ports because one is for the WSRF properties and the
other one is for operations specific to that resource.)



Unfortunately, WSDL2Java (in WSRF 1.0) generates two sets of classes, 
one for each port, whereas I would really like just one set of classes 
(one per service and not per port).

Is my way of writing the WSDL file incorrect or discouraged? I would 
assume not, since if I took 
<http://docs.oasis-open.org/wsrf/rpw-2.wsdl>, I would end up with even 
more sets of classes.

Is there any way to avoid copying and pasting all the 
WS-ResourceProperties entries into the WSDL file (to avoid what's done 
in the Filesystem example)?

Perhaps one way around this would be to use a single back end object for

several instances of 'Resource' corresponding in fact to a single 
resource, therefore the factory would have to create several resources 
for a single back-end resource. This seems long and a bit hard to 
maintain and synchronise.



Regards,

Bruno.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to