You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-dev@ws.apache.org by "Campana Jr., Salvatore J" <sa...@hp.com> on 2005/03/10 16:05:40 UTC

RE: example response

Michael,  (I've CC'd this to the Muws list, as others may benefit from
your experience)
 
You initial approach is how I would have thought it was also, so I would
have made the same mistake....
 
..that being said....
 
Do you have this in your wsdl:
 
<xs:element ref="muws-p1-xs:ManageabilityCapability" 

                  minOccurs="0" maxOccurs="unbounded"/>

 

If so, when you generated, your enclosing properties document "should"
accept more than one management capability..

 

//modified.....

 

//get the prop from resource prop set

prop = m_propSet.get(
com.ca.unicenter.wsdm.oasiswsdm.OasiswsdmPropertyQNames.MANAGEABILITYCHA
RACTERISTIC);     

 

//create a new capability to add          

 
org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ManageabilityCharac
teristicDocument characteristic =
org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ManageabilityCharac
teristicDocument.Factory.newInstance();

 

 //probably something like this

ManageabilityCharacteristicType manageabilityType =
characteristic.getManageabilityCharacteristic();

manageabilityType.setUri();//not sure what this op would be...you get
the idea

 

prop.add(characteristic);

 

//do that for each ManageabilityCharacteristic you want to add....

.....

 

So, since you've ref'd in your WSDL's schema (PropertyDoc) the element
muws-p1-xs:ManageabilityCapability with a maxOccurs="unbounded", that is
saying your instace document can hold a List of
ManageabilityCharacteristics....all of which you will create and add to
the Properties Document....When you call m_propSet.get(..), if the
property is defined as an array of props, then our returned
ResourceProperty will support that (as will the code to access it)...

 

Hopefully I am explaining this clearly.  If you are still having an
issue, why don't you send me your generated xmlbeans jar and I'll
whip-up a real code snippet based on what XmlBeans generated...

 

-Sal

 

 

 

 


________________________________

From: Goulet, Michael J [mailto:Michael.Goulet@ca.com] 
Sent: Wednesday, March 09, 2005 7:26 PM
To: Campana Jr., Salvatore J
Cc: Srinivas, Davanum M
Subject: FW: example response



Sal, 

 

WSDM's response to my question is in the thread below.    I believe it's
a property because it can be a property ( am I missing something which
says it cant be a property?).  And its unbounded but in the context of
being contained in ManageabilityCharacteristicsProperties He's right,
the specification doesn't say it's a property, but I have been making
the assumption all along the I should be able to use ws-rf (in this case
Apollo) to retrieve the MOWS property.  There is either a disconnect
with mows and ws-rf or its an implementation issue with Apollo or my
code.  

 

Here is what I don't understand.  The xbeans generated for management
capability objects are:

Manageabilitycapabiltydocument

Managabilitycharactersticispropertydocument

Manageabilitycharacteristicspropertytype

 

ManageabilityCapability has a getter and a setter,

Manageabilitycharacteristicspropertytype has addManageabilityCapability
so you can add more than one capability 

 

So the only way to add more than one capability is to use
Manageabilitycharacteristicspropertytype.

 

Here is a code snippet:

prop = m_propSet.get(
com.ca.unicenter.wsdm.oasiswsdm.OasiswsdmPropertyQNames.MANAGEABILITYCHA
RACTERISTICSPROPERTIES);               

 
org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ManageabilityCharac
teristicsPropertiesDocument characteristics =
org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ManageabilityCharac
teristicsPropertiesDocument.Factory.newInstance();

 
org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ManageabilityCharac
teristicsPropertiesType characteristic =
characteristics.addNewManageabilityCharacteristicsProperties();

 
characteristic.addManageabilityCapability("http://docs.oasis-open.org/ws
dm/2004/12/muws/capabilities/Identification");

 
characteristic.addManageabilityCapability("http://docs.oasis-open.org/ws
dm/2004/12/mows/capabilities/OperationalStatus");

        prop.add(characteristics);

 

I don't understand the disconnect between the property MOWS wants me to
use , the MUWS schema and the property I could use extremely easily if I
use Apollo (actually I am using hermes upgraded with the latest Apollo
build) right out of the box by just adding the following to a wsdl:

<element ref="muws-p1-xs:ManageabilityCharacteristicsProperties"
minOccurs="1" maxOccurs="1"/>

and adding a bit of code to a generated file.

 

Am I making sense or am I missing something fundamental?  

 

 

Thanks

mike

 

________________________________

From: Sedukhin, Igor S 
Sent: Wednesday, March 09, 2005 5:54 PM
To: Goulet, Michael J
Cc: Srinivas, Davanum M
Subject: RE: example response

 

I don't understand why [Using this schema, ManageabilityCapability can
only occur once.]

Given

[

     <xs:element ref="muws-p1-xs:ManageabilityCapability" 

                  minOccurs="0" maxOccurs="unbounded"/>

]

 

It says "unbounded"?? And [muws-p1-xs:ManageabilityCapability] is a GED.
And the response for property retrieval is xs:any...

 

[property ManageabilityCharacteristicsProperties] It is not a
property... Why did you think it is a property? Specification never says
it is a paroperty...

-- Igor Sedukhin .. (igor.sedukhin@ca.com <ma...@ca.com>
)
-- (631) 342-4325 .. 1 CA Plaza, Islandia, NY 11749 

 

 

________________________________

From: Goulet, Michael J 
Sent: Wednesday, March 09, 2005 3:01 PM
To: Sedukhin, Igor S
Cc: Srinivas, Davanum M
Subject: RE: example response

I don't see how that is possible using this schema:

 

  <xs:element name="ManageabilityCapability" type="xs:anyURI"/>

 

  <xs:complexType name="ManageabilityCharacteristicsPropertiesType">

    <xs:sequence>

      <xs:element ref="muws-p1-xs:ManageabilityCapability"

                  minOccurs="0" maxOccurs="unbounded"/>

    </xs:sequence>

  </xs:complexType>

 

  <xs:element name="ManageabilityCharacteristicsProperties" 

 
type="muws-p1-xs:ManageabilityCharacteristicsPropertiesType"/>

 

 

Using this schema, ManageabilityCapability can only occur once.  The
property ManageabilityCharacteristicsProperties is what contains
multiple ManageabilityCapability

 

 

________________________________

From: Sedukhin, Igor S 
Sent: Wednesday, March 09, 2005 2:41 PM
To: Goulet, Michael J
Cc: Srinivas, Davanum M
Subject: RE: example response

 

It should be something like

 

<muws-p1-xs:ManageabilityCapability> 600

http://docs.oasis-open.org/wsdm/2004/12/muws/capabilities/Identity 601

</muws-p1-xs:ManageabilityCapability> 602

<muws-p1-xs:ManageabilityCapability> 603

http://example.com/capabilities/FooCapability 604

</muws-p1-xs:ManageabilityCapability>

 

The <xs:element name="ManageabilityCapability" type="xs:anyURI" />  is
decared in
http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part1.xsd

 

-- Igor Sedukhin .. (igor.sedukhin@ca.com <ma...@ca.com>
)
-- (631) 342-4325 .. 1 CA Plaza, Islandia, NY 11749 

 

 

________________________________

From: Goulet, Michael J 
Sent: Wednesday, March 09, 2005 11:29 AM
To: Sedukhin, Igor S
Cc: Srinivas, Davanum M
Subject: RE: example response

I assume by query ability you mean queryResourceProperties as opposed to
getResouceProperty.  Thats fine.  I just happened to be using query so I
can see all the properties, but the WSDM manager wont be using it.

 

RelatesTo is missing.  I guess the apache wsa project is not correct.  

 

Just to reiterate, my other question is about
ManageabilityCharacteristicsProperties.  (See bold in response message)
Should it be 

ManageabilityCharacteristics (which is an element which does not exist
in the muws schema)  since that's what is referenced in the interop
document?

 

 

 

 

 

 

 

________________________________

From: Sedukhin, Igor S 
Sent: Wednesday, March 09, 2005 10:48 AM
To: Goulet, Michael J
Subject: RE: example response

 

BTW, you cannot rely on query ability to be present at the endpoint. It
is optional and most may not care implementing or supporting it anyways.

 

You'd also need to configure the WSA to be 2003/03 namespace not
2004/08. WSDM depends on WSRF older version (i.e.
http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-dra
ft-01 depends on 2003/03 WSA).

 

I think WSA part is screwed up. I don't think From can be present in the
response. Where is wsa:RelatesTo??

 

Otherwise it looks fine.

-- Igor Sedukhin .. (igor.sedukhin@ca.com <ma...@ca.com>
)
-- (631) 342-4325 .. 1 CA Plaza, Islandia, NY 11749 

 

 

________________________________

From: Goulet, Michael J 
Sent: Wednesday, March 09, 2005 10:40 AM
To: Sedukhin, Igor S
Subject: example response

Here is a response to a * query.  Does it look fine except for
ManageabilityCharacteristicsProperties which should be
ManageabilityCharacteristics?  The latter is not in the muws-part1
schema but I suppose it could be created by modifying the management
endpoint wsdl and adding a ManageabilityCharacteristics property.

 

 

 

 

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">

 <soapenv:Header>

  <wsa:MessageID
soapenv:mustUnderstand="0">uuid:d6f2cae0-90b0-11d9-84a5-cbd83d240eb4</ws
a:MessageID>

  <wsa:To
soapenv:mustUnderstand="0">http://schemas.xmlsoap.org/ws/2004/08/address
ing/role/anonymous</wsa:To>

  <wsa:Action
soapenv:mustUnderstand="0">http://ws.apache.org/resource/example/filesys
tem/FileSystemPortType/yourWsdlRequestNameResponse</wsa:Action>

  <wsa:From soapenv:mustUnderstand="0"
xmlns:ns1="http://ca.com/unicenter/wsdm/oasiswsdm">

   <Address
xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://localhos
t:8080/wsrf/services/filesystem</Address>

   <ReferenceProperties
xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">

    <ns1:ResourceID mustUnderstand="1"
xmlns:ns1="http://ca.com/unicenter/wsdm/oasiswsdm">http://ca.com/employe
eInfo</ns1:ResourceID>

   </ReferenceProperties>

  </wsa:From>

 </soapenv:Header>

 <soapenv:Body>

  <wsrf1:QueryResourcePropertiesResponse
xmlns:wsdm="http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part1
.xsd"
xmlns:wsrf="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLife
time-1.2-draft-01.xsd"
xmlns:wsrf1="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourcePro
perties-1.2-draft-01.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

   <wsrf:CurrentTime>2005-03-09T10:35:17.886-05:00</wsrf:CurrentTime>

   <wsrf:TerminationTime
xmlns:wsrf="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLife
time-1.2-draft-01.xsd" xsi:nil="true"/>

   <wsdm:ResourceId>http://ca.com/employeeInfo</wsdm:ResourceId>

   <wsdm:ManageabilityCharacteristicsProperties
xmlns:wsdm="http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part1
.xsd">

 
<wsdm:ManageabilityCapability>http://docs.oasis-open.org/wsdm/2004/12/mu
ws/capabilities/Identification</wsdm:ManageabilityCapability>

 
<wsdm:ManageabilityCapability>http://docs.oasis-open.org/wsdm/2004/12/mo
ws/capabilities/OperationalStatus</wsdm:ManageabilityCapability>

   </wsdm:ManageabilityCharacteristicsProperties>

  </wsrf1:QueryResourcePropertiesResponse>

 </soapenv:Body>

</soapenv:Envelope>