You need to sign in to do that
Don't have an account?
Emanuela
MetadataBindigStub not found in metadata.wsdl
hi everyone,
I have a problem!
I need to create a custom object with metadata api (ver 12.0) and, searching for examples, i've found the one below :
The problem is that I've not 'MetadataSoapBindingStub' into library generated by 'metadata wsdl', and I've not a 'MetadataServiceLocator'.
I have a 'MetadataServiceStub' but it doesn't work in the same way.
Can anyone help me? Could you tell me when I can find the 'MetadataBindingStub'?
I have a problem!
I need to create a custom object with metadata api (ver 12.0) and, searching for examples, i've found the one below :
MetadataBindingStub stub = (MetadataBindingStub) new MetadataServiceLocator().getMetadata();
stub.setTimeout(60000);
// Login using Partner WSDL
// Getting the Session ID from Partner WSDL
SessionHeader sh = new SessionHeader();
sh.setSessionId(loginResult.getSessionId());
stub.setHeader(new MetadataServiceLocator().getServiceName()
.getNamespaceURI(), "SessionHeader", sh);
CustomObject co = new CustomObject();
String name = "MyNewObj";
co.setFullName(name + "__c");
co.setDeploymentStatus(DeploymentStatus.Deployed);
co.setDescription("Created by the Metadata API");
co.setEnableActivities(true);
co.setLabel(name + " Object");
co.setPluralLabel(co.getLabel() + "s");
co.setSharingModel(SharingModel.ReadWrite);
CustomField nf = new CustomField();
nf.setType(FieldType.Text);
nf.setLabel(co.getFullName() + " Name");
co.setNameField(nf);
AsyncResult[] ars = stub.create(new Metadata[] { co} )
The problem is that I've not 'MetadataSoapBindingStub' into library generated by 'metadata wsdl', and I've not a 'MetadataServiceLocator'.
I have a 'MetadataServiceStub' but it doesn't work in the same way.
Can anyone help me? Could you tell me when I can find the 'MetadataBindingStub'?
I need to find the 'MetadataBindingStub' as soon as possible!
Axis 2.0 doesn't generate the MetadataBindingStub.
Axis 1.4 work better ;)
Thank you so much!
cheers,
Emanuela