[
http://issues.apache.org/jira/browse/MUSE-58?page=comments#action_12429056 ]
Joel Hawkins commented on MUSE-58:
----------------------------------
Ack, I think you're right!
Here's the problem:
in the current version, the ResourceProperties comes directly from the muws2
XSD,
<portType name="RelationshipPortType"
wsrf-rp:ResourceProperties="muws2:RelationshipType">
which points to
<xs:complexType name="RelationshipType">
<xs:sequence>
<xs:element ref="muws2:Name" minOccurs="0" />
<xs:element ref="muws2:Type" />
<xs:element ref="muws2:Participant" minOccurs="2"
maxOccurs="unbounded" />
<xs:element name="AccessEndpointReference"
type="wsa:EndpointReferenceType" minOccurs="0"
/>
<xs:any minOccurs="0" maxOccurs="unbounded"
namespace="##other" processContents="lax" />
</xs:sequence>
<xs:anyAttribute namespace="##other" />
</xs:complexType>
Sadly, muse wants an element, not a type. I tried feeding it
<xs:element name="Relationship" type="muws2:RelationshipType" />
but it wants a sequence.
My work-around was to make the following change to the WS-Resource-1_2.wsdl:
<types>
<xs:schema elementFormDefault="qualified"
targetNamespace="http://docs.oasis-open.org/wsdm/muws2-2.wsdl">
<xs:import
namespace="http://docs.oasis-open.org/wsdm/muws2-2.xsd"
schemaLocation="WSDM-MUWS-Part2-1_1.xsd" />
<xs:import
namespace="http://docs.oasis-open.org/wsdm/muws1-2.xsd"
schemaLocation="WSDM-MUWS-Part1-1_1.xsd" />
<xs:element name="WsdmResourceProperties">
<xs:complexType>
<xs:sequence>
<xs:element ref="muws2:Name" minOccurs="0" />
<xs:element ref="muws2:Type" />
<xs:element ref="muws2:Participant" minOccurs="2"
maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
<portType name="RelationshipPortType"
wsrf-rp:ResourceProperties="tns:WsdmResourceProperties">
I think the right change is actually in the XSD - but all those angle brackets
scare me. :-)
> Problems with QueryRelationshipsByType
> --------------------------------------
>
> Key: MUSE-58
> URL: http://issues.apache.org/jira/browse/MUSE-58
> Project: Muse
> Issue Type: Bug
> Components: WSDM MUWS Relationships
> Affects Versions: 2.0.0 M2
> Environment: All
> Reporter: Joel Hawkins
> Assigned To: Dan Jemiolo
> Fix For: 2.0.0
>
> Attachments: muse-wsdm-relationships-fix-query-uri.patch,
> muse-wsdm-relationships-serialization.patch, WS-Resource-1_2.wsdl
>
>
> According to the spec, the QueryByRelationships capability URI should be
> http://docs.oasis-open.org/wsdm/muws/capabilities/Relationships.
> Additionally, the creation of relationships programatically was failing due
> to a NPE. This had to do with the fact that the dependent relationship
> resource was being initialized before the containing resource.
> Then, the serialization of the query response was failing due to a
> class-cast exception (an array of WSResources was being supplied to a method
> that expected an array of RelationshipResources).
> Finally, the RelationshipClient was throwing an exception because the
> response did not include the EPR of the relationship containing the
> participants, etc.
> Additionally, I had trouble getting the WSDL to be accepted, as the WSDLUtils
> refused to accept the the wsrf-rp:ResourceProperties directly from the
> specified XSD file (it was expecting an xsd:sequence) . I've attached the
> WSDL that works for me - see what you want to do with it.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]