1

I have parsed out the Partner WSDL into the methods that I need and everything works and is functioning fine EXCEPT:

The DescribeSObjectResult.fields - CLASSNAME.Field[] has a property named scale.

public Integer scale;
private String[] scale_type_info = new String[]{'scale','urn:partner.soap.sforce.com',null,'1','1','false'};

Now, I can access Scale from the apex controller just fine. The property is defined with the standard {get;set;} and is public. I cannot access any other properties on the Visualforce Page from the Field class either despite them being available in the controller and being able to debug the values in the controller.

Here is a test if anyone has as Partner WSDL parsed:

public class test_this{

    public WSDL_Partner_Soap.Field fld {get;set;}
        public test_this(){

                fld = New WSDL_Partner_Soap.Field();
                fld.name = 'Test Field';
                fld.soapType = 'xsd:double';
                fld.precision = 3;
                fld.scale = 2;
                fld.length = 10;
                fld.nillable = false;
                fld.createable = true;


        }


    }

Here is the page that will not save as it says

"Unknown property '(namespaceremoved).WSDL_Partner_Soap.Field.scale'"

<apex:page controller="test_this">


{!fld.scale}

</apex:page>

Attempts at using output text, TEXT(), using java messaging format to format it, etc.

Anyone have an idea of how to display this value on a visualforce page?

Additional Details:

  1. I can display the entire classname.Field class on the page.
  2. I put a Map map on the controller and populated it with values when accessing it by {!field_map[f.field_name].scale I get the error Unknown property 'namespaceremoved.WSDL_Partner_Soap.Field.length' so I know it is accessing it but it cannot see down to the property value for some reason. WSDL class is public as well as the field class and the property. ugh
1

Your fld has public getter but the fields in that class - don't. Modify your parsed WSDL to include something like

public Integer scale {get; private set;}

You are able to display whole property because you have a freebie toString() from Object class but that's it. It's up to you how you want to expose the rest.

  • doh... something so simple.... I will give it a try but I believe that it will work as expected based on your answer. I can't believe what stumps us sometimes.... Its the little things! – Eric Apr 15 '14 at 6:14
  • I've stumbled across it myself 2 years ago ;) I've consumed the WSDL, happily sent out a correct request, received the response, debug log shows it ok... why doesn't it want to appear on the page! – eyescream Apr 15 '14 at 15:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.