[graap-wg] WSAG schema to java stubs: a confusion
Mumtaz Siddiqui
mumtaz at dps.uibk.ac.at
Sun Aug 27 09:54:01 CDT 2006
Hi,
There is a confusion between schema description and generated Java stubs.
According to the WSAG specifications, multiple ServiceDescriptionTerms and
Preferences can be defined/described as shown in appendix 2/3 examples.
But, when we generate Java stubs (using WSDL2Java emmiter or castor), the
generated stubs provide these fields as single element instead of array
or vector.
For examle TermCompositorType class:
public class TermCompositorType implements java.io.Serializable {
private org.ggf.wsag.TermCompositorType exactlyOne;
private org.ggf.wsag.TermCompositorType oneOrMore;
private org.ggf.wsag.TermCompositorType all;
private org.ggf.wsag.ServiceDescriptionTermType serviceDescriptionTerm;
//???? Should not it array like ServiceDescriptionTermType[]????
private org.ggf.wsag.ServiceReferenceType serviceReference;
private org.ggf.wsag.ServicePropertiesType serviceProperties;
private org.ggf.wsag.GuaranteeTermType guaranteeTerm;
public TermCompositorType() {
}
...
}
Here I expect ServiceDescriptionTermType[] instead of
ServiceDescriptionTermType.
probably, here we can use domain specific terms like JobDefinition from
JSDL as
JobDefinition_Type[] jdefs = new JobDefinition_Type[2];
jdefs[0] = new JobDefinition_Type();
jdefs[1] = new JobDefinition_Type();
sdterm.set_any(AnyHelper.toAnyArray(jdefs));
sdterm.setServiceName(new NCName("job1"));
In this case the serialized XML document does not look like as expected!
See the serialized
form below:
<agreement>
....
<ns2:ServiceDescriptionTerm ns2:ServiceName="job1"
xsi:type="ns2:ServiceDescriptionTermType">
<ns3:value xsi:type="ns4:JobDefinition_Type"
xmlns:ns3="http://www.globus.org/namespaces/2004/06/core"
xmlns:ns4="http://schemas.ggf.org/jsdl/2005/11/jsdl">
<ns4:JobDescription
xsi:type="ns4:JobDescription_Type" xsi:nil="true"/>
</ns3:value>
<ns5:value xsi:type="ns6:JobDefinition_Type"
xmlns:ns5="http://www.globus.org/namespaces/2004/06/core"
xmlns:ns6="http://schemas.ggf.org/jsdl/2005/11/jsdl">
<ns6:JobDescription
xsi:type="ns6:JobDescription_Type" xsi:nil="true"/>
</ns5:value>
</ns2:ServiceDescriptionTerm>
....
</agreement>
Similarly, in case of BusinessValueListType class
public class BusinessValueListType implements java.io.Serializable {
private java.lang.Integer importance;
private org.ggf.wsag.CompensationType[] penalty;
private org.ggf.wsag.CompensationType[] reward;
private org.ggf.wsag.PreferenceType preference; <<<<<<????????
private java.lang.Object[] customBusinessValue;
public BusinessValueListType() {
}
...
}
again I expect PreferenceType field as array like PreferenceType[].
Probably my understanding is wrong or the Java stubs are incorrectly
generated. Would be great if someone could explain it? How to specify
multiple terms and preferences using generated Java stubs?
Thanks
mumtaz
PS: Typo in wsag draft page 25? "A guarantee term can have one or more
service scopes.
A service scope describes to what service element specifically a service
applies."
May be the last 'service' is to be replaced with 'guarantee'?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wsag_stubs.tgz
Type: application/x-compressed-tar
Size: 11877 bytes
Desc: not available
Url : http://www.ogf.org/pipermail/graap-wg/attachments/20060827/6a5f0063/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3508 bytes
Desc: S/MIME Cryptographic Signature
Url : http://www.ogf.org/pipermail/graap-wg/attachments/20060827/6a5f0063/attachment-0001.bin
More information about the graap-wg
mailing list