Hello,
I have a problem when I try to update a mandatory physical property value using method updateNode().
The code that I use:
Node node=fDocMan.getNode(307274);
AttributeGroup attrGroup = new AttributeGroup();
attrGroup.setKey("POCreateInfo");
attrGroup.setType("POCreateInfo");
StringValue homeLocation = new StringValue();
homeLocation.setKey("poLocation");
homeLocation.getValues().add("/homeLocation");
StringValue physProp=new StringValue();
physProp.setKey("mtField_attr");
physProp.getValues().add("value");
attrGroup.getValues().add(homeLocation);
attrGroup.getValues().add(physProp);
Metadata physicalObjectMetadata = new Metadata();
physicalObjectMetadata.getAttributeGroups().clear();
physicalObjectMetadata.getAttributeGroups().add(attrGroup);
node.setMetadata(physicalObjectMetadata);
fDocMan.updateNode(node);
The exception is:
javax.xml.ws.soap.SOAPFaultException: Field 'attr' is required
at com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:189)
at com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:122)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:119)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)
at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:118)
at com.sun.proxy.$Proxy35.updateNode(Unknown Source)
Does anyone has an idea why this thing happen?