Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Java Web Services error: MBException: The value passed in is not valid
JimD
Hi. I ran into some problems using Java Web Services. Even though I connected ok to the server and can execute methods on server stub, I need to know:
-How to resolve this error:
Server was unable to process request.
---> MBException: The value passed in is not valid for the parameter (0x80040407)
it was caused by this code (error caused by very last line):
MBMetadata metadata1 = new MBMetadata();
metadata1.setMID(ma_tempConainerID);
metadata1.setMName("{5BE195E1-0726-11D3-9DDE-0060081F836F}");
metadata1.setMValue("RGB");
MBSearchConstraint myConstraint1 = new MBSearchConstraint();
myConstraint1.setMMetadata(metadata1);
myConstraint1.setMBooleanOperator(MBBooleanOperator.NotSet);
myConstraint1.setMSearchOperator("OpExists");
MBSearchCriteria searchCriteria = new MBSearchCriteria();
searchCriteria.setMContainerID(ma_tempConainerID);
searchCriteria.setMRecursive(true);
ArrayOfMBSearchConstraint arrayOfConstraints=new ArrayOfMBSearchConstraint(new MBSearchConstraint[]{myConstraint1});
searchCriteria.setMSearchConstraints(arrayOfConstraints);;
ArrayOfMBAsset myResult = myStub.search(searchCriteria,true);
Find more posts tagged with
Comments
msnider
Jim,
The error is being caused by how you are creating the MBMetadata object
MBMetadata metadata1 = new MBMetadata();
metadata1.setMID(ma_tempConainerID);
metadata1.setMName("{5BE195E1-0726-11D3-9DDE-0060081F836F}");
metadata1.setMValue("RGB");
The id that should be set in setMID is not the container id but the metadata id and the name, while not strictly needed in this particular case should be the name of the metadata. In other words:
MBMetadata metadata1 = new MBMetadata();
metadata1.setMID("{5BE195E1-0726-11D3-9DDE-0060081F836F}");
metadata1.setMName("Colorspace of Image");
metadata1.setMValue("RGB");
Hope this helps,
Mark
TheRubble
MBMetadata metadata = new MBMetadata();
metadata.mName = "PID";
metadata.mID = "{3E0A767C-B570-4EB3-9BF0-A177234DBA55}";
metadata.mValue = 123456;
return metadata;
The above is the code that I'm currently using and I get the same error. Using .Net 2.0 any ideas?
msrinivas
Look at this
post
.
HTH