ws-muse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "José Antonio Sánchez" <getace...@gmail.com>
Subject How to create a factory service?
Date Fri, 10 Nov 2006 14:57:47 GMT
Hello, I need a service that, at the execution of a method, creates a
resource of type T end returns its end point but I don't know exactly
how to implement the factory service. In the wsdl I have defined a
Create method with the following messages:

.............
<xsd:element name="Create">
	<xsd:complexType>
		<xsd:sequence>
			<xsd:element name="Type" type="xsd:anyURI">
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	</xsd:element>
<xsd:element name="CreateResponse">
	<xsd:complexType>
		<xsd:sequence>
			<xsd:element name="Resource"
				type="wsa:EndpointReferenceType">
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>
</xsd:element>
.............................
<wsdl:message name="CreateRequest">
		<wsdl:part name="CreateRequest" element="tns:Create"></wsdl:part>
</wsdl:message>
<wsdl:message name="CreateResponse">
	<wsdl:part name="CreateResponse"
		element="tns:CreateResponse">
	</wsdl:part>
</wsdl:message>
...........................
But there are a couple of problems. As the two wsdls has to be in the
same project (the factory's capabilitys has to have access to the
Resource class to create it) I don't know how to create two
capabilities because the wsdl2java tool always creates
IMyCapability.java and MyCapability.java. Although I can create one
and then rename it (changing the muse.xml too) I wonder if there is a
way to tell the tool to create the capability with a given name.
The second problem is that in the code generated from the above wsdl,
the Create operation returns an Element type instead of an
EndPointReference type. I don't know if I'm doing it wrong or if it's
supposed to be that way (and in the client I have to cast Element to
EndPointReference).
-- 
Saludos.
José Antonio Sánchez

---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org


Mime
View raw message