Does anybody have examples of searching metadata using the values array. When I pass in an array of strings, such as assets names, I get a SOAP exception everytime. Here is the XML of my soap request and code.
CODE:
MediaBinServer service = new MediaBinServer();
service.Url = "
http://localhost:8081/MediaBinWebService/MediaBinServer.asmx";
Uri u = new Uri( "
http://localhost:8081/MediaBinWebService/MediaBinServer.asmx");
CredentialCache cache = new CredentialCache();
cache.Add( u,"NTLM", new NetworkCredential( "user", "password", "DEV1"));
service.Credentials = cache;
MBContainer obj = service.GetRootContainer();
MBSearchCriteria criteria = new MBSearchCriteria();
criteria.mRecursive = true;
criteria.mContainerID = service.GetRootContainer().mID;
MBSearchConstraint constraint = new MBSearchConstraint();
MBMetadata data = new MBMetadata();
data.mID = "{B297C571-F083-11D4-8200-0060080D8AC2}";
constraint.mMetadata = data;
String[] values = {"Winter.jpg", "Sunset.jpg"};
constraint.mMetadata.mValues = values;
constraint.mSearchOperator = "Contains";
MBSearchConstraint[] constraints = {constraint};
criteria.mSearchConstraints = constraints;
MBAsset[] assetsSearch = service.Search(criteria, false);
REQUEST:
<soap:Envelope xmlns:soap="
http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="
http://www.w3.org/2001/XMLSchema"> <soap:Body>
<Search xmlns="
http://www.mediabin.com"> <criteria>
<mContainerID>{F98F78C8-B615-4A78-BFEF-2A9A40494BD5}</mContainerID>
<mRecursive>true</mRecursive>
<mSearchConstraints>
<MBSearchConstraint>
<mMetadata>
<mID>{B297C571-F083-11D4-8200-0060080D8AC2}</mID>
<IsMultipleValue>false</IsMultipleValue>
<mValues>
<anyType xsi:type="xsd:string">Winter.jpg</anyType>
<anyType xsi:type="xsd:string">Sunset.jpg</anyType>
</mValues>
</mMetadata>
<mSearchOperator>Contains</mSearchOperator>
<mBooleanOperator>NotSet</mBooleanOperator>
</MBSearchConstraint>
</mSearchConstraints>
<mMaxHits>0</mMaxHits>
</criteria>
<bReturnAllMetadata>false</bReturnAllMetadata>
</Search>
</soap:Body>
</soap:Envelope>
RESPONSE:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="
http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="
http://www.w3.org/2001/XMLSchema"> <soap:Body>
<soap:Fault>
<faultcode>soap

erver</faultcode>
<faultstring>System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> MBPNetModel.MBObjects.MBException: MBException: Error in CMBVariant:

perator MB:

ataValuePtr(). Type of the variant not specified - cannot convert to datavalue. (0x80040500)
at MBPNetModel.MediaBinScriptModel.MediaBinServerImpl.Search(MBSearchCriteria criteria, Boolean onlyReturnIDs, Boolean isAssetSearch, Boolean bReturnAllMetadata, String groupID, MBConnection mbConnection)
at MBPNetModel.WebServices.MediaBinServer.Search(MBSearchCriteria criteria, Boolean bReturnAllMetadata)
--- End of inner exception stack trace ---</faultstring>
<detail />
</soap:Fault>
</soap:Body>
</soap:Envelope>