472,804 Members | 735 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,804 software developers and data experts.

Problem of calling WebService in Java.

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 "findObjects" and return a complex
type "FieldSearchResult". 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:definitions ......>
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<simpleType name="passByRef">
<restriction base="xsd:string">
<enumeration value="URL_REF"/>
</restriction>
</simpleType>
<simpleType name="passByValue">
<restriction base="xsd:string">
<enumeration value="VALUE"/>
</restriction>
</simpleType>
<simpleType name="ComparisonOperator">
<restriction base="xsd:string">
<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:string"/>
<element name="operator" nillable="true" type="tns1:ComparisonOperator"/>
<element name="value" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="DatastreamDef">
<sequence>
<element name="ID" nillable="true" type="xsd:string"/>
<element name="label" nillable="true" type="xsd:string"/>
<element name="MIMEType" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="ListSession">
<sequence>
<element name="token" nillable="true" type="xsd:string"/>
<element maxOccurs="1" minOccurs="0" name="cursor" nillable="true"
type="xsd:nonNegativeInteger"/>
<element maxOccurs="1" minOccurs="0" name="completeListSize"
nillable="true" type="xsd:nonNegativeInteger"/>
<element maxOccurs="1" minOccurs="0" name="expirationDate"
nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="ObjectFields">
<sequence>
<element maxOccurs="1" minOccurs="0" name="pid" nillable="true"
type="xsd:string"/>
<element maxOccurs="1" minOccurs="0" name="label" nillable="true"
type="xsd:string"/>
<element maxOccurs="1" minOccurs="0" name="fType" nillable="true"
type="xsd:string"/>
<element maxOccurs="1" minOccurs="0" name="cModel" nillable="true"
type="xsd:string"/>
<element maxOccurs="1" minOccurs="0" name="state" nillable="true"
type="xsd:string"/>
<element maxOccurs="1" minOccurs="0" name="ownerId" nillable="true"
type="xsd:string"/>
<element maxOccurs="1" minOccurs="0" name="cDate" nillable="true"
type="xsd:string"/>
<element maxOccurs="1" minOccurs="0" name="mDate" nillable="true"
type="xsd:string"/>
<element maxOccurs="1" minOccurs="0" name="dcmDate" nillable="true"
type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="bDef" nillable="true"
type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="bMech" nillable="true"
type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="title" nillable="true"
type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="creator"
nillable="true" type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="subject"
nillable="true" type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="description"
nillable="true" type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="publisher"
nillable="true" type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="contributor"
nillable="true" type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="date" nillable="true"
type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="type" nillable="true"
type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="format"
nillable="true" type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="identifier"
nillable="true" type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="source"
nillable="true" type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="language"
nillable="true" type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="relation"
nillable="true" type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="coverage"
nillable="true" type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="rights"
nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="ArrayOfObjectFields">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="tns1:ObjectFields[]"/>
</restriction>
</complexContent>
</complexType>
<complexType name="FieldSearchResult">
<sequence>
<element maxOccurs="1" minOccurs="0" name="listSession" nillable="true"
type="tns1:ListSession"/>
<element name="resultList" nillable="true"
type="tns1:ArrayOfObjectFields"/>
</sequence>
</complexType>
<simpleType name="defaultInputType">
<restriction base="xsd:string">
<enumeration value="fedora:defaultInputType"/>
</restriction>
</simpleType>
<simpleType name="userInputType">
<restriction base="xsd:string">
<enumeration value="fedora:userInputType"/>
</restriction>
</simpleType>
<complexType name="ArrayOfCondition">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="tns1:Condition[]"/>
</restriction>
</complexContent>
</complexType>
<complexType name="FieldSearchQuery">
<sequence>
<element name="conditions" nillable="true" type="tns1:ArrayOfCondition"/>
<element name="terms" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="ObjectProfile">
<sequence>
<element name="pid" nillable="true" type="xsd:string"/>
<element name="objLabel" nillable="true" type="xsd:string"/>
<element name="objContentModel" nillable="true" type="xsd:string"/>
<element name="objType" nillable="true" type="xsd:string"/>
<element name="objCreateDate" nillable="true" type="xsd:string"/>
<element name="objLastModDate" nillable="true" type="xsd:string"/>
<element name="objDissIndexViewURL" nillable="true" type="xsd:string"/>
<element name="objItemIndexViewURL" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="ArrayOfString">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
</restriction>
</complexContent>
</complexType>
<simpleType name="datastreamInputType">
<restriction base="xsd:string">
<enumeration value="fedora:datastreamInputType"/>
</restriction>
</simpleType>
<complexType name="MethodParmDef">
<sequence>
<element name="parmName" nillable="true" type="xsd:string"/>
<element name="parmType" nillable="true" type="xsd:string"/>
<element name="parmDefaultValue" nillable="true" type="xsd:string"/>
<element name="parmDomainValues" nillable="true"
type="tns1:ArrayOfString"/>
<element name="parmRequired" type="xsd:boolean"/>
<element name="parmLabel" nillable="true" type="xsd:string"/>
<element name="parmPassBy" nillable="true" type="xsd:string"/>
<element name="PASS_BY_REF" nillable="true" type="tns1:passByRef"/>
<element name="PASS_BY_VALUE" nillable="true" type="tns1:passByValue"/>
<element name="DATASTREAM_INPUT" nillable="true"
type="tns1:datastreamInputType"/>
<element name="USER_INPUT" nillable="true" type="tns1:userInputType"/>
<element name="DEFAULT_INPUT" nillable="true"
type="tns1:defaultInputType"/>
</sequence>
</complexType>
<complexType name="ArrayOfMethodParmDef">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="tns1:MethodParmDef[]"/>
</restriction>
</complexContent>
</complexType>
<complexType name="ObjectMethodsDef">
<sequence>
<element name="PID" nillable="true" type="xsd:string"/>
<element name="bDefPID" nillable="true" type="xsd:string"/>
<element name="methodName" nillable="true" type="xsd:string"/>
<element name="methodParmDefs" nillable="true"
type="tns1:ArrayOfMethodParmDef"/>
<element name="asOfDate" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="Property">
<sequence>
<element name="name" nillable="true" type="xsd:string"/>
<element name="value" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="ArrayOfProperty">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="tns1:Property[]"/>
</restriction>
</complexContent>
</complexType>
<complexType name="MIMETypedStream">
<sequence>
<element name="MIMEType" nillable="true" type="xsd:string"/>
<element name="stream" type="xsd:base64Binary"/>
<element name="header" nillable="true" type="tns1:ArrayOfProperty"/>
</sequence>
</complexType>
<complexType name="RepositoryInfo">
<sequence>
<element name="repositoryName" nillable="true" type="xsd:string"/>
<element name="repositoryVersion" nillable="true" type="xsd:string"/>
<element name="repositoryBaseURL" nillable="true" type="xsd:string"/>
<element name="repositoryPIDNamespace" nillable="true" type="xsd:string"/>
<element name="defaultExportFormat" nillable="true" type="xsd:string"/>
<element name="OAINamespace" nillable="true" type="xsd:string"/>
<element name="adminEmailList" nillable="true" type="tns1:ArrayOfString"/>
<element name="samplePID" nillable="true" type="xsd:string"/>
<element name="sampleOAIIdentifier" nillable="true" type="xsd:string"/>
<element name="sampleSearchURL" nillable="true" type="xsd:string"/>
<element name="sampleAccessURL" nillable="true" type="xsd:string"/>
<element name="sampleOAIURL" nillable="true" type="xsd:string"/>
<element name="retainPIDs" nillable="true" type="tns1:ArrayOfString"/>
</sequence>
</complexType>
<complexType name="ArrayOfObjectMethodsDef">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType"
wsdl:arrayType="tns1:ObjectMethodsDef[]"/>
</restriction>
</complexContent>
</complexType>
<complexType name="ArrayOfDatastreamDef">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="tns:DatastreamDef[]"/>
</restriction>
</complexContent>
</complexType>
</Schema>
</wsdl:types>
<wsdl:message name="getDatastreamDisseminationResponse">
<wsdl:part name="response" type="tns1:MIMETypedStream"/>
</wsdl:message>
<wsdl:message name="findObjectsRequest">
<wsdl:part name="resultFields" type="tns1:ArrayOfString"/>
<wsdl:part name="maxResults" type="xsd:nonNegativeInteger"/>
<wsdl:part name="query" type="tns1:FieldSearchQuery"/>
</wsdl:message>
<wsdl:message name="getObjectProfileResponse">
<wsdl:part name="response" type="tns1:ObjectProfile"/>
</wsdl:message>
<wsdl:message name="listDatastreamsResponse">
<wsdl:part name="response" type="tns1:ArrayOfDatastreamDef"/>
</wsdl:message>
<wsdl:message name="getObjectHistoryResponse">
<wsdl:part name="response" type="tns1:ArrayOfString"/>
</wsdl:message>
<wsdl:message name="resumeFindObjectsResponse">
<wsdl:part name="response" type="tns1:FieldSearchResult"/>
</wsdl:message>
<wsdl:message name="listDatastreamsRequest">
<wsdl:part name="pid" type="xsd:string"/>
<wsdl:part name="asOfDateTime" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="getObjectHistoryRequest">
<wsdl:part name="pid" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="getDisseminationResponse">
<wsdl:part name="response" type="tns1:MIMETypedStream"/>
</wsdl:message>
<wsdl:message name="describeRepositoryResponse">
<wsdl:part name="response" type="tns1:RepositoryInfo"/>
</wsdl:message>
<wsdl:message name="listMethodsRequest">
<wsdl:part name="pid" type="xsd:string"/>
<wsdl:part name="asOfDateTime" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="getDatastreamDisseminationRequest">
<wsdl:part name="pid" type="xsd:string"/>
<wsdl:part name="dsID" type="xsd:string"/>
<wsdl:part name="asOfDateTime" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="resumeFindObjectsRequest">
<wsdl:part name="sessionToken" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="listMethodsResponse">
<wsdl:part name="response" type="tns1:ArrayOfObjectMethodsDef"/>
</wsdl:message>
<wsdl:message name="describeRepositoryRequest">
</wsdl:message>
<wsdl:message name="getDisseminationRequest">
<wsdl:part name="pid" type="xsd:string"/>
<wsdl:part name="bDefPid" type="xsd:string"/>
<wsdl:part name="methodName" type="xsd:string"/>
<wsdl:part name="parameters" type="tns1:ArrayOfProperty"/>
<wsdl:part name="asOfDateTime" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="findObjectsResponse">
<wsdl:part name="response" type="tns1:FieldSearchResult"/>
</wsdl:message>
<wsdl:message name="getObjectProfileRequest">
<wsdl:part name="pid" type="xsd:string"/>
<wsdl:part name="asOfDateTime" type="xsd:string"/>
</wsdl:message>
<wsdl:portType name="Fedora-API-A">
<wsdl:operation name="describeRepository">
<wsdl:input message="impl:describeRepositoryRequest"
name="describeRepositoryRequest"/>
<wsdl:output message="impl:describeRepositoryResponse"
name="describeRepositoryResponse"/>
</wsdl:operation>
<wsdl:operation name="getObjectProfile" parameterOrder="pid asOfDateTime">
<wsdl:input message="impl:getObjectProfileRequest"
name="getObjectProfileRequest"/>
<wsdl:output message="impl:getObjectProfileResponse"
name="getObjectProfileResponse"/>
</wsdl:operation>
<wsdl:operation name="listMethods" parameterOrder="pid asOfDateTime">
<wsdl:input message="impl:listMethodsRequest"
name="listMethodsRequest"/>
<wsdl:output message="impl:listMethodsResponse"
name="listMethodsResponse"/>
</wsdl:operation>
<wsdl:operation name="listDatastreams" parameterOrder="pid asOfDateTime">
<wsdl:input message="impl:listDatastreamsRequest"
name="listDatastreamsRequest"/>
<wsdl:output message="impl:listDatastreamsResponse"
name="listDatastreamsResponse"/>
</wsdl:operation>
<wsdl:operation name="getDatastreamDissemination" parameterOrder="pid
dsID asOfDateTime">
<wsdl:input message="impl:getDatastreamDisseminationRequest"
name="getDatastreamDisseminationRequest"/>
<wsdl:output message="impl:getDatastreamDisseminationResponse"
name="getDatastreamDisseminationResponse"/>
</wsdl:operation>
<wsdl:operation name="getDissemination" parameterOrder="pid bDefPid
methodName parameters asOfDateTime">
<wsdl:input message="impl:getDisseminationRequest"
name="getDisseminationRequest"/>
<wsdl:output message="impl:getDisseminationResponse"
name="getDisseminationResponse"/>
</wsdl:operation>
<wsdl:operation name="findObjects" parameterOrder="resultFields
maxResults query">
<wsdl:input message="impl:findObjectsRequest"
name="findObjectsRequest"/>
<wsdl:output message="impl:findObjectsResponse"
name="findObjectsResponse"/>
</wsdl:operation>
<wsdl:operation name="resumeFindObjects" parameterOrder="sessionToken">
<wsdl:input message="impl:resumeFindObjectsRequest"
name="resumeFindObjectsRequest"/>
<wsdl:output message="impl:resumeFindObjectsResponse"
name="resumeFindObjectsResponse"/>
</wsdl:operation>
<wsdl:operation name="getObjectHistory" parameterOrder="pid">
<wsdl:input message="impl:getObjectHistoryRequest"
name="getObjectHistoryRequest"/>
<wsdl:output message="impl:getObjectHistoryResponse"
name="getObjectHistoryResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="access/soapSoapBinding" type="impl:Fedora-API-A">
<wsdlsoap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="describeRepository">
<wsdlsoap:operation
soapAction="http://www.fedora.info/definitions/1/0/api/#describeRepository"/>
<wsdl:input name="describeRepositoryRequest">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="describeRepositoryResponse">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getObjectProfile">
<wsdlsoap:operation
soapAction="http://www.fedora.info/definitions/1/0/api/#getObjectProfile"/>
<wsdl:input name="getObjectProfileRequest">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="getObjectProfileResponse">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="listMethods">
<wsdlsoap:operation
soapAction="http://www.fedora.info/definitions/1/0/api/#listMethods"/>
<wsdl:input name="listMethodsRequest">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="listMethodsResponse">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="listDatastreams">
<wsdlsoap:operation
soapAction="http://www.fedora.info/definitions/1/0/api/#listDatastreams"/>
<wsdl:input name="listDatastreamsRequest">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="listDatastreamsResponse">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getDatastreamDissemination">
<wsdlsoap:operation
soapAction="http://www.fedora.info/definitions/1/0/api/#getDatastreamDissemination"/>
<wsdl:input name="getDatastreamDisseminationRequest">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="getDatastreamDisseminationResponse">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getDissemination">
<wsdlsoap:operation
soapAction="http://www.fedora.info/definitions/1/0/api/#getDissemination"/>
<wsdl:input name="getDisseminationRequest">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="getDisseminationResponse">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="findObjects">
<wsdlsoap:operation
soapAction="http://www.fedora.info/definitions/1/0/api/#findObjects"/>
<wsdl:input name="findObjectsRequest">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="findObjectsResponse">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="resumeFindObjects">
<wsdlsoap:operation
soapAction="http://www.fedora.info/definitions/1/0/api/#resumeFindObjects"/>
<wsdl:input name="resumeFindObjectsRequest">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="resumeFindObjectsResponse">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getObjectHistory">
<wsdlsoap:operation
soapAction="http://www.fedora.info/definitions/1/0/api/#getObjectHistory"/>
<wsdl:input name="getObjectHistoryRequest">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="getObjectHistoryResponse">
<wsdlsoap:body
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:access/soapSoapBinding" name="access/soap">
<wsdlsoap:address location="http://localhost:8080/fedora/access/soap"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

(2) And the corresponding classes generated by wsdl.exe in C# are as
following:
///////////////////////////////////////////////////////////////////////////////
namespace FedoraDAL.FedoraAPIA {
using System.Diagnostics;
using System.Xml.Serialization;
using System;
using System.Web.Services.Protocols;
using System.ComponentModel;
using System.Web.Services;
using System.Collections;

/// <remarks/>
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("c ode")]

[System.Web.Services.WebServiceBindingAttribute(Nam e="access/soapSoapBinding", Namespace="http://www.fedora.info/definitions/1/0/api/")]
[System.Xml.Serialization.SoapIncludeAttribute(type of(ObjectFields))]
[System.Xml.Serialization.SoapIncludeAttribute(type of(Condition))]
[System.Xml.Serialization.SoapIncludeAttribute(type of(Property))]
[System.Xml.Serialization.SoapIncludeAttribute(type of(DatastreamDef))]
[System.Xml.Serialization.SoapIncludeAttribute(type of(MethodParmDef))]
[System.Xml.Serialization.SoapIncludeAttribute(type of(ObjectMethodsDef))]
public class FedoraAPIAService :
System.Web.Services.Protocols.SoapHttpClientProtoc ol {
/// <remarks/>
public FedoraAPIAService() {
this.Url = "http://localhost:8080/fedora/access/soap";
}
……
/// <remarks/>
[System.Web.Services.Protocols.SoapRpcMethodttribut e("http://www.fedora.info/definitions/1/0/api/#findObjects",
RequestNamespace="http://www.fedora.info/definitions/1/0/api/",
ResponseNamespace="http://www.fedora.info/definitions/1/0/api/")]°
[return: System.Xml.Serialization.SoapElementAttribute("res ponse")]
public FieldSearchResult findObjects(string[] resultFields,
[System.Xml.Serialization.SoapElementAttribute(Data Type="nonNegativeInteger")] string maxResults, FieldSearchQuery query) {
object[] results = this.Invoke("findObjects", new object[] {
resultFields,
maxResults,
query});
return ((FieldSearchResult)(results[0]));
}

……
}

/// <remarks/>
[System.Xml.Serialization.SoapTypeAttribute("Object Fields",
"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.Serialization.SoapTypeAttribute("ListSe ssion",
"http://www.fedora.info/definitions/1/0/types/")]
public class ListSession {

/// <remarks/>
public string token;

/// <remarks/>

[System.Xml.Serialization.SoapElementAttribute(Data Type="nonNegativeInteger")]
public string cursor;

/// <remarks/>

[System.Xml.Serialization.SoapElementAttribute(Data Type="nonNegativeInteger")]
public string completeListSize;

/// <remarks/>
public string expirationDate;
}

/// <remarks/>
[System.Xml.Serialization.SoapTypeAttribute("FieldS earchResult",
"http://www.fedora.info/definitions/1/0/types/")]
public class FieldSearchResult {

/// <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: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">.
<soapenv:Body>.
<ns1:findObjectsResponse
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="http://www.fedora.info/definitions/1/0/api/">.
<response href="#id0"/>.
</ns1:findObjectsResponse>.
<multiRef id="id0" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns2:FieldSearchResult"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns2="http://www.fedora.info/definitions/1/0/types/">.
<listSession xsi:type="ns2:ListSession" xsi:nil="true"/>.
<resultList xsi:type="soapenc:Array" soapenc:array
Type="ns2:ObjectFields[1]">.
<item href="#id1"/>.
</resultList>.
</multiRef>.
<multiRef id="id1" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns3:ObjectFields"
xmlns:ns3="http://www.fedora.info/definitions/1/0/types/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">.
<pid xsi:type="xsd:string">demo:1</pid>.
<label xsi:type="xsd:string" xsi:nil="true"/>.
<fType xsi:type="xsd:string" xsi:nil="true"/>.
<cModel xsi:type="xsd:string" xsi:nil="true"/>.
<state xsi:type="xsd:string" xsi:nil="true"/>.
<ownerId xsi:type="xsd:string" xsi:nil="true"/>.
<cDate xsi:type="xsd:string">2004-12-10T00:21:52.000Z</cDate>.
<mDate xsi:type="xsd:string" xsi:nil="true"/>.
<dcmDate xsi:type="xsd:string" xsi:nil="true"/>.
<title xsi:type="xsd:string">Behavior Definition Object for UVA Simple
Image Contract</title>.
</multiRef>.
</soapenv:Body>.
</soapenv:Envelope>.

Nov 23 '05 #1
2 2671
Hi m8,

The primary problem is "not designed for interoperability" (but
there's no way to change that anymore ;-) ).

The first part of the "findObjectsRequest" message seems to be a
String[]. Is that reflected in the generated proxy on the .Net side?

This is the place i identified as a possible "String to String[]" cast
exception.

Hope this helps,

Marvin Smit
side remarks:
The Axis WebService uses the RPC/Encoded standard. This will NOT work
well with future version of WebServices (rpc/enc = deprecated, use
doc/lit instead)

On Sun, 10 Apr 2005 06:19:01 -0700, "yqlu"
<yq**@discussions.microsoft.com> wrote:
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 "findObjects" and return a complex
type "FieldSearchResult". 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 dont 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:definitions ......>
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<simpleType name="passByRef">
<restriction base="xsd:string">
<enumeration value="URL_REF"/>
</restriction>
</simpleType>
<simpleType name="passByValue">
<restriction base="xsd:string">
<enumeration value="VALUE"/>
</restriction>
</simpleType>
<simpleType name="ComparisonOperator">
<restriction base="xsd:string">
<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:string"/>
<element name="operator" nillable="true" type="tns1:ComparisonOperator"/>
<element name="value" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="DatastreamDef">
<sequence>
<element name="ID" nillable="true" type="xsd:string"/>
<element name="label" nillable="true" type="xsd:string"/>
<element name="MIMEType" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="ListSession">
<sequence>
<element name="token" nillable="true" type="xsd:string"/>
<element maxOccurs="1" minOccurs="0" name="cursor" nillable="true"
type="xsd:nonNegativeInteger"/>
<element maxOccurs="1" minOccurs="0" name="completeListSize"
nillable="true" type="xsd:nonNegativeInteger"/>
<element maxOccurs="1" minOccurs="0" name="expirationDate"
nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="ObjectFields">
<sequence>
<element maxOccurs="1" minOccurs="0" name="pid" nillable="true"
type="xsd:string"/>
<element maxOccurs="1" minOccurs="0" name="label" nillable="true"
type="xsd:string"/>
<element maxOccurs="1" minOccurs="0" name="fType" nillable="true"
type="xsd:string"/>
<element maxOccurs="1" minOccurs="0" name="cModel" nillable="true"
type="xsd:string"/>
<element maxOccurs="1" minOccurs="0" name="state" nillable="true"
type="xsd:string"/>
<element maxOccurs="1" minOccurs="0" name="ownerId" nillable="true"
type="xsd:string"/>
<element maxOccurs="1" minOccurs="0" name="cDate" nillable="true"
type="xsd:string"/>
<element maxOccurs="1" minOccurs="0" name="mDate" nillable="true"
type="xsd:string"/>
<element maxOccurs="1" minOccurs="0" name="dcmDate" nillable="true"
type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="bDef" nillable="true"
type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="bMech" nillable="true"
type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="title" nillable="true"
type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="creator"
nillable="true" type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="subject"
nillable="true" type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="description"
nillable="true" type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="publisher"
nillable="true" type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="contributor"
nillable="true" type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="date" nillable="true"
type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="type" nillable="true"
type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="format"
nillable="true" type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="identifier"
nillable="true" type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="source"
nillable="true" type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="language"
nillable="true" type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="relation"
nillable="true" type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="coverage"
nillable="true" type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="rights"
nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="ArrayOfObjectFields">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="tns1:ObjectFields[]"/>
</restriction>
</complexContent>
</complexType>
<complexType name="FieldSearchResult">
<sequence>
<element maxOccurs="1" minOccurs="0" name="listSession" nillable="true"
type="tns1:ListSession"/>
<element name="resultList" nillable="true"
type="tns1:ArrayOfObjectFields"/>
</sequence>
</complexType>
<simpleType name="defaultInputType">
<restriction base="xsd:string">
<enumeration value="fedora:defaultInputType"/>
</restriction>
</simpleType>
<simpleType name="userInputType">
<restriction base="xsd:string">
<enumeration value="fedora:userInputType"/>
</restriction>
</simpleType>
<complexType name="ArrayOfCondition">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="tns1:Condition[]"/>
</restriction>
</complexContent>
</complexType>
<complexType name="FieldSearchQuery">
<sequence>
<element name="conditions" nillable="true" type="tns1:ArrayOfCondition"/>
<element name="terms" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="ObjectProfile">
<sequence>
<element name="pid" nillable="true" type="xsd:string"/>
<element name="objLabel" nillable="true" type="xsd:string"/>
<element name="objContentModel" nillable="true" type="xsd:string"/>
<element name="objType" nillable="true" type="xsd:string"/>
<element name="objCreateDate" nillable="true" type="xsd:string"/>
<element name="objLastModDate" nillable="true" type="xsd:string"/>
<element name="objDissIndexViewURL" nillable="true" type="xsd:string"/>
<element name="objItemIndexViewURL" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="ArrayOfString">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
</restriction>
</complexContent>
</complexType>
<simpleType name="datastreamInputType">
<restriction base="xsd:string">
<enumeration value="fedora:datastreamInputType"/>
</restriction>
</simpleType>
<complexType name="MethodParmDef">
<sequence>
<element name="parmName" nillable="true" type="xsd:string"/>
<element name="parmType" nillable="true" type="xsd:string"/>
<element name="parmDefaultValue" nillable="true" type="xsd:string"/>
<element name="parmDomainValues" nillable="true"
type="tns1:ArrayOfString"/>
<element name="parmRequired" type="xsd:boolean"/>
<element name="parmLabel" nillable="true" type="xsd:string"/>
<element name="parmPassBy" nillable="true" type="xsd:string"/>
<element name="PASS_BY_REF" nillable="true" type="tns1:passByRef"/>
<element name="PASS_BY_VALUE" nillable="true" type="tns1:passByValue"/>
<element name="DATASTREAM_INPUT" nillable="true"
type="tns1:datastreamInputType"/>
<element name="USER_INPUT" nillable="true" type="tns1:userInputType"/>
<element name="DEFAULT_INPUT" nillable="true"
type="tns1:defaultInputType"/>
</sequence>
</complexType>
<complexType name="ArrayOfMethodParmDef">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="tns1:MethodParmDef[]"/>
</restriction>
</complexContent>
</complexType>
<complexType name="ObjectMethodsDef">
<sequence>
<element name="PID" nillable="true" type="xsd:string"/>
<element name="bDefPID" nillable="true" type="xsd:string"/>
<element name="methodName" nillable="true" type="xsd:string"/>
<element name="methodParmDefs" nillable="true"
type="tns1:ArrayOfMethodParmDef"/>
<element name="asOfDate" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="Property">
<sequence>
<element name="name" nillable="true" type="xsd:string"/>
<element name="value" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="ArrayOfProperty">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="tns1:Property[]"/>
</restriction>
</complexContent>
</complexType>
<complexType name="MIMETypedStream">
<sequence>
<element name="MIMEType" nillable="true" type="xsd:string"/>
<element name="stream" type="xsd:base64Binary"/>
<element name="header" nillable="true" type="tns1:ArrayOfProperty"/>
</sequence>
</complexType>
<complexType name="RepositoryInfo">
<sequence>
<element name="repositoryName" nillable="true" type="xsd:string"/>
<element name="repositoryVersion" nillable="true" type="xsd:string"/>
<element name="repositoryBaseURL" nillable="true" type="xsd:string"/>
<element name="repositoryPIDNamespace" nillable="true" type="xsd:string"/>
<element name="defaultExportFormat" nillable="true" type="xsd:string"/>
<element name="OAINamespace" nillable="true" type="xsd:string"/>
<element name="adminEmailList" nillable="true" type="tns1:ArrayOfString"/>
<element name="samplePID" nillable="true" type="xsd:string"/>
<element name="sampleOAIIdentifier" nillable="true" type="xsd:string"/>
<element name="sampleSearchURL" nillable="true" type="xsd:string"/>
<element name="sampleAccessURL" nillable="true" type="xsd:string"/>
<element name="sampleOAIURL" nillable="true" type="xsd:string"/>
<element name="retainPIDs" nillable="true" type="tns1:ArrayOfString"/>
</sequence>
</complexType>
<complexType name="ArrayOfObjectMethodsDef">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType"
wsdl:arrayType="tns1:ObjectMethodsDef[]"/>
</restriction>
</complexContent>
</complexType>
<complexType name="ArrayOfDatastreamDef">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="tns:DatastreamDef[]"/>
</restriction>
</complexContent>
</complexType>
</Schema>
</wsdl:types>
<wsdl:message name="getDatastreamDisseminationResponse">
<wsdl:part name="response" type="tns1:MIMETypedStream"/>
</wsdl:message>
<wsdl:message name="findObjectsRequest">
<wsdl:part name="resultFields" type="tns1:ArrayOfString"/>
<wsdl:part name="maxResults" type="xsd:nonNegativeInteger"/>
<wsdl:part name="query" type="tns1:FieldSearchQuery"/>
</wsdl:message>
<wsdl:message name="getObjectProfileResponse">
<wsdl:part name="response" type="tns1:ObjectProfile"/>
</wsdl:message>
<wsdl:message name="listDatastreamsResponse">
<wsdl:part name="response" type="tns1:ArrayOfDatastreamDef"/>
</wsdl:message>
<wsdl:message name="getObjectHistoryResponse">
<wsdl:part name="response" type="tns1:ArrayOfString"/>
</wsdl:message>
<wsdl:message name="resumeFindObjectsResponse">
<wsdl:part name="response" type="tns1:FieldSearchResult"/>
</wsdl:message>
<wsdl:message name="listDatastreamsRequest">
<wsdl:part name="pid" type="xsd:string"/>
<wsdl:part name="asOfDateTime" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="getObjectHistoryRequest">
<wsdl:part name="pid" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="getDisseminationResponse">
<wsdl:part name="response" type="tns1:MIMETypedStream"/>
</wsdl:message>
<wsdl:message name="describeRepositoryResponse">
<wsdl:part name="response" type="tns1:RepositoryInfo"/>
</wsdl:message>
<wsdl:message name="listMethodsRequest">
<wsdl:part name="pid" type="xsd:string"/>
<wsdl:part name="asOfDateTime" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="getDatastreamDisseminationRequest">
<wsdl:part name="pid" type="xsd:string"/>
<wsdl:part name="dsID" type="xsd:string"/>
<wsdl:part name="asOfDateTime" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="resumeFindObjectsRequest">
<wsdl:part name="sessionToken" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="listMethodsResponse">
<wsdl:part name="response" type="tns1:ArrayOfObjectMethodsDef"/>
</wsdl:message>
<wsdl:message name="describeRepositoryRequest">
</wsdl:message>
<wsdl:message name="getDisseminationRequest">
<wsdl:part name="pid" type="xsd:string"/>
<wsdl:part name="bDefPid" type="xsd:string"/>
<wsdl:part name="methodName" type="xsd:string"/>
<wsdl:part name="parameters" type="tns1:ArrayOfProperty"/>
<wsdl:part name="asOfDateTime" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="findObjectsResponse">
<wsdl:part name="response" type="tns1:FieldSearchResult"/>
</wsdl:message>
<wsdl:message name="getObjectProfileRequest">
<wsdl:part name="pid" type="xsd:string"/>
<wsdl:part name="asOfDateTime" type="xsd:string"/>
</wsdl:message>
<wsdl:portType name="Fedora-API-A">
<wsdl:operation name="describeRepository">
<wsdl:input message="impl:describeRepositoryRequest"
name="describeRepositoryRequest"/>
<wsdl:output message="impl:describeRepositoryResponse"
name="describeRepositoryResponse"/>
</wsdl:operation>
<wsdl:operation name="getObjectProfile" parameterOrder="pid asOfDateTime">
<wsdl:input message="impl:getObjectProfileRequest"
name="getObjectProfileRequest"/>
<wsdl:output message="impl:getObjectProfileResponse"
name="getObjectProfileResponse"/>
</wsdl:operation>
<wsdl:operation name="listMethods" parameterOrder="pid asOfDateTime">
<wsdl:input message="impl:listMethodsRequest"
name="listMethodsRequest"/>
<wsdl:output message="impl:listMethodsResponse"
name="listMethodsResponse"/>
</wsdl:operation>
<wsdl:operation name="listDatastreams" parameterOrder="pid asOfDateTime">
<wsdl:input message="impl:listDatastreamsRequest"
name="listDatastreamsRequest"/>
<wsdl:output message="impl:listDatastreamsResponse"
name="listDatastreamsResponse"/>
</wsdl:operation>
<wsdl:operation name="getDatastreamDissemination" parameterOrder="pid
dsID asOfDateTime">
<wsdl:input message="impl:getDatastreamDisseminationRequest"
name="getDatastreamDisseminationRequest"/>
<wsdl:output message="impl:getDatastreamDisseminationResponse"
name="getDatastreamDisseminationResponse"/>
</wsdl:operation>
<wsdl:operation name="getDissemination" parameterOrder="pid bDefPid
methodName parameters asOfDateTime">
<wsdl:input message="impl:getDisseminationRequest"
name="getDisseminationRequest"/>
<wsdl:output message="impl:getDisseminationResponse"
name="getDisseminationResponse"/>
</wsdl:operation>
<wsdl:operation name="findObjects" parameterOrder="resultFields
maxResults query">
<wsdl:input message="impl:findObjectsRequest"
name="findObjectsRequest"/>
<wsdl:output message="impl:findObjectsResponse"
name="findObjectsResponse"/>
</wsdl:operation>
<wsdl:operation name="resumeFindObjects" parameterOrder="sessionToken">
<wsdl:input message="impl:resumeFindObjectsRequest"
name="resumeFindObjectsRequest"/>
<wsdl:output message="impl:resumeFindObjectsResponse"
name="resumeFindObjectsResponse"/>
</wsdl:operation>
<wsdl:operation name="getObjectHistory" parameterOrder="pid">
<wsdl:input message="impl:getObjectHistoryRequest"
name="getObjectHistoryRequest"/>
<wsdl:output message="impl:getObjectHistoryResponse"
name="getObjectHistoryResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="access/soapSoapBinding" type="impl:Fedora-API-A">
<wsdlsoap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="describeRepository">
<wsdlsoap:operation
soapAction="http://www.fedora.info/definitions/1/0/api/#describeRepository"/>
<wsdl:input name="describeRepositoryRequest">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="describeRepositoryResponse">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getObjectProfile">
<wsdlsoap:operation
soapAction="http://www.fedora.info/definitions/1/0/api/#getObjectProfile"/>
<wsdl:input name="getObjectProfileRequest">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="getObjectProfileResponse">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="listMethods">
<wsdlsoap:operation
soapAction="http://www.fedora.info/definitions/1/0/api/#listMethods"/>
<wsdl:input name="listMethodsRequest">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="listMethodsResponse">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="listDatastreams">
<wsdlsoap:operation
soapAction="http://www.fedora.info/definitions/1/0/api/#listDatastreams"/>
<wsdl:input name="listDatastreamsRequest">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="listDatastreamsResponse">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getDatastreamDissemination">
<wsdlsoap:operation
soapAction="http://www.fedora.info/definitions/1/0/api/#getDatastreamDissemination"/>
<wsdl:input name="getDatastreamDisseminationRequest">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="getDatastreamDisseminationResponse">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getDissemination">
<wsdlsoap:operation
soapAction="http://www.fedora.info/definitions/1/0/api/#getDissemination"/>
<wsdl:input name="getDisseminationRequest">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="getDisseminationResponse">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="findObjects">
<wsdlsoap:operation
soapAction="http://www.fedora.info/definitions/1/0/api/#findObjects"/>
<wsdl:input name="findObjectsRequest">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="findObjectsResponse">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="resumeFindObjects">
<wsdlsoap:operation
soapAction="http://www.fedora.info/definitions/1/0/api/#resumeFindObjects"/>
<wsdl:input name="resumeFindObjectsRequest">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="resumeFindObjectsResponse">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getObjectHistory">
<wsdlsoap:operation
soapAction="http://www.fedora.info/definitions/1/0/api/#getObjectHistory"/>
<wsdl:input name="getObjectHistoryRequest">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="getObjectHistoryResponse">
<wsdlsoap:body
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:access/soapSoapBinding" name="access/soap">
<wsdlsoap:address location="http://localhost:8080/fedora/access/soap"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

(2) And the corresponding classes generated by wsdl.exe in C# are as
following:
///////////////////////////////////////////////////////////////////////////////
namespace FedoraDAL.FedoraAPIA {
using System.Diagnostics;
using System.Xml.Serialization;
using System;
using System.Web.Services.Protocols;
using System.ComponentModel;
using System.Web.Services;
using System.Collections;

/// <remarks/>
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("c ode")]

[System.Web.Services.WebServiceBindingAttribute(Nam e="access/soapSoapBinding", Namespace="http://www.fedora.info/definitions/1/0/api/")]
[System.Xml.Serialization.SoapIncludeAttribute(type of(ObjectFields))]
[System.Xml.Serialization.SoapIncludeAttribute(type of(Condition))]
[System.Xml.Serialization.SoapIncludeAttribute(type of(Property))]
[System.Xml.Serialization.SoapIncludeAttribute(type of(DatastreamDef))]
[System.Xml.Serialization.SoapIncludeAttribute(type of(MethodParmDef))]
[System.Xml.Serialization.SoapIncludeAttribute(type of(ObjectMethodsDef))]
public class FedoraAPIAService :
System.Web.Services.Protocols.SoapHttpClientProto col {
/// <remarks/>
public FedoraAPIAService() {
this.Url = "http://localhost:8080/fedora/access/soap";
}

/// <remarks/>
[System.Web.Services.Protocols.SoapRpcMethodttribut e("http://www.fedora.info/definitions/1/0/api/#findObjects",
RequestNamespace="http://www.fedora.info/definitions/1/0/api/",
ResponseNamespace="http://www.fedora.info/definitions/1/0/api/")]
[return: System.Xml.Serialization.SoapElementAttribute("res ponse")]
public FieldSearchResult findObjects(string[] resultFields,
[System.Xml.Serialization.SoapElementAttribute(Data Type="nonNegativeInteger")] string maxResults, FieldSearchQuery query) {
object[] results = this.Invoke("findObjects", new object[] {
resultFields,
maxResults,
query});
return ((FieldSearchResult)(results[0]));
}


}

/// <remarks/>
[System.Xml.Serialization.SoapTypeAttribute("Object Fields",
"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.Serialization.SoapTypeAttribute("ListSe ssion",
"http://www.fedora.info/definitions/1/0/types/")]
public class ListSession {

/// <remarks/>
public string token;

/// <remarks/>

[System.Xml.Serialization.SoapElementAttribute(Data Type="nonNegativeInteger")]
public string cursor;

/// <remarks/>

[System.Xml.Serialization.SoapElementAttribute(Data Type="nonNegativeInteger")]
public string completeListSize;

/// <remarks/>
public string expirationDate;
}

/// <remarks/>
[System.Xml.Serialization.SoapTypeAttribute("FieldS earchResult",
"http://www.fedora.info/definitions/1/0/types/")]
public class FieldSearchResult {

/// <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: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">.
<soapenv:Body>.
<ns1:findObjectsResponse
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="http://www.fedora.info/definitions/1/0/api/">.
<response href="#id0"/>.
</ns1:findObjectsResponse>.
<multiRef id="id0" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns2:FieldSearchResult"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns2="http://www.fedora.info/definitions/1/0/types/">.
<listSession xsi:type="ns2:ListSession" xsi:nil="true"/>.
<resultList xsi:type="soapenc:Array" soapenc:array
Type="ns2:ObjectFields[1]">.
<item href="#id1"/>.
</resultList>.
</multiRef>.
<multiRef id="id1" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns3:ObjectFields"
xmlns:ns3="http://www.fedora.info/definitions/1/0/types/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">.
<pid xsi:type="xsd:string">demo:1</pid>.
<label xsi:type="xsd:string" xsi:nil="true"/>.
<fType xsi:type="xsd:string" xsi:nil="true"/>.
<cModel xsi:type="xsd:string" xsi:nil="true"/>.
<state xsi:type="xsd:string" xsi:nil="true"/>.
<ownerId xsi:type="xsd:string" xsi:nil="true"/>.
<cDate xsi:type="xsd:string">2004-12-10T00:21:52.000Z</cDate>.
<mDate xsi:type="xsd:string" xsi:nil="true"/>.
<dcmDate xsi:type="xsd:string" xsi:nil="true"/>.
<title xsi:type="xsd:string">Behavior Definition Object for UVA Simple
Image Contract</title>.
</multiRef>.
</soapenv:Body>.
</soapenv:Envelope>.


Nov 23 '05 #2
Hi m8,

The primary problem is "not designed for interoperability" (but
there's no way to change that anymore ;-) ).

The first part of the "findObjectsRequest" message seems to be a
String[]. Is that reflected in the generated proxy on the .Net side?

This is the place i identified as a possible "String to String[]" cast
exception.

Hope this helps,

Marvin Smit
side remarks:
The Axis WebService uses the RPC/Encoded standard. This will NOT work
well with future version of WebServices (rpc/enc = deprecated, use
doc/lit instead)

On Sun, 10 Apr 2005 06:19:01 -0700, "yqlu"
<yq**@discussions.microsoft.com> wrote:
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 "findObjects" and return a complex
type "FieldSearchResult". 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 dont 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:definitions ......>
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<simpleType name="passByRef">
<restriction base="xsd:string">
<enumeration value="URL_REF"/>
</restriction>
</simpleType>
<simpleType name="passByValue">
<restriction base="xsd:string">
<enumeration value="VALUE"/>
</restriction>
</simpleType>
<simpleType name="ComparisonOperator">
<restriction base="xsd:string">
<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:string"/>
<element name="operator" nillable="true" type="tns1:ComparisonOperator"/>
<element name="value" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="DatastreamDef">
<sequence>
<element name="ID" nillable="true" type="xsd:string"/>
<element name="label" nillable="true" type="xsd:string"/>
<element name="MIMEType" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="ListSession">
<sequence>
<element name="token" nillable="true" type="xsd:string"/>
<element maxOccurs="1" minOccurs="0" name="cursor" nillable="true"
type="xsd:nonNegativeInteger"/>
<element maxOccurs="1" minOccurs="0" name="completeListSize"
nillable="true" type="xsd:nonNegativeInteger"/>
<element maxOccurs="1" minOccurs="0" name="expirationDate"
nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="ObjectFields">
<sequence>
<element maxOccurs="1" minOccurs="0" name="pid" nillable="true"
type="xsd:string"/>
<element maxOccurs="1" minOccurs="0" name="label" nillable="true"
type="xsd:string"/>
<element maxOccurs="1" minOccurs="0" name="fType" nillable="true"
type="xsd:string"/>
<element maxOccurs="1" minOccurs="0" name="cModel" nillable="true"
type="xsd:string"/>
<element maxOccurs="1" minOccurs="0" name="state" nillable="true"
type="xsd:string"/>
<element maxOccurs="1" minOccurs="0" name="ownerId" nillable="true"
type="xsd:string"/>
<element maxOccurs="1" minOccurs="0" name="cDate" nillable="true"
type="xsd:string"/>
<element maxOccurs="1" minOccurs="0" name="mDate" nillable="true"
type="xsd:string"/>
<element maxOccurs="1" minOccurs="0" name="dcmDate" nillable="true"
type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="bDef" nillable="true"
type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="bMech" nillable="true"
type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="title" nillable="true"
type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="creator"
nillable="true" type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="subject"
nillable="true" type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="description"
nillable="true" type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="publisher"
nillable="true" type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="contributor"
nillable="true" type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="date" nillable="true"
type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="type" nillable="true"
type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="format"
nillable="true" type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="identifier"
nillable="true" type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="source"
nillable="true" type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="language"
nillable="true" type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="relation"
nillable="true" type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="coverage"
nillable="true" type="xsd:string"/>
<element maxOccurs="unbounded" minOccurs="0" name="rights"
nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="ArrayOfObjectFields">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="tns1:ObjectFields[]"/>
</restriction>
</complexContent>
</complexType>
<complexType name="FieldSearchResult">
<sequence>
<element maxOccurs="1" minOccurs="0" name="listSession" nillable="true"
type="tns1:ListSession"/>
<element name="resultList" nillable="true"
type="tns1:ArrayOfObjectFields"/>
</sequence>
</complexType>
<simpleType name="defaultInputType">
<restriction base="xsd:string">
<enumeration value="fedora:defaultInputType"/>
</restriction>
</simpleType>
<simpleType name="userInputType">
<restriction base="xsd:string">
<enumeration value="fedora:userInputType"/>
</restriction>
</simpleType>
<complexType name="ArrayOfCondition">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="tns1:Condition[]"/>
</restriction>
</complexContent>
</complexType>
<complexType name="FieldSearchQuery">
<sequence>
<element name="conditions" nillable="true" type="tns1:ArrayOfCondition"/>
<element name="terms" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="ObjectProfile">
<sequence>
<element name="pid" nillable="true" type="xsd:string"/>
<element name="objLabel" nillable="true" type="xsd:string"/>
<element name="objContentModel" nillable="true" type="xsd:string"/>
<element name="objType" nillable="true" type="xsd:string"/>
<element name="objCreateDate" nillable="true" type="xsd:string"/>
<element name="objLastModDate" nillable="true" type="xsd:string"/>
<element name="objDissIndexViewURL" nillable="true" type="xsd:string"/>
<element name="objItemIndexViewURL" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="ArrayOfString">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
</restriction>
</complexContent>
</complexType>
<simpleType name="datastreamInputType">
<restriction base="xsd:string">
<enumeration value="fedora:datastreamInputType"/>
</restriction>
</simpleType>
<complexType name="MethodParmDef">
<sequence>
<element name="parmName" nillable="true" type="xsd:string"/>
<element name="parmType" nillable="true" type="xsd:string"/>
<element name="parmDefaultValue" nillable="true" type="xsd:string"/>
<element name="parmDomainValues" nillable="true"
type="tns1:ArrayOfString"/>
<element name="parmRequired" type="xsd:boolean"/>
<element name="parmLabel" nillable="true" type="xsd:string"/>
<element name="parmPassBy" nillable="true" type="xsd:string"/>
<element name="PASS_BY_REF" nillable="true" type="tns1:passByRef"/>
<element name="PASS_BY_VALUE" nillable="true" type="tns1:passByValue"/>
<element name="DATASTREAM_INPUT" nillable="true"
type="tns1:datastreamInputType"/>
<element name="USER_INPUT" nillable="true" type="tns1:userInputType"/>
<element name="DEFAULT_INPUT" nillable="true"
type="tns1:defaultInputType"/>
</sequence>
</complexType>
<complexType name="ArrayOfMethodParmDef">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="tns1:MethodParmDef[]"/>
</restriction>
</complexContent>
</complexType>
<complexType name="ObjectMethodsDef">
<sequence>
<element name="PID" nillable="true" type="xsd:string"/>
<element name="bDefPID" nillable="true" type="xsd:string"/>
<element name="methodName" nillable="true" type="xsd:string"/>
<element name="methodParmDefs" nillable="true"
type="tns1:ArrayOfMethodParmDef"/>
<element name="asOfDate" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="Property">
<sequence>
<element name="name" nillable="true" type="xsd:string"/>
<element name="value" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="ArrayOfProperty">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="tns1:Property[]"/>
</restriction>
</complexContent>
</complexType>
<complexType name="MIMETypedStream">
<sequence>
<element name="MIMEType" nillable="true" type="xsd:string"/>
<element name="stream" type="xsd:base64Binary"/>
<element name="header" nillable="true" type="tns1:ArrayOfProperty"/>
</sequence>
</complexType>
<complexType name="RepositoryInfo">
<sequence>
<element name="repositoryName" nillable="true" type="xsd:string"/>
<element name="repositoryVersion" nillable="true" type="xsd:string"/>
<element name="repositoryBaseURL" nillable="true" type="xsd:string"/>
<element name="repositoryPIDNamespace" nillable="true" type="xsd:string"/>
<element name="defaultExportFormat" nillable="true" type="xsd:string"/>
<element name="OAINamespace" nillable="true" type="xsd:string"/>
<element name="adminEmailList" nillable="true" type="tns1:ArrayOfString"/>
<element name="samplePID" nillable="true" type="xsd:string"/>
<element name="sampleOAIIdentifier" nillable="true" type="xsd:string"/>
<element name="sampleSearchURL" nillable="true" type="xsd:string"/>
<element name="sampleAccessURL" nillable="true" type="xsd:string"/>
<element name="sampleOAIURL" nillable="true" type="xsd:string"/>
<element name="retainPIDs" nillable="true" type="tns1:ArrayOfString"/>
</sequence>
</complexType>
<complexType name="ArrayOfObjectMethodsDef">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType"
wsdl:arrayType="tns1:ObjectMethodsDef[]"/>
</restriction>
</complexContent>
</complexType>
<complexType name="ArrayOfDatastreamDef">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="tns:DatastreamDef[]"/>
</restriction>
</complexContent>
</complexType>
</Schema>
</wsdl:types>
<wsdl:message name="getDatastreamDisseminationResponse">
<wsdl:part name="response" type="tns1:MIMETypedStream"/>
</wsdl:message>
<wsdl:message name="findObjectsRequest">
<wsdl:part name="resultFields" type="tns1:ArrayOfString"/>
<wsdl:part name="maxResults" type="xsd:nonNegativeInteger"/>
<wsdl:part name="query" type="tns1:FieldSearchQuery"/>
</wsdl:message>
<wsdl:message name="getObjectProfileResponse">
<wsdl:part name="response" type="tns1:ObjectProfile"/>
</wsdl:message>
<wsdl:message name="listDatastreamsResponse">
<wsdl:part name="response" type="tns1:ArrayOfDatastreamDef"/>
</wsdl:message>
<wsdl:message name="getObjectHistoryResponse">
<wsdl:part name="response" type="tns1:ArrayOfString"/>
</wsdl:message>
<wsdl:message name="resumeFindObjectsResponse">
<wsdl:part name="response" type="tns1:FieldSearchResult"/>
</wsdl:message>
<wsdl:message name="listDatastreamsRequest">
<wsdl:part name="pid" type="xsd:string"/>
<wsdl:part name="asOfDateTime" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="getObjectHistoryRequest">
<wsdl:part name="pid" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="getDisseminationResponse">
<wsdl:part name="response" type="tns1:MIMETypedStream"/>
</wsdl:message>
<wsdl:message name="describeRepositoryResponse">
<wsdl:part name="response" type="tns1:RepositoryInfo"/>
</wsdl:message>
<wsdl:message name="listMethodsRequest">
<wsdl:part name="pid" type="xsd:string"/>
<wsdl:part name="asOfDateTime" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="getDatastreamDisseminationRequest">
<wsdl:part name="pid" type="xsd:string"/>
<wsdl:part name="dsID" type="xsd:string"/>
<wsdl:part name="asOfDateTime" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="resumeFindObjectsRequest">
<wsdl:part name="sessionToken" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="listMethodsResponse">
<wsdl:part name="response" type="tns1:ArrayOfObjectMethodsDef"/>
</wsdl:message>
<wsdl:message name="describeRepositoryRequest">
</wsdl:message>
<wsdl:message name="getDisseminationRequest">
<wsdl:part name="pid" type="xsd:string"/>
<wsdl:part name="bDefPid" type="xsd:string"/>
<wsdl:part name="methodName" type="xsd:string"/>
<wsdl:part name="parameters" type="tns1:ArrayOfProperty"/>
<wsdl:part name="asOfDateTime" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="findObjectsResponse">
<wsdl:part name="response" type="tns1:FieldSearchResult"/>
</wsdl:message>
<wsdl:message name="getObjectProfileRequest">
<wsdl:part name="pid" type="xsd:string"/>
<wsdl:part name="asOfDateTime" type="xsd:string"/>
</wsdl:message>
<wsdl:portType name="Fedora-API-A">
<wsdl:operation name="describeRepository">
<wsdl:input message="impl:describeRepositoryRequest"
name="describeRepositoryRequest"/>
<wsdl:output message="impl:describeRepositoryResponse"
name="describeRepositoryResponse"/>
</wsdl:operation>
<wsdl:operation name="getObjectProfile" parameterOrder="pid asOfDateTime">
<wsdl:input message="impl:getObjectProfileRequest"
name="getObjectProfileRequest"/>
<wsdl:output message="impl:getObjectProfileResponse"
name="getObjectProfileResponse"/>
</wsdl:operation>
<wsdl:operation name="listMethods" parameterOrder="pid asOfDateTime">
<wsdl:input message="impl:listMethodsRequest"
name="listMethodsRequest"/>
<wsdl:output message="impl:listMethodsResponse"
name="listMethodsResponse"/>
</wsdl:operation>
<wsdl:operation name="listDatastreams" parameterOrder="pid asOfDateTime">
<wsdl:input message="impl:listDatastreamsRequest"
name="listDatastreamsRequest"/>
<wsdl:output message="impl:listDatastreamsResponse"
name="listDatastreamsResponse"/>
</wsdl:operation>
<wsdl:operation name="getDatastreamDissemination" parameterOrder="pid
dsID asOfDateTime">
<wsdl:input message="impl:getDatastreamDisseminationRequest"
name="getDatastreamDisseminationRequest"/>
<wsdl:output message="impl:getDatastreamDisseminationResponse"
name="getDatastreamDisseminationResponse"/>
</wsdl:operation>
<wsdl:operation name="getDissemination" parameterOrder="pid bDefPid
methodName parameters asOfDateTime">
<wsdl:input message="impl:getDisseminationRequest"
name="getDisseminationRequest"/>
<wsdl:output message="impl:getDisseminationResponse"
name="getDisseminationResponse"/>
</wsdl:operation>
<wsdl:operation name="findObjects" parameterOrder="resultFields
maxResults query">
<wsdl:input message="impl:findObjectsRequest"
name="findObjectsRequest"/>
<wsdl:output message="impl:findObjectsResponse"
name="findObjectsResponse"/>
</wsdl:operation>
<wsdl:operation name="resumeFindObjects" parameterOrder="sessionToken">
<wsdl:input message="impl:resumeFindObjectsRequest"
name="resumeFindObjectsRequest"/>
<wsdl:output message="impl:resumeFindObjectsResponse"
name="resumeFindObjectsResponse"/>
</wsdl:operation>
<wsdl:operation name="getObjectHistory" parameterOrder="pid">
<wsdl:input message="impl:getObjectHistoryRequest"
name="getObjectHistoryRequest"/>
<wsdl:output message="impl:getObjectHistoryResponse"
name="getObjectHistoryResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="access/soapSoapBinding" type="impl:Fedora-API-A">
<wsdlsoap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="describeRepository">
<wsdlsoap:operation
soapAction="http://www.fedora.info/definitions/1/0/api/#describeRepository"/>
<wsdl:input name="describeRepositoryRequest">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="describeRepositoryResponse">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getObjectProfile">
<wsdlsoap:operation
soapAction="http://www.fedora.info/definitions/1/0/api/#getObjectProfile"/>
<wsdl:input name="getObjectProfileRequest">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="getObjectProfileResponse">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="listMethods">
<wsdlsoap:operation
soapAction="http://www.fedora.info/definitions/1/0/api/#listMethods"/>
<wsdl:input name="listMethodsRequest">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="listMethodsResponse">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="listDatastreams">
<wsdlsoap:operation
soapAction="http://www.fedora.info/definitions/1/0/api/#listDatastreams"/>
<wsdl:input name="listDatastreamsRequest">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="listDatastreamsResponse">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getDatastreamDissemination">
<wsdlsoap:operation
soapAction="http://www.fedora.info/definitions/1/0/api/#getDatastreamDissemination"/>
<wsdl:input name="getDatastreamDisseminationRequest">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="getDatastreamDisseminationResponse">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getDissemination">
<wsdlsoap:operation
soapAction="http://www.fedora.info/definitions/1/0/api/#getDissemination"/>
<wsdl:input name="getDisseminationRequest">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="getDisseminationResponse">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="findObjects">
<wsdlsoap:operation
soapAction="http://www.fedora.info/definitions/1/0/api/#findObjects"/>
<wsdl:input name="findObjectsRequest">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="findObjectsResponse">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="resumeFindObjects">
<wsdlsoap:operation
soapAction="http://www.fedora.info/definitions/1/0/api/#resumeFindObjects"/>
<wsdl:input name="resumeFindObjectsRequest">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="resumeFindObjectsResponse">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getObjectHistory">
<wsdlsoap:operation
soapAction="http://www.fedora.info/definitions/1/0/api/#getObjectHistory"/>
<wsdl:input name="getObjectHistoryRequest">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.fedora.info/definitions/1/0/api/" use="encoded"/>
</wsdl:input>
<wsdl:output name="getObjectHistoryResponse">
<wsdlsoap:body
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:access/soapSoapBinding" name="access/soap">
<wsdlsoap:address location="http://localhost:8080/fedora/access/soap"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

(2) And the corresponding classes generated by wsdl.exe in C# are as
following:
///////////////////////////////////////////////////////////////////////////////
namespace FedoraDAL.FedoraAPIA {
using System.Diagnostics;
using System.Xml.Serialization;
using System;
using System.Web.Services.Protocols;
using System.ComponentModel;
using System.Web.Services;
using System.Collections;

/// <remarks/>
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("c ode")]

[System.Web.Services.WebServiceBindingAttribute(Nam e="access/soapSoapBinding", Namespace="http://www.fedora.info/definitions/1/0/api/")]
[System.Xml.Serialization.SoapIncludeAttribute(type of(ObjectFields))]
[System.Xml.Serialization.SoapIncludeAttribute(type of(Condition))]
[System.Xml.Serialization.SoapIncludeAttribute(type of(Property))]
[System.Xml.Serialization.SoapIncludeAttribute(type of(DatastreamDef))]
[System.Xml.Serialization.SoapIncludeAttribute(type of(MethodParmDef))]
[System.Xml.Serialization.SoapIncludeAttribute(type of(ObjectMethodsDef))]
public class FedoraAPIAService :
System.Web.Services.Protocols.SoapHttpClientProto col {
/// <remarks/>
public FedoraAPIAService() {
this.Url = "http://localhost:8080/fedora/access/soap";
}

/// <remarks/>
[System.Web.Services.Protocols.SoapRpcMethodttribut e("http://www.fedora.info/definitions/1/0/api/#findObjects",
RequestNamespace="http://www.fedora.info/definitions/1/0/api/",
ResponseNamespace="http://www.fedora.info/definitions/1/0/api/")]
[return: System.Xml.Serialization.SoapElementAttribute("res ponse")]
public FieldSearchResult findObjects(string[] resultFields,
[System.Xml.Serialization.SoapElementAttribute(Data Type="nonNegativeInteger")] string maxResults, FieldSearchQuery query) {
object[] results = this.Invoke("findObjects", new object[] {
resultFields,
maxResults,
query});
return ((FieldSearchResult)(results[0]));
}


}

/// <remarks/>
[System.Xml.Serialization.SoapTypeAttribute("Object Fields",
"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.Serialization.SoapTypeAttribute("ListSe ssion",
"http://www.fedora.info/definitions/1/0/types/")]
public class ListSession {

/// <remarks/>
public string token;

/// <remarks/>

[System.Xml.Serialization.SoapElementAttribute(Data Type="nonNegativeInteger")]
public string cursor;

/// <remarks/>

[System.Xml.Serialization.SoapElementAttribute(Data Type="nonNegativeInteger")]
public string completeListSize;

/// <remarks/>
public string expirationDate;
}

/// <remarks/>
[System.Xml.Serialization.SoapTypeAttribute("FieldS earchResult",
"http://www.fedora.info/definitions/1/0/types/")]
public class FieldSearchResult {

/// <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: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">.
<soapenv:Body>.
<ns1:findObjectsResponse
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="http://www.fedora.info/definitions/1/0/api/">.
<response href="#id0"/>.
</ns1:findObjectsResponse>.
<multiRef id="id0" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns2:FieldSearchResult"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns2="http://www.fedora.info/definitions/1/0/types/">.
<listSession xsi:type="ns2:ListSession" xsi:nil="true"/>.
<resultList xsi:type="soapenc:Array" soapenc:array
Type="ns2:ObjectFields[1]">.
<item href="#id1"/>.
</resultList>.
</multiRef>.
<multiRef id="id1" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns3:ObjectFields"
xmlns:ns3="http://www.fedora.info/definitions/1/0/types/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">.
<pid xsi:type="xsd:string">demo:1</pid>.
<label xsi:type="xsd:string" xsi:nil="true"/>.
<fType xsi:type="xsd:string" xsi:nil="true"/>.
<cModel xsi:type="xsd:string" xsi:nil="true"/>.
<state xsi:type="xsd:string" xsi:nil="true"/>.
<ownerId xsi:type="xsd:string" xsi:nil="true"/>.
<cDate xsi:type="xsd:string">2004-12-10T00:21:52.000Z</cDate>.
<mDate xsi:type="xsd:string" xsi:nil="true"/>.
<dcmDate xsi:type="xsd:string" xsi:nil="true"/>.
<title xsi:type="xsd:string">Behavior Definition Object for UVA Simple
Image Contract</title>.
</multiRef>.
</soapenv:Body>.
</soapenv:Envelope>.


Nov 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Karl | last post by:
Hi everyone, We developped a WebService with Visual Studio .Net and we faced an authentication problem with a java client. My assumption is that this is because cookies passed from client are...
4
by: JLJ | last post by:
I have a very simple webservice written in Java/Axis. It takes in a complexType with 2 string elements, userid and password. The response is a complexType containing two complexTypes each having...
0
by: Det | last post by:
Hi there I am somewhat stuck with calling a WebService from out of a VB App. My Goal: - Get a WebService invoked under MS - Access 2002, not using the MS-SOAP-Toolkit but the .net - Framework ...
7
by: Christian Wilhelm | last post by:
Hi! I'm trying to call a Java WebService out of a .net Client. There are two Methods, one Method requires one Parameter of type Parameter, the other Method requires one Parameter of type...
7
by: Jorgen Haukland, Norway | last post by:
Hi, I have created a Java webservice which runs in IBM WebSphere appserver. I take the WSDL-file and create a VS.NET WinForm application and calls the service running on my PC and everything...
6
by: Sascha Schmidt | last post by:
Hi again! Well, the first part of my "mission" (calling remoting objects from a webservice) is solved. But there's another part: Calling this C#-Webservice from a java client. Is this a...
4
by: luckyabhishek | last post by:
Hi I am using a java webservice in a .NET application. The xml type of a field in this webservice is xsd:datetime. When i call the webservice from the application i get a deserialization error on...
1
by: jens Jensen | last post by:
Hello , i'm calling a webservice generated with oracle webservice java tools. I'm not able to add a web reference to a .net client the usual way with visual studio 2005. I was therefore...
3
by: shreya | last post by:
While generating client jar files from ant command using build.xml I am getting following error generate-client: Generating client jar for click2pstn.wsdl ... ...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.