I hava developed a client in C# that is connected to a 3-party XML Web
Services developed in Java based on the AXIS 1.1. Most methods call are
successful except for one method named "findObject s" and return a complex
type "FieldSearchRes ult". The error message as following :
"Cannot assign object of type System.String to an object of type
System.String[]. There is an error in XML document (23, 97)."
By the way,I hava written a client in Java and everything is working.
I don’t know how to resolve the problem, can anyone help me?
Thanks!
WSDL,auto-generated proxy class and Web Services Response Message are as
following:
(1) The corresponding WSDL as following:
///////////////////////////////////////////////////////////////////////////////
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitio ns ......>
<import namespace="http ://schemas.xmlsoap .org/soap/encoding/"/>
<simpleType name="passByRef ">
<restriction base="xsd:strin g">
<enumeration value="URL_REF"/>
</restriction>
</simpleType>
<simpleType name="passByVal ue">
<restriction base="xsd:strin g">
<enumeration value="VALUE"/>
</restriction>
</simpleType>
<simpleType name="Compariso nOperator">
<restriction base="xsd:strin g">
<enumeration value="has"/>
<enumeration value="eq"/>
<enumeration value="lt"/>
<enumeration value="le"/>
<enumeration value="gt"/>
<enumeration value="ge"/>
</restriction>
</simpleType>
<complexType name="Condition ">
<sequence>
<element name="property" nillable="true" type="xsd:strin g"/>
<element name="operator" nillable="true" type="tns1:Comp arisonOperator"/>
<element name="value" nillable="true" type="xsd:strin g"/>
</sequence>
</complexType>
<complexType name="Datastrea mDef">
<sequence>
<element name="ID" nillable="true" type="xsd:strin g"/>
<element name="label" nillable="true" type="xsd:strin g"/>
<element name="MIMEType" nillable="true" type="xsd:strin g"/>
</sequence>
</complexType>
<complexType name="ListSessi on">
<sequence>
<element name="token" nillable="true" type="xsd:strin g"/>
<element maxOccurs="1" minOccurs="0" name="cursor" nillable="true"
type="xsd:nonNe gativeInteger"/>
<element maxOccurs="1" minOccurs="0" name="completeL istSize"
nillable="true" type="xsd:nonNe gativeInteger"/>
<element maxOccurs="1" minOccurs="0" name="expiratio nDate"
nillable="true" type="xsd:strin g"/>
</sequence>
</complexType>
<complexType name="ObjectFie lds">
<sequence>
<element maxOccurs="1" minOccurs="0" name="pid" nillable="true"
type="xsd:strin g"/>
<element maxOccurs="1" minOccurs="0" name="label" nillable="true"
type="xsd:strin g"/>
<element maxOccurs="1" minOccurs="0" name="fType" nillable="true"
type="xsd:strin g"/>
<element maxOccurs="1" minOccurs="0" name="cModel" nillable="true"
type="xsd:strin g"/>
<element maxOccurs="1" minOccurs="0" name="state" nillable="true"
type="xsd:strin g"/>
<element maxOccurs="1" minOccurs="0" name="ownerId" nillable="true"
type="xsd:strin g"/>
<element maxOccurs="1" minOccurs="0" name="cDate" nillable="true"
type="xsd:strin g"/>
<element maxOccurs="1" minOccurs="0" name="mDate" nillable="true"
type="xsd:strin g"/>
<element maxOccurs="1" minOccurs="0" name="dcmDate" nillable="true"
type="xsd:strin g"/>
<element maxOccurs="unbo unded" minOccurs="0" name="bDef" nillable="true"
type="xsd:strin g"/>
<element maxOccurs="unbo unded" minOccurs="0" name="bMech" nillable="true"
type="xsd:strin g"/>
<element maxOccurs="unbo unded" minOccurs="0" name="title" nillable="true"
type="xsd:strin g"/>
<element maxOccurs="unbo unded" minOccurs="0" name="creator"
nillable="true" type="xsd:strin g"/>
<element maxOccurs="unbo unded" minOccurs="0" name="subject"
nillable="true" type="xsd:strin g"/>
<element maxOccurs="unbo unded" minOccurs="0" name="descripti on"
nillable="true" type="xsd:strin g"/>
<element maxOccurs="unbo unded" minOccurs="0" name="publisher "
nillable="true" type="xsd:strin g"/>
<element maxOccurs="unbo unded" minOccurs="0" name="contribut or"
nillable="true" type="xsd:strin g"/>
<element maxOccurs="unbo unded" minOccurs="0" name="date" nillable="true"
type="xsd:strin g"/>
<element maxOccurs="unbo unded" minOccurs="0" name="type" nillable="true"
type="xsd:strin g"/>
<element maxOccurs="unbo unded" minOccurs="0" name="format"
nillable="true" type="xsd:strin g"/>
<element maxOccurs="unbo unded" minOccurs="0" name="identifie r"
nillable="true" type="xsd:strin g"/>
<element maxOccurs="unbo unded" minOccurs="0" name="source"
nillable="true" type="xsd:strin g"/>
<element maxOccurs="unbo unded" minOccurs="0" name="language"
nillable="true" type="xsd:strin g"/>
<element maxOccurs="unbo unded" minOccurs="0" name="relation"
nillable="true" type="xsd:strin g"/>
<element maxOccurs="unbo unded" minOccurs="0" name="coverage"
nillable="true" type="xsd:strin g"/>
<element maxOccurs="unbo unded" minOccurs="0" name="rights"
nillable="true" type="xsd:strin g"/>
</sequence>
</complexType>
<complexType name="ArrayOfOb jectFields">
<complexContent >
<restriction base="soapenc:A rray">
<attribute ref="soapenc:ar rayType" wsdl:arrayType= "tns1:ObjectFie lds[]"/>
</restriction>
</complexContent>
</complexType>
<complexType name="FieldSear chResult">
<sequence>
<element maxOccurs="1" minOccurs="0" name="listSessi on" nillable="true"
type="tns1:List Session"/>
<element name="resultLis t" nillable="true"
type="tns1:Arra yOfObjectFields "/>
</sequence>
</complexType>
<simpleType name="defaultIn putType">
<restriction base="xsd:strin g">
<enumeration value="fedora:d efaultInputType "/>
</restriction>
</simpleType>
<simpleType name="userInput Type">
<restriction base="xsd:strin g">
<enumeration value="fedora:u serInputType"/>
</restriction>
</simpleType>
<complexType name="ArrayOfCo ndition">
<complexContent >
<restriction base="soapenc:A rray">
<attribute ref="soapenc:ar rayType" wsdl:arrayType= "tns1:Condi tion[]"/>
</restriction>
</complexContent>
</complexType>
<complexType name="FieldSear chQuery">
<sequence>
<element name="condition s" nillable="true" type="tns1:Arra yOfCondition"/>
<element name="terms" nillable="true" type="xsd:strin g"/>
</sequence>
</complexType>
<complexType name="ObjectPro file">
<sequence>
<element name="pid" nillable="true" type="xsd:strin g"/>
<element name="objLabel" nillable="true" type="xsd:strin g"/>
<element name="objConten tModel" nillable="true" type="xsd:strin g"/>
<element name="objType" nillable="true" type="xsd:strin g"/>
<element name="objCreate Date" nillable="true" type="xsd:strin g"/>
<element name="objLastMo dDate" nillable="true" type="xsd:strin g"/>
<element name="objDissIn dexViewURL" nillable="true" type="xsd:strin g"/>
<element name="objItemIn dexViewURL" nillable="true" type="xsd:strin g"/>
</sequence>
</complexType>
<complexType name="ArrayOfSt ring">
<complexContent >
<restriction base="soapenc:A rray">
<attribute ref="soapenc:ar rayType" wsdl:arrayType= "xsd:string[]"/>
</restriction>
</complexContent>
</complexType>
<simpleType name="datastrea mInputType">
<restriction base="xsd:strin g">
<enumeration value="fedora:d atastreamInputT ype"/>
</restriction>
</simpleType>
<complexType name="MethodPar mDef">
<sequence>
<element name="parmName" nillable="true" type="xsd:strin g"/>
<element name="parmType" nillable="true" type="xsd:strin g"/>
<element name="parmDefau ltValue" nillable="true" type="xsd:strin g"/>
<element name="parmDomai nValues" nillable="true"
type="tns1:Arra yOfString"/>
<element name="parmRequi red" type="xsd:boole an"/>
<element name="parmLabel " nillable="true" type="xsd:strin g"/>
<element name="parmPassB y" nillable="true" type="xsd:strin g"/>
<element name="PASS_BY_R EF" nillable="true" type="tns1:pass ByRef"/>
<element name="PASS_BY_V ALUE" nillable="true" type="tns1:pass ByValue"/>
<element name="DATASTREA M_INPUT" nillable="true"
type="tns1:data streamInputType "/>
<element name="USER_INPU T" nillable="true" type="tns1:user InputType"/>
<element name="DEFAULT_I NPUT" nillable="true"
type="tns1:defa ultInputType"/>
</sequence>
</complexType>
<complexType name="ArrayOfMe thodParmDef">
<complexContent >
<restriction base="soapenc:A rray">
<attribute ref="soapenc:ar rayType" wsdl:arrayType= "tns1:MethodPar mDef[]"/>
</restriction>
</complexContent>
</complexType>
<complexType name="ObjectMet hodsDef">
<sequence>
<element name="PID" nillable="true" type="xsd:strin g"/>
<element name="bDefPID" nillable="true" type="xsd:strin g"/>
<element name="methodNam e" nillable="true" type="xsd:strin g"/>
<element name="methodPar mDefs" nillable="true"
type="tns1:Arra yOfMethodParmDe f"/>
<element name="asOfDate" nillable="true" type="xsd:strin g"/>
</sequence>
</complexType>
<complexType name="Property" >
<sequence>
<element name="name" nillable="true" type="xsd:strin g"/>
<element name="value" nillable="true" type="xsd:strin g"/>
</sequence>
</complexType>
<complexType name="ArrayOfPr operty">
<complexContent >
<restriction base="soapenc:A rray">
<attribute ref="soapenc:ar rayType" wsdl:arrayType= "tns1:Prope rty[]"/>
</restriction>
</complexContent>
</complexType>
<complexType name="MIMETyped Stream">
<sequence>
<element name="MIMEType" nillable="true" type="xsd:strin g"/>
<element name="stream" type="xsd:base6 4Binary"/>
<element name="header" nillable="true" type="tns1:Arra yOfProperty"/>
</sequence>
</complexType>
<complexType name="Repositor yInfo">
<sequence>
<element name="repositor yName" nillable="true" type="xsd:strin g"/>
<element name="repositor yVersion" nillable="true" type="xsd:strin g"/>
<element name="repositor yBaseURL" nillable="true" type="xsd:strin g"/>
<element name="repositor yPIDNamespace" nillable="true" type="xsd:strin g"/>
<element name="defaultEx portFormat" nillable="true" type="xsd:strin g"/>
<element name="OAINamesp ace" nillable="true" type="xsd:strin g"/>
<element name="adminEmai lList" nillable="true" type="tns1:Arra yOfString"/>
<element name="samplePID " nillable="true" type="xsd:strin g"/>
<element name="sampleOAI Identifier" nillable="true" type="xsd:strin g"/>
<element name="sampleSea rchURL" nillable="true" type="xsd:strin g"/>
<element name="sampleAcc essURL" nillable="true" type="xsd:strin g"/>
<element name="sampleOAI URL" nillable="true" type="xsd:strin g"/>
<element name="retainPID s" nillable="true" type="tns1:Arra yOfString"/>
</sequence>
</complexType>
<complexType name="ArrayOfOb jectMethodsDef" >
<complexContent >
<restriction base="soapenc:A rray">
<attribute ref="soapenc:ar rayType"
wsdl:arrayType= "tns1:ObjectMet hodsDef[]"/>
</restriction>
</complexContent>
</complexType>
<complexType name="ArrayOfDa tastreamDef">
<complexContent >
<restriction base="soapenc:A rray">
<attribute ref="soapenc:ar rayType" wsdl:arrayType= "tns:Datastream Def[]"/>
</restriction>
</complexContent>
</complexType>
</Schema>
</wsdl:types>
<wsdl:message name="getDatast reamDisseminati onResponse">
<wsdl:part name="response" type="tns1:MIME TypedStream"/>
</wsdl:message>
<wsdl:message name="findObjec tsRequest">
<wsdl:part name="resultFie lds" type="tns1:Arra yOfString"/>
<wsdl:part name="maxResult s" type="xsd:nonNe gativeInteger"/>
<wsdl:part name="query" type="tns1:Fiel dSearchQuery"/>
</wsdl:message>
<wsdl:message name="getObject ProfileResponse ">
<wsdl:part name="response" type="tns1:Obje ctProfile"/>
</wsdl:message>
<wsdl:message name="listDatas treamsResponse" >
<wsdl:part name="response" type="tns1:Arra yOfDatastreamDe f"/>
</wsdl:message>
<wsdl:message name="getObject HistoryResponse ">
<wsdl:part name="response" type="tns1:Arra yOfString"/>
</wsdl:message>
<wsdl:message name="resumeFin dObjectsRespons e">
<wsdl:part name="response" type="tns1:Fiel dSearchResult"/>
</wsdl:message>
<wsdl:message name="listDatas treamsRequest">
<wsdl:part name="pid" type="xsd:strin g"/>
<wsdl:part name="asOfDateT ime" type="xsd:strin g"/>
</wsdl:message>
<wsdl:message name="getObject HistoryRequest" >
<wsdl:part name="pid" type="xsd:strin g"/>
</wsdl:message>
<wsdl:message name="getDissem inationResponse ">
<wsdl:part name="response" type="tns1:MIME TypedStream"/>
</wsdl:message>
<wsdl:message name="describeR epositoryRespon se">
<wsdl:part name="response" type="tns1:Repo sitoryInfo"/>
</wsdl:message>
<wsdl:message name="listMetho dsRequest">
<wsdl:part name="pid" type="xsd:strin g"/>
<wsdl:part name="asOfDateT ime" type="xsd:strin g"/>
</wsdl:message>
<wsdl:message name="getDatast reamDisseminati onRequest">
<wsdl:part name="pid" type="xsd:strin g"/>
<wsdl:part name="dsID" type="xsd:strin g"/>
<wsdl:part name="asOfDateT ime" type="xsd:strin g"/>
</wsdl:message>
<wsdl:message name="resumeFin dObjectsRequest ">
<wsdl:part name="sessionTo ken" type="xsd:strin g"/>
</wsdl:message>
<wsdl:message name="listMetho dsResponse">
<wsdl:part name="response" type="tns1:Arra yOfObjectMethod sDef"/>
</wsdl:message>
<wsdl:message name="describeR epositoryReques t">
</wsdl:message>
<wsdl:message name="getDissem inationRequest" >
<wsdl:part name="pid" type="xsd:strin g"/>
<wsdl:part name="bDefPid" type="xsd:strin g"/>
<wsdl:part name="methodNam e" type="xsd:strin g"/>
<wsdl:part name="parameter s" type="tns1:Arra yOfProperty"/>
<wsdl:part name="asOfDateT ime" type="xsd:strin g"/>
</wsdl:message>
<wsdl:message name="findObjec tsResponse">
<wsdl:part name="response" type="tns1:Fiel dSearchResult"/>
</wsdl:message>
<wsdl:message name="getObject ProfileRequest" >
<wsdl:part name="pid" type="xsd:strin g"/>
<wsdl:part name="asOfDateT ime" type="xsd:strin g"/>
</wsdl:message>
<wsdl:portTyp e name="Fedora-API-A">
<wsdl:operati on name="describeR epository">
<wsdl:input message="impl:d escribeReposito ryRequest"
name="describeR epositoryReques t"/>
<wsdl:output message="impl:d escribeReposito ryResponse"
name="describeR epositoryRespon se"/>
</wsdl:operation>
<wsdl:operati on name="getObject Profile" parameterOrder= "pid asOfDateTime">
<wsdl:input message="impl:g etObjectProfile Request"
name="getObject ProfileRequest"/>
<wsdl:output message="impl:g etObjectProfile Response"
name="getObject ProfileResponse "/>
</wsdl:operation>
<wsdl:operati on name="listMetho ds" parameterOrder= "pid asOfDateTime">
<wsdl:input message="impl:l istMethodsReque st"
name="listMetho dsRequest"/>
<wsdl:output message="impl:l istMethodsRespo nse"
name="listMetho dsResponse"/>
</wsdl:operation>
<wsdl:operati on name="listDatas treams" parameterOrder= "pid asOfDateTime">
<wsdl:input message="impl:l istDatastreamsR equest"
name="listDatas treamsRequest"/>
<wsdl:output message="impl:l istDatastreamsR esponse"
name="listDatas treamsResponse"/>
</wsdl:operation>
<wsdl:operati on name="getDatast reamDisseminati on" parameterOrder= "pid
dsID asOfDateTime">
<wsdl:input message="impl:g etDatastreamDis seminationReque st"
name="getDatast reamDisseminati onRequest"/>
<wsdl:output message="impl:g etDatastreamDis seminationRespo nse"
name="getDatast reamDisseminati onResponse"/>
</wsdl:operation>
<wsdl:operati on name="getDissem ination" parameterOrder= "pid bDefPid
methodName parameters asOfDateTime">
<wsdl:input message="impl:g etDissemination Request"
name="getDissem inationRequest"/>
<wsdl:output message="impl:g etDissemination Response"
name="getDissem inationResponse "/>
</wsdl:operation>
<wsdl:operati on name="findObjec ts" parameterOrder= "resultFiel ds
maxResults query">
<wsdl:input message="impl:f indObjectsReque st"
name="findObjec tsRequest"/>
<wsdl:output message="impl:f indObjectsRespo nse"
name="findObjec tsResponse"/>
</wsdl:operation>
<wsdl:operati on name="resumeFin dObjects" parameterOrder= "sessionTok en">
<wsdl:input message="impl:r esumeFindObject sRequest"
name="resumeFin dObjectsRequest "/>
<wsdl:output message="impl:r esumeFindObject sResponse"
name="resumeFin dObjectsRespons e"/>
</wsdl:operation>
<wsdl:operati on name="getObject History" parameterOrder= "pid">
<wsdl:input message="impl:g etObjectHistory Request"
name="getObject HistoryRequest"/>
<wsdl:output message="impl:g etObjectHistory Response"
name="getObject HistoryResponse "/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="access/soapSoapBinding " type="impl:Fedo ra-API-A">
<wsdlsoap:bindi ng style="rpc"
transport="http ://schemas.xmlsoap .org/soap/http"/>
<wsdl:operati on name="describeR epository">
<wsdlsoap:opera tion
soapAction="htt p://www.fedora.info/definitions/1/0/api/#describeReposi tory"/>
<wsdl:input name="describeR epositoryReques t">
<wsdlsoap:bod y
encodingStyle=" http://schemas.xmlsoap .org/soap/encoding/"
namespace="http ://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="describeR epositoryRespon se">
<wsdlsoap:bod y
encodingStyle=" http://schemas.xmlsoap .org/soap/encoding/"
namespace="http ://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operati on name="getObject Profile">
<wsdlsoap:opera tion
soapAction="htt p://www.fedora.info/definitions/1/0/api/#getObjectProfi le"/>
<wsdl:input name="getObject ProfileRequest" >
<wsdlsoap:bod y
encodingStyle=" http://schemas.xmlsoap .org/soap/encoding/"
namespace="http ://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="getObject ProfileResponse ">
<wsdlsoap:bod y
encodingStyle=" http://schemas.xmlsoap .org/soap/encoding/"
namespace="http ://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operati on name="listMetho ds">
<wsdlsoap:opera tion
soapAction="htt p://www.fedora.info/definitions/1/0/api/#listMethods"/>
<wsdl:input name="listMetho dsRequest">
<wsdlsoap:bod y
encodingStyle=" http://schemas.xmlsoap .org/soap/encoding/"
namespace="http ://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="listMetho dsResponse">
<wsdlsoap:bod y
encodingStyle=" http://schemas.xmlsoap .org/soap/encoding/"
namespace="http ://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operati on name="listDatas treams">
<wsdlsoap:opera tion
soapAction="htt p://www.fedora.info/definitions/1/0/api/#listDatastream s"/>
<wsdl:input name="listDatas treamsRequest">
<wsdlsoap:bod y
encodingStyle=" http://schemas.xmlsoap .org/soap/encoding/"
namespace="http ://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="listDatas treamsResponse" >
<wsdlsoap:bod y
encodingStyle=" http://schemas.xmlsoap .org/soap/encoding/"
namespace="http ://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operati on name="getDatast reamDisseminati on">
<wsdlsoap:opera tion
soapAction="htt p://www.fedora.info/definitions/1/0/api/#getDatastreamD issemination"/>
<wsdl:input name="getDatast reamDisseminati onRequest">
<wsdlsoap:bod y
encodingStyle=" http://schemas.xmlsoap .org/soap/encoding/"
namespace="http ://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="getDatast reamDisseminati onResponse">
<wsdlsoap:bod y
encodingStyle=" http://schemas.xmlsoap .org/soap/encoding/"
namespace="http ://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operati on name="getDissem ination">
<wsdlsoap:opera tion
soapAction="htt p://www.fedora.info/definitions/1/0/api/#getDisseminati on"/>
<wsdl:input name="getDissem inationRequest" >
<wsdlsoap:bod y
encodingStyle=" http://schemas.xmlsoap .org/soap/encoding/"
namespace="http ://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="getDissem inationResponse ">
<wsdlsoap:bod y
encodingStyle=" http://schemas.xmlsoap .org/soap/encoding/"
namespace="http ://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operati on name="findObjec ts">
<wsdlsoap:opera tion
soapAction="htt p://www.fedora.info/definitions/1/0/api/#findObjects"/>
<wsdl:input name="findObjec tsRequest">
<wsdlsoap:bod y
encodingStyle=" http://schemas.xmlsoap .org/soap/encoding/"
namespace="http ://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="findObjec tsResponse">
<wsdlsoap:bod y
encodingStyle=" http://schemas.xmlsoap .org/soap/encoding/"
namespace="http ://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operati on name="resumeFin dObjects">
<wsdlsoap:opera tion
soapAction="htt p://www.fedora.info/definitions/1/0/api/#resumeFindObje cts"/>
<wsdl:input name="resumeFin dObjectsRequest ">
<wsdlsoap:bod y
encodingStyle=" http://schemas.xmlsoap .org/soap/encoding/"
namespace="http ://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="resumeFin dObjectsRespons e">
<wsdlsoap:bod y
encodingStyle=" http://schemas.xmlsoap .org/soap/encoding/"
namespace="http ://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operati on name="getObject History">
<wsdlsoap:opera tion
soapAction="htt p://www.fedora.info/definitions/1/0/api/#getObjectHisto ry"/>
<wsdl:input name="getObject HistoryRequest" >
<wsdlsoap:bod y
encodingStyle=" http://schemas.xmlsoap .org/soap/encoding/"
namespace="http ://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="getObject HistoryResponse ">
<wsdlsoap:bod y
encodingStyle=" http://schemas.xmlsoap .org/soap/encoding/"
namespace="http ://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="Fedora-API-A-Service">
<wsdl:port binding="impl:a ccess/soapSoapBinding " name="access/soap">
<wsdlsoap:addre ss location="http://localhost:8080/fedora/access/soap"/>
</wsdl:port>
</wsdl:service>
</wsdl:definition s>
(2) And the corresponding classes generated by wsdl.exe in C# are as
following:
///////////////////////////////////////////////////////////////////////////////
namespace FedoraDAL.Fedor aAPIA {
using System.Diagnost ics;
using System.Xml.Seri alization;
using System;
using System.Web.Serv ices.Protocols;
using System.Componen tModel;
using System.Web.Serv ices;
using System.Collecti ons;
/// <remarks/>
[System.Diagnost ics.DebuggerSte pThroughAttribu te()]
[System.Componen tModel.Designer CategoryAttribu te("code")]
[System.Web.Serv ices.WebService BindingAttribut e(Name="access/soapSoapBinding ", Namespace="http ://www.fedora.info/definitions/1/0/api/")]
[System.Xml.Seri alization.SoapI ncludeAttribute (typeof(ObjectF ields))]
[System.Xml.Seri alization.SoapI ncludeAttribute (typeof(Conditi on))]
[System.Xml.Seri alization.SoapI ncludeAttribute (typeof(Propert y))]
[System.Xml.Seri alization.SoapI ncludeAttribute (typeof(Datastr eamDef))]
[System.Xml.Seri alization.SoapI ncludeAttribute (typeof(MethodP armDef))]
[System.Xml.Seri alization.SoapI ncludeAttribute (typeof(ObjectM ethodsDef))]
public class FedoraAPIAServi ce :
System.Web.Serv ices.Protocols. SoapHttpClientP rotocol {
/// <remarks/>
public FedoraAPIAServi ce() {
this.Url = "http://localhost:8080/fedora/access/soap";
}
……
/// <remarks/>
[System.Web.Serv ices.Protocols. SoapRpcMethodtt ribute("http://www.fedora.info/definitions/1/0/api/#findObjects",
RequestNamespac e="http://www.fedora.info/definitions/1/0/api/",
ResponseNamespa ce="http://www.fedora.info/definitions/1/0/api/")]°
[return: System.Xml.Seri alization.SoapE lementAttribute ("response")]
public FieldSearchResu lt findObjects(str ing[] resultFields,
[System.Xml.Seri alization.SoapE lementAttribute (DataType="nonN egativeInteger" )] string maxResults, FieldSearchQuer y query) {
object[] results = this.Invoke("fi ndObjects", new object[] {
resultFields,
maxResults,
query});
return ((FieldSearchRe sult)(results[0]));
}
……
}
/// <remarks/>
[System.Xml.Seri alization.SoapT ypeAttribute("O bjectFields",
"http://www.fedora.info/definitions/1/0/types/")]
public class ObjectFields {
/// <remarks/>
public string pid;
/// <remarks/>
public string label;
/// <remarks/>
public string fType;
/// <remarks/>
public string cModel;
/// <remarks/>
public string state;
/// <remarks/>
public string ownerId;
/// <remarks/>
public string cDate;
/// <remarks/>
public string mDate;
/// <remarks/>
public string dcmDate;
/// <remarks/>
public string[] bDef;
/// <remarks/>
public string[] bMech;
/// <remarks/>
public string[] title;
/// <remarks/>
public string[] creator;
/// <remarks/>
public string[] subject;
/// <remarks/>
public string[] description;
/// <remarks/>
public string[] publisher;
/// <remarks/>
public string[] contributor;
/// <remarks/>
public string[] date;
/// <remarks/>
public string[] type;
/// <remarks/>
public string[] format;
/// <remarks/>
public string[] identifier;
/// <remarks/>
public string[] source;
/// <remarks/>
public string[] language;
/// <remarks/>
public string[] relation;
/// <remarks/>
public string[] coverage;
/// <remarks/>
public string[] rights;
}
/// <remarks/>
[System.Xml.Seri alization.SoapT ypeAttribute("L istSession",
"http://www.fedora.info/definitions/1/0/types/")]
public class ListSession {
/// <remarks/>
public string token;
/// <remarks/>
[System.Xml.Seri alization.SoapE lementAttribute (DataType="nonN egativeInteger" )]
public string cursor;
/// <remarks/>
[System.Xml.Seri alization.SoapE lementAttribute (DataType="nonN egativeInteger" )]
public string completeListSiz e;
/// <remarks/>
public string expirationDate;
}
/// <remarks/>
[System.Xml.Seri alization.SoapT ypeAttribute("F ieldSearchResul t",
"http://www.fedora.info/definitions/1/0/types/")]
public class FieldSearchResu lt {
/// <remarks/>
public ListSession listSession;
/// <remarks/>
public ObjectFields[] resultList;
}
}
(3) And I have trapped the response message from the XML Web Services as
following:
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
<?xml version="1.0" encoding="UTF-8"?>.
<soapenv:Envelo pe 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">.
<soapenv:Body >.
<ns1:findObject sResponse
soapenv:encodin gStyle="http://schemas.xmlsoap .org/soap/encoding/"
xmlns:ns1="http ://www.fedora.info/definitions/1/0/api/">.
<response href="#id0"/>.
</ns1:findObjects Response>.
<multiRef id="id0" soapenc:root="0 "
soapenv:encodin gStyle="http://schemas.xmlsoap .org/soap/encoding/"
xsi:type="ns2:F ieldSearchResul t"
xmlns:soapenc=" http://schemas.xmlsoap .org/soap/encoding/"
xmlns:ns2="http ://www.fedora.info/definitions/1/0/types/">.
<listSession xsi:type="ns2:L istSession" xsi:nil="true"/>.
<resultList xsi:type="soape nc:Array" soapenc:array
Type="ns2:Objec tFields[1]">.
<item href="#id1"/>.
</resultList>.
</multiRef>.
<multiRef id="id1" soapenc:root="0 "
soapenv:encodin gStyle="http://schemas.xmlsoap .org/soap/encoding/"
xsi:type="ns3:O bjectFields"
xmlns:ns3="http ://www.fedora.info/definitions/1/0/types/"
xmlns:soapenc=" http://schemas.xmlsoap .org/soap/encoding/">.
<pid xsi:type="xsd:s tring">demo:1</pid>.
<label xsi:type="xsd:s tring" xsi:nil="true"/>.
<fType xsi:type="xsd:s tring" xsi:nil="true"/>.
<cModel xsi:type="xsd:s tring" xsi:nil="true"/>.
<state xsi:type="xsd:s tring" xsi:nil="true"/>.
<ownerId xsi:type="xsd:s tring" xsi:nil="true"/>.
<cDate xsi:type="xsd:s tring">2004-12-10T00:21:52.000 Z</cDate>.
<mDate xsi:type="xsd:s tring" xsi:nil="true"/>.
<dcmDate xsi:type="xsd:s tring" xsi:nil="true"/>.
<title xsi:type="xsd:s tring">Behavior Definition Object for UVA Simple
Image Contract</title>.
</multiRef>.
</soapenv:Body>.
</soapenv:Envelop e>.
Services developed in Java based on the AXIS 1.1. Most methods call are
successful except for one method named "findObject s" and return a complex
type "FieldSearchRes ult". The error message as following :
"Cannot assign object of type System.String to an object of type
System.String[]. There is an error in XML document (23, 97)."
By the way,I hava written a client in Java and everything is working.
I don’t know how to resolve the problem, can anyone help me?
Thanks!
WSDL,auto-generated proxy class and Web Services Response Message are as
following:
(1) The corresponding WSDL as following:
///////////////////////////////////////////////////////////////////////////////
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitio ns ......>
<import namespace="http ://schemas.xmlsoap .org/soap/encoding/"/>
<simpleType name="passByRef ">
<restriction base="xsd:strin g">
<enumeration value="URL_REF"/>
</restriction>
</simpleType>
<simpleType name="passByVal ue">
<restriction base="xsd:strin g">
<enumeration value="VALUE"/>
</restriction>
</simpleType>
<simpleType name="Compariso nOperator">
<restriction base="xsd:strin g">
<enumeration value="has"/>
<enumeration value="eq"/>
<enumeration value="lt"/>
<enumeration value="le"/>
<enumeration value="gt"/>
<enumeration value="ge"/>
</restriction>
</simpleType>
<complexType name="Condition ">
<sequence>
<element name="property" nillable="true" type="xsd:strin g"/>
<element name="operator" nillable="true" type="tns1:Comp arisonOperator"/>
<element name="value" nillable="true" type="xsd:strin g"/>
</sequence>
</complexType>
<complexType name="Datastrea mDef">
<sequence>
<element name="ID" nillable="true" type="xsd:strin g"/>
<element name="label" nillable="true" type="xsd:strin g"/>
<element name="MIMEType" nillable="true" type="xsd:strin g"/>
</sequence>
</complexType>
<complexType name="ListSessi on">
<sequence>
<element name="token" nillable="true" type="xsd:strin g"/>
<element maxOccurs="1" minOccurs="0" name="cursor" nillable="true"
type="xsd:nonNe gativeInteger"/>
<element maxOccurs="1" minOccurs="0" name="completeL istSize"
nillable="true" type="xsd:nonNe gativeInteger"/>
<element maxOccurs="1" minOccurs="0" name="expiratio nDate"
nillable="true" type="xsd:strin g"/>
</sequence>
</complexType>
<complexType name="ObjectFie lds">
<sequence>
<element maxOccurs="1" minOccurs="0" name="pid" nillable="true"
type="xsd:strin g"/>
<element maxOccurs="1" minOccurs="0" name="label" nillable="true"
type="xsd:strin g"/>
<element maxOccurs="1" minOccurs="0" name="fType" nillable="true"
type="xsd:strin g"/>
<element maxOccurs="1" minOccurs="0" name="cModel" nillable="true"
type="xsd:strin g"/>
<element maxOccurs="1" minOccurs="0" name="state" nillable="true"
type="xsd:strin g"/>
<element maxOccurs="1" minOccurs="0" name="ownerId" nillable="true"
type="xsd:strin g"/>
<element maxOccurs="1" minOccurs="0" name="cDate" nillable="true"
type="xsd:strin g"/>
<element maxOccurs="1" minOccurs="0" name="mDate" nillable="true"
type="xsd:strin g"/>
<element maxOccurs="1" minOccurs="0" name="dcmDate" nillable="true"
type="xsd:strin g"/>
<element maxOccurs="unbo unded" minOccurs="0" name="bDef" nillable="true"
type="xsd:strin g"/>
<element maxOccurs="unbo unded" minOccurs="0" name="bMech" nillable="true"
type="xsd:strin g"/>
<element maxOccurs="unbo unded" minOccurs="0" name="title" nillable="true"
type="xsd:strin g"/>
<element maxOccurs="unbo unded" minOccurs="0" name="creator"
nillable="true" type="xsd:strin g"/>
<element maxOccurs="unbo unded" minOccurs="0" name="subject"
nillable="true" type="xsd:strin g"/>
<element maxOccurs="unbo unded" minOccurs="0" name="descripti on"
nillable="true" type="xsd:strin g"/>
<element maxOccurs="unbo unded" minOccurs="0" name="publisher "
nillable="true" type="xsd:strin g"/>
<element maxOccurs="unbo unded" minOccurs="0" name="contribut or"
nillable="true" type="xsd:strin g"/>
<element maxOccurs="unbo unded" minOccurs="0" name="date" nillable="true"
type="xsd:strin g"/>
<element maxOccurs="unbo unded" minOccurs="0" name="type" nillable="true"
type="xsd:strin g"/>
<element maxOccurs="unbo unded" minOccurs="0" name="format"
nillable="true" type="xsd:strin g"/>
<element maxOccurs="unbo unded" minOccurs="0" name="identifie r"
nillable="true" type="xsd:strin g"/>
<element maxOccurs="unbo unded" minOccurs="0" name="source"
nillable="true" type="xsd:strin g"/>
<element maxOccurs="unbo unded" minOccurs="0" name="language"
nillable="true" type="xsd:strin g"/>
<element maxOccurs="unbo unded" minOccurs="0" name="relation"
nillable="true" type="xsd:strin g"/>
<element maxOccurs="unbo unded" minOccurs="0" name="coverage"
nillable="true" type="xsd:strin g"/>
<element maxOccurs="unbo unded" minOccurs="0" name="rights"
nillable="true" type="xsd:strin g"/>
</sequence>
</complexType>
<complexType name="ArrayOfOb jectFields">
<complexContent >
<restriction base="soapenc:A rray">
<attribute ref="soapenc:ar rayType" wsdl:arrayType= "tns1:ObjectFie lds[]"/>
</restriction>
</complexContent>
</complexType>
<complexType name="FieldSear chResult">
<sequence>
<element maxOccurs="1" minOccurs="0" name="listSessi on" nillable="true"
type="tns1:List Session"/>
<element name="resultLis t" nillable="true"
type="tns1:Arra yOfObjectFields "/>
</sequence>
</complexType>
<simpleType name="defaultIn putType">
<restriction base="xsd:strin g">
<enumeration value="fedora:d efaultInputType "/>
</restriction>
</simpleType>
<simpleType name="userInput Type">
<restriction base="xsd:strin g">
<enumeration value="fedora:u serInputType"/>
</restriction>
</simpleType>
<complexType name="ArrayOfCo ndition">
<complexContent >
<restriction base="soapenc:A rray">
<attribute ref="soapenc:ar rayType" wsdl:arrayType= "tns1:Condi tion[]"/>
</restriction>
</complexContent>
</complexType>
<complexType name="FieldSear chQuery">
<sequence>
<element name="condition s" nillable="true" type="tns1:Arra yOfCondition"/>
<element name="terms" nillable="true" type="xsd:strin g"/>
</sequence>
</complexType>
<complexType name="ObjectPro file">
<sequence>
<element name="pid" nillable="true" type="xsd:strin g"/>
<element name="objLabel" nillable="true" type="xsd:strin g"/>
<element name="objConten tModel" nillable="true" type="xsd:strin g"/>
<element name="objType" nillable="true" type="xsd:strin g"/>
<element name="objCreate Date" nillable="true" type="xsd:strin g"/>
<element name="objLastMo dDate" nillable="true" type="xsd:strin g"/>
<element name="objDissIn dexViewURL" nillable="true" type="xsd:strin g"/>
<element name="objItemIn dexViewURL" nillable="true" type="xsd:strin g"/>
</sequence>
</complexType>
<complexType name="ArrayOfSt ring">
<complexContent >
<restriction base="soapenc:A rray">
<attribute ref="soapenc:ar rayType" wsdl:arrayType= "xsd:string[]"/>
</restriction>
</complexContent>
</complexType>
<simpleType name="datastrea mInputType">
<restriction base="xsd:strin g">
<enumeration value="fedora:d atastreamInputT ype"/>
</restriction>
</simpleType>
<complexType name="MethodPar mDef">
<sequence>
<element name="parmName" nillable="true" type="xsd:strin g"/>
<element name="parmType" nillable="true" type="xsd:strin g"/>
<element name="parmDefau ltValue" nillable="true" type="xsd:strin g"/>
<element name="parmDomai nValues" nillable="true"
type="tns1:Arra yOfString"/>
<element name="parmRequi red" type="xsd:boole an"/>
<element name="parmLabel " nillable="true" type="xsd:strin g"/>
<element name="parmPassB y" nillable="true" type="xsd:strin g"/>
<element name="PASS_BY_R EF" nillable="true" type="tns1:pass ByRef"/>
<element name="PASS_BY_V ALUE" nillable="true" type="tns1:pass ByValue"/>
<element name="DATASTREA M_INPUT" nillable="true"
type="tns1:data streamInputType "/>
<element name="USER_INPU T" nillable="true" type="tns1:user InputType"/>
<element name="DEFAULT_I NPUT" nillable="true"
type="tns1:defa ultInputType"/>
</sequence>
</complexType>
<complexType name="ArrayOfMe thodParmDef">
<complexContent >
<restriction base="soapenc:A rray">
<attribute ref="soapenc:ar rayType" wsdl:arrayType= "tns1:MethodPar mDef[]"/>
</restriction>
</complexContent>
</complexType>
<complexType name="ObjectMet hodsDef">
<sequence>
<element name="PID" nillable="true" type="xsd:strin g"/>
<element name="bDefPID" nillable="true" type="xsd:strin g"/>
<element name="methodNam e" nillable="true" type="xsd:strin g"/>
<element name="methodPar mDefs" nillable="true"
type="tns1:Arra yOfMethodParmDe f"/>
<element name="asOfDate" nillable="true" type="xsd:strin g"/>
</sequence>
</complexType>
<complexType name="Property" >
<sequence>
<element name="name" nillable="true" type="xsd:strin g"/>
<element name="value" nillable="true" type="xsd:strin g"/>
</sequence>
</complexType>
<complexType name="ArrayOfPr operty">
<complexContent >
<restriction base="soapenc:A rray">
<attribute ref="soapenc:ar rayType" wsdl:arrayType= "tns1:Prope rty[]"/>
</restriction>
</complexContent>
</complexType>
<complexType name="MIMETyped Stream">
<sequence>
<element name="MIMEType" nillable="true" type="xsd:strin g"/>
<element name="stream" type="xsd:base6 4Binary"/>
<element name="header" nillable="true" type="tns1:Arra yOfProperty"/>
</sequence>
</complexType>
<complexType name="Repositor yInfo">
<sequence>
<element name="repositor yName" nillable="true" type="xsd:strin g"/>
<element name="repositor yVersion" nillable="true" type="xsd:strin g"/>
<element name="repositor yBaseURL" nillable="true" type="xsd:strin g"/>
<element name="repositor yPIDNamespace" nillable="true" type="xsd:strin g"/>
<element name="defaultEx portFormat" nillable="true" type="xsd:strin g"/>
<element name="OAINamesp ace" nillable="true" type="xsd:strin g"/>
<element name="adminEmai lList" nillable="true" type="tns1:Arra yOfString"/>
<element name="samplePID " nillable="true" type="xsd:strin g"/>
<element name="sampleOAI Identifier" nillable="true" type="xsd:strin g"/>
<element name="sampleSea rchURL" nillable="true" type="xsd:strin g"/>
<element name="sampleAcc essURL" nillable="true" type="xsd:strin g"/>
<element name="sampleOAI URL" nillable="true" type="xsd:strin g"/>
<element name="retainPID s" nillable="true" type="tns1:Arra yOfString"/>
</sequence>
</complexType>
<complexType name="ArrayOfOb jectMethodsDef" >
<complexContent >
<restriction base="soapenc:A rray">
<attribute ref="soapenc:ar rayType"
wsdl:arrayType= "tns1:ObjectMet hodsDef[]"/>
</restriction>
</complexContent>
</complexType>
<complexType name="ArrayOfDa tastreamDef">
<complexContent >
<restriction base="soapenc:A rray">
<attribute ref="soapenc:ar rayType" wsdl:arrayType= "tns:Datastream Def[]"/>
</restriction>
</complexContent>
</complexType>
</Schema>
</wsdl:types>
<wsdl:message name="getDatast reamDisseminati onResponse">
<wsdl:part name="response" type="tns1:MIME TypedStream"/>
</wsdl:message>
<wsdl:message name="findObjec tsRequest">
<wsdl:part name="resultFie lds" type="tns1:Arra yOfString"/>
<wsdl:part name="maxResult s" type="xsd:nonNe gativeInteger"/>
<wsdl:part name="query" type="tns1:Fiel dSearchQuery"/>
</wsdl:message>
<wsdl:message name="getObject ProfileResponse ">
<wsdl:part name="response" type="tns1:Obje ctProfile"/>
</wsdl:message>
<wsdl:message name="listDatas treamsResponse" >
<wsdl:part name="response" type="tns1:Arra yOfDatastreamDe f"/>
</wsdl:message>
<wsdl:message name="getObject HistoryResponse ">
<wsdl:part name="response" type="tns1:Arra yOfString"/>
</wsdl:message>
<wsdl:message name="resumeFin dObjectsRespons e">
<wsdl:part name="response" type="tns1:Fiel dSearchResult"/>
</wsdl:message>
<wsdl:message name="listDatas treamsRequest">
<wsdl:part name="pid" type="xsd:strin g"/>
<wsdl:part name="asOfDateT ime" type="xsd:strin g"/>
</wsdl:message>
<wsdl:message name="getObject HistoryRequest" >
<wsdl:part name="pid" type="xsd:strin g"/>
</wsdl:message>
<wsdl:message name="getDissem inationResponse ">
<wsdl:part name="response" type="tns1:MIME TypedStream"/>
</wsdl:message>
<wsdl:message name="describeR epositoryRespon se">
<wsdl:part name="response" type="tns1:Repo sitoryInfo"/>
</wsdl:message>
<wsdl:message name="listMetho dsRequest">
<wsdl:part name="pid" type="xsd:strin g"/>
<wsdl:part name="asOfDateT ime" type="xsd:strin g"/>
</wsdl:message>
<wsdl:message name="getDatast reamDisseminati onRequest">
<wsdl:part name="pid" type="xsd:strin g"/>
<wsdl:part name="dsID" type="xsd:strin g"/>
<wsdl:part name="asOfDateT ime" type="xsd:strin g"/>
</wsdl:message>
<wsdl:message name="resumeFin dObjectsRequest ">
<wsdl:part name="sessionTo ken" type="xsd:strin g"/>
</wsdl:message>
<wsdl:message name="listMetho dsResponse">
<wsdl:part name="response" type="tns1:Arra yOfObjectMethod sDef"/>
</wsdl:message>
<wsdl:message name="describeR epositoryReques t">
</wsdl:message>
<wsdl:message name="getDissem inationRequest" >
<wsdl:part name="pid" type="xsd:strin g"/>
<wsdl:part name="bDefPid" type="xsd:strin g"/>
<wsdl:part name="methodNam e" type="xsd:strin g"/>
<wsdl:part name="parameter s" type="tns1:Arra yOfProperty"/>
<wsdl:part name="asOfDateT ime" type="xsd:strin g"/>
</wsdl:message>
<wsdl:message name="findObjec tsResponse">
<wsdl:part name="response" type="tns1:Fiel dSearchResult"/>
</wsdl:message>
<wsdl:message name="getObject ProfileRequest" >
<wsdl:part name="pid" type="xsd:strin g"/>
<wsdl:part name="asOfDateT ime" type="xsd:strin g"/>
</wsdl:message>
<wsdl:portTyp e name="Fedora-API-A">
<wsdl:operati on name="describeR epository">
<wsdl:input message="impl:d escribeReposito ryRequest"
name="describeR epositoryReques t"/>
<wsdl:output message="impl:d escribeReposito ryResponse"
name="describeR epositoryRespon se"/>
</wsdl:operation>
<wsdl:operati on name="getObject Profile" parameterOrder= "pid asOfDateTime">
<wsdl:input message="impl:g etObjectProfile Request"
name="getObject ProfileRequest"/>
<wsdl:output message="impl:g etObjectProfile Response"
name="getObject ProfileResponse "/>
</wsdl:operation>
<wsdl:operati on name="listMetho ds" parameterOrder= "pid asOfDateTime">
<wsdl:input message="impl:l istMethodsReque st"
name="listMetho dsRequest"/>
<wsdl:output message="impl:l istMethodsRespo nse"
name="listMetho dsResponse"/>
</wsdl:operation>
<wsdl:operati on name="listDatas treams" parameterOrder= "pid asOfDateTime">
<wsdl:input message="impl:l istDatastreamsR equest"
name="listDatas treamsRequest"/>
<wsdl:output message="impl:l istDatastreamsR esponse"
name="listDatas treamsResponse"/>
</wsdl:operation>
<wsdl:operati on name="getDatast reamDisseminati on" parameterOrder= "pid
dsID asOfDateTime">
<wsdl:input message="impl:g etDatastreamDis seminationReque st"
name="getDatast reamDisseminati onRequest"/>
<wsdl:output message="impl:g etDatastreamDis seminationRespo nse"
name="getDatast reamDisseminati onResponse"/>
</wsdl:operation>
<wsdl:operati on name="getDissem ination" parameterOrder= "pid bDefPid
methodName parameters asOfDateTime">
<wsdl:input message="impl:g etDissemination Request"
name="getDissem inationRequest"/>
<wsdl:output message="impl:g etDissemination Response"
name="getDissem inationResponse "/>
</wsdl:operation>
<wsdl:operati on name="findObjec ts" parameterOrder= "resultFiel ds
maxResults query">
<wsdl:input message="impl:f indObjectsReque st"
name="findObjec tsRequest"/>
<wsdl:output message="impl:f indObjectsRespo nse"
name="findObjec tsResponse"/>
</wsdl:operation>
<wsdl:operati on name="resumeFin dObjects" parameterOrder= "sessionTok en">
<wsdl:input message="impl:r esumeFindObject sRequest"
name="resumeFin dObjectsRequest "/>
<wsdl:output message="impl:r esumeFindObject sResponse"
name="resumeFin dObjectsRespons e"/>
</wsdl:operation>
<wsdl:operati on name="getObject History" parameterOrder= "pid">
<wsdl:input message="impl:g etObjectHistory Request"
name="getObject HistoryRequest"/>
<wsdl:output message="impl:g etObjectHistory Response"
name="getObject HistoryResponse "/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="access/soapSoapBinding " type="impl:Fedo ra-API-A">
<wsdlsoap:bindi ng style="rpc"
transport="http ://schemas.xmlsoap .org/soap/http"/>
<wsdl:operati on name="describeR epository">
<wsdlsoap:opera tion
soapAction="htt p://www.fedora.info/definitions/1/0/api/#describeReposi tory"/>
<wsdl:input name="describeR epositoryReques t">
<wsdlsoap:bod y
encodingStyle=" http://schemas.xmlsoap .org/soap/encoding/"
namespace="http ://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="describeR epositoryRespon se">
<wsdlsoap:bod y
encodingStyle=" http://schemas.xmlsoap .org/soap/encoding/"
namespace="http ://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operati on name="getObject Profile">
<wsdlsoap:opera tion
soapAction="htt p://www.fedora.info/definitions/1/0/api/#getObjectProfi le"/>
<wsdl:input name="getObject ProfileRequest" >
<wsdlsoap:bod y
encodingStyle=" http://schemas.xmlsoap .org/soap/encoding/"
namespace="http ://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="getObject ProfileResponse ">
<wsdlsoap:bod y
encodingStyle=" http://schemas.xmlsoap .org/soap/encoding/"
namespace="http ://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operati on name="listMetho ds">
<wsdlsoap:opera tion
soapAction="htt p://www.fedora.info/definitions/1/0/api/#listMethods"/>
<wsdl:input name="listMetho dsRequest">
<wsdlsoap:bod y
encodingStyle=" http://schemas.xmlsoap .org/soap/encoding/"
namespace="http ://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="listMetho dsResponse">
<wsdlsoap:bod y
encodingStyle=" http://schemas.xmlsoap .org/soap/encoding/"
namespace="http ://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operati on name="listDatas treams">
<wsdlsoap:opera tion
soapAction="htt p://www.fedora.info/definitions/1/0/api/#listDatastream s"/>
<wsdl:input name="listDatas treamsRequest">
<wsdlsoap:bod y
encodingStyle=" http://schemas.xmlsoap .org/soap/encoding/"
namespace="http ://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="listDatas treamsResponse" >
<wsdlsoap:bod y
encodingStyle=" http://schemas.xmlsoap .org/soap/encoding/"
namespace="http ://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operati on name="getDatast reamDisseminati on">
<wsdlsoap:opera tion
soapAction="htt p://www.fedora.info/definitions/1/0/api/#getDatastreamD issemination"/>
<wsdl:input name="getDatast reamDisseminati onRequest">
<wsdlsoap:bod y
encodingStyle=" http://schemas.xmlsoap .org/soap/encoding/"
namespace="http ://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="getDatast reamDisseminati onResponse">
<wsdlsoap:bod y
encodingStyle=" http://schemas.xmlsoap .org/soap/encoding/"
namespace="http ://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operati on name="getDissem ination">
<wsdlsoap:opera tion
soapAction="htt p://www.fedora.info/definitions/1/0/api/#getDisseminati on"/>
<wsdl:input name="getDissem inationRequest" >
<wsdlsoap:bod y
encodingStyle=" http://schemas.xmlsoap .org/soap/encoding/"
namespace="http ://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="getDissem inationResponse ">
<wsdlsoap:bod y
encodingStyle=" http://schemas.xmlsoap .org/soap/encoding/"
namespace="http ://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operati on name="findObjec ts">
<wsdlsoap:opera tion
soapAction="htt p://www.fedora.info/definitions/1/0/api/#findObjects"/>
<wsdl:input name="findObjec tsRequest">
<wsdlsoap:bod y
encodingStyle=" http://schemas.xmlsoap .org/soap/encoding/"
namespace="http ://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="findObjec tsResponse">
<wsdlsoap:bod y
encodingStyle=" http://schemas.xmlsoap .org/soap/encoding/"
namespace="http ://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operati on name="resumeFin dObjects">
<wsdlsoap:opera tion
soapAction="htt p://www.fedora.info/definitions/1/0/api/#resumeFindObje cts"/>
<wsdl:input name="resumeFin dObjectsRequest ">
<wsdlsoap:bod y
encodingStyle=" http://schemas.xmlsoap .org/soap/encoding/"
namespace="http ://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="resumeFin dObjectsRespons e">
<wsdlsoap:bod y
encodingStyle=" http://schemas.xmlsoap .org/soap/encoding/"
namespace="http ://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operati on name="getObject History">
<wsdlsoap:opera tion
soapAction="htt p://www.fedora.info/definitions/1/0/api/#getObjectHisto ry"/>
<wsdl:input name="getObject HistoryRequest" >
<wsdlsoap:bod y
encodingStyle=" http://schemas.xmlsoap .org/soap/encoding/"
namespace="http ://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="getObject HistoryResponse ">
<wsdlsoap:bod y
encodingStyle=" http://schemas.xmlsoap .org/soap/encoding/"
namespace="http ://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="Fedora-API-A-Service">
<wsdl:port binding="impl:a ccess/soapSoapBinding " name="access/soap">
<wsdlsoap:addre ss location="http://localhost:8080/fedora/access/soap"/>
</wsdl:port>
</wsdl:service>
</wsdl:definition s>
(2) And the corresponding classes generated by wsdl.exe in C# are as
following:
///////////////////////////////////////////////////////////////////////////////
namespace FedoraDAL.Fedor aAPIA {
using System.Diagnost ics;
using System.Xml.Seri alization;
using System;
using System.Web.Serv ices.Protocols;
using System.Componen tModel;
using System.Web.Serv ices;
using System.Collecti ons;
/// <remarks/>
[System.Diagnost ics.DebuggerSte pThroughAttribu te()]
[System.Componen tModel.Designer CategoryAttribu te("code")]
[System.Web.Serv ices.WebService BindingAttribut e(Name="access/soapSoapBinding ", Namespace="http ://www.fedora.info/definitions/1/0/api/")]
[System.Xml.Seri alization.SoapI ncludeAttribute (typeof(ObjectF ields))]
[System.Xml.Seri alization.SoapI ncludeAttribute (typeof(Conditi on))]
[System.Xml.Seri alization.SoapI ncludeAttribute (typeof(Propert y))]
[System.Xml.Seri alization.SoapI ncludeAttribute (typeof(Datastr eamDef))]
[System.Xml.Seri alization.SoapI ncludeAttribute (typeof(MethodP armDef))]
[System.Xml.Seri alization.SoapI ncludeAttribute (typeof(ObjectM ethodsDef))]
public class FedoraAPIAServi ce :
System.Web.Serv ices.Protocols. SoapHttpClientP rotocol {
/// <remarks/>
public FedoraAPIAServi ce() {
this.Url = "http://localhost:8080/fedora/access/soap";
}
……
/// <remarks/>
[System.Web.Serv ices.Protocols. SoapRpcMethodtt ribute("http://www.fedora.info/definitions/1/0/api/#findObjects",
RequestNamespac e="http://www.fedora.info/definitions/1/0/api/",
ResponseNamespa ce="http://www.fedora.info/definitions/1/0/api/")]°
[return: System.Xml.Seri alization.SoapE lementAttribute ("response")]
public FieldSearchResu lt findObjects(str ing[] resultFields,
[System.Xml.Seri alization.SoapE lementAttribute (DataType="nonN egativeInteger" )] string maxResults, FieldSearchQuer y query) {
object[] results = this.Invoke("fi ndObjects", new object[] {
resultFields,
maxResults,
query});
return ((FieldSearchRe sult)(results[0]));
}
……
}
/// <remarks/>
[System.Xml.Seri alization.SoapT ypeAttribute("O bjectFields",
"http://www.fedora.info/definitions/1/0/types/")]
public class ObjectFields {
/// <remarks/>
public string pid;
/// <remarks/>
public string label;
/// <remarks/>
public string fType;
/// <remarks/>
public string cModel;
/// <remarks/>
public string state;
/// <remarks/>
public string ownerId;
/// <remarks/>
public string cDate;
/// <remarks/>
public string mDate;
/// <remarks/>
public string dcmDate;
/// <remarks/>
public string[] bDef;
/// <remarks/>
public string[] bMech;
/// <remarks/>
public string[] title;
/// <remarks/>
public string[] creator;
/// <remarks/>
public string[] subject;
/// <remarks/>
public string[] description;
/// <remarks/>
public string[] publisher;
/// <remarks/>
public string[] contributor;
/// <remarks/>
public string[] date;
/// <remarks/>
public string[] type;
/// <remarks/>
public string[] format;
/// <remarks/>
public string[] identifier;
/// <remarks/>
public string[] source;
/// <remarks/>
public string[] language;
/// <remarks/>
public string[] relation;
/// <remarks/>
public string[] coverage;
/// <remarks/>
public string[] rights;
}
/// <remarks/>
[System.Xml.Seri alization.SoapT ypeAttribute("L istSession",
"http://www.fedora.info/definitions/1/0/types/")]
public class ListSession {
/// <remarks/>
public string token;
/// <remarks/>
[System.Xml.Seri alization.SoapE lementAttribute (DataType="nonN egativeInteger" )]
public string cursor;
/// <remarks/>
[System.Xml.Seri alization.SoapE lementAttribute (DataType="nonN egativeInteger" )]
public string completeListSiz e;
/// <remarks/>
public string expirationDate;
}
/// <remarks/>
[System.Xml.Seri alization.SoapT ypeAttribute("F ieldSearchResul t",
"http://www.fedora.info/definitions/1/0/types/")]
public class FieldSearchResu lt {
/// <remarks/>
public ListSession listSession;
/// <remarks/>
public ObjectFields[] resultList;
}
}
(3) And I have trapped the response message from the XML Web Services as
following:
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
<?xml version="1.0" encoding="UTF-8"?>.
<soapenv:Envelo pe 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">.
<soapenv:Body >.
<ns1:findObject sResponse
soapenv:encodin gStyle="http://schemas.xmlsoap .org/soap/encoding/"
xmlns:ns1="http ://www.fedora.info/definitions/1/0/api/">.
<response href="#id0"/>.
</ns1:findObjects Response>.
<multiRef id="id0" soapenc:root="0 "
soapenv:encodin gStyle="http://schemas.xmlsoap .org/soap/encoding/"
xsi:type="ns2:F ieldSearchResul t"
xmlns:soapenc=" http://schemas.xmlsoap .org/soap/encoding/"
xmlns:ns2="http ://www.fedora.info/definitions/1/0/types/">.
<listSession xsi:type="ns2:L istSession" xsi:nil="true"/>.
<resultList xsi:type="soape nc:Array" soapenc:array
Type="ns2:Objec tFields[1]">.
<item href="#id1"/>.
</resultList>.
</multiRef>.
<multiRef id="id1" soapenc:root="0 "
soapenv:encodin gStyle="http://schemas.xmlsoap .org/soap/encoding/"
xsi:type="ns3:O bjectFields"
xmlns:ns3="http ://www.fedora.info/definitions/1/0/types/"
xmlns:soapenc=" http://schemas.xmlsoap .org/soap/encoding/">.
<pid xsi:type="xsd:s tring">demo:1</pid>.
<label xsi:type="xsd:s tring" xsi:nil="true"/>.
<fType xsi:type="xsd:s tring" xsi:nil="true"/>.
<cModel xsi:type="xsd:s tring" xsi:nil="true"/>.
<state xsi:type="xsd:s tring" xsi:nil="true"/>.
<ownerId xsi:type="xsd:s tring" xsi:nil="true"/>.
<cDate xsi:type="xsd:s tring">2004-12-10T00:21:52.000 Z</cDate>.
<mDate xsi:type="xsd:s tring" xsi:nil="true"/>.
<dcmDate xsi:type="xsd:s tring" xsi:nil="true"/>.
<title xsi:type="xsd:s tring">Behavior Definition Object for UVA Simple
Image Contract</title>.
</multiRef>.
</soapenv:Body>.
</soapenv:Envelop e>.
Comment