• Konst Maxx
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies

Hi,

 

I have this method:

    public void testListMetadata() {
        try {
            ListMetadataQuery query = new ListMetadataQuery();
            query.setType("Package");
            double asOfVersion = 26.0;
            // Assuming that the SOAP binding has already been established.
            FileProperties[] lmr = sfd.getMetaConnection().listMetadata(
                    new ListMetadataQuery[]{query}, asOfVersion);
            if (lmr != null) {
                for (FileProperties n : lmr) {
                    System.out.println("Component fullName: " + n.getFullName());
                    System.out.println("Component type: " + n.getType());
                }
            }
        } catch (ConnectionException ce) {
            ce.printStackTrace();
        }
    }

 I assume it should return for me list of the installed packages.

Is it correct assumption?

 

But I have an error:

com.sforce.ws.SoapFaultException: UNKNOWN_EXCEPTION: An unexpected error occurred. Please include this ErrorId if you contact support: 1379208547-383 (1089039615)
	at com.sforce.ws.transport.SoapConnection.createException(SoapConnection.java:205)
	at com.sforce.ws.transport.SoapConnection.receive(SoapConnection.java:149)
	at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:98)
	at com.sforce.soap.metadata.MetadataConnection.listMetadata(MetadataConnection.java:160)


I've debugged inside and saw that at transport level I have http error 500 Internal Server Error

 

 How to solve it?

Where to create ticket for SF team to investigate this issue?

Hi,

 

I have a task to retrieve all metadata from SF account.

So I should use Metadata API.

 

As I understood I need to implemet this algorithm:

1. call describeMetadata() to get all types for the given account

2. for each type I have to call listMetadata() to get properties for each type recieved in first step.

3. from the data of the step 2 I can build parameters for retrieve() method for unpackaged types.

 

So my questions are:

1. Is it correct approach in general?

2. how to get installed packages to initialize RetrieveRequest.packageNames property?

3. how should I decide if it is allowed to use "*" for PackageTypeMembers.members property?

 

Best regards,

Konstantin

Hi,

 

I have this method:

    public void testListMetadata() {
        try {
            ListMetadataQuery query = new ListMetadataQuery();
            query.setType("Package");
            double asOfVersion = 26.0;
            // Assuming that the SOAP binding has already been established.
            FileProperties[] lmr = sfd.getMetaConnection().listMetadata(
                    new ListMetadataQuery[]{query}, asOfVersion);
            if (lmr != null) {
                for (FileProperties n : lmr) {
                    System.out.println("Component fullName: " + n.getFullName());
                    System.out.println("Component type: " + n.getType());
                }
            }
        } catch (ConnectionException ce) {
            ce.printStackTrace();
        }
    }

 I assume it should return for me list of the installed packages.

Is it correct assumption?

 

But I have an error:

com.sforce.ws.SoapFaultException: UNKNOWN_EXCEPTION: An unexpected error occurred. Please include this ErrorId if you contact support: 1379208547-383 (1089039615)
	at com.sforce.ws.transport.SoapConnection.createException(SoapConnection.java:205)
	at com.sforce.ws.transport.SoapConnection.receive(SoapConnection.java:149)
	at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:98)
	at com.sforce.soap.metadata.MetadataConnection.listMetadata(MetadataConnection.java:160)


I've debugged inside and saw that at transport level I have http error 500 Internal Server Error

 

 How to solve it?

Where to create ticket for SF team to investigate this issue?

Hi,

 

I have a task to retrieve all metadata from SF account.

So I should use Metadata API.

 

As I understood I need to implemet this algorithm:

1. call describeMetadata() to get all types for the given account

2. for each type I have to call listMetadata() to get properties for each type recieved in first step.

3. from the data of the step 2 I can build parameters for retrieve() method for unpackaged types.

 

So my questions are:

1. Is it correct approach in general?

2. how to get installed packages to initialize RetrieveRequest.packageNames property?

3. how should I decide if it is allowed to use "*" for PackageTypeMembers.members property?

 

Best regards,

Konstantin