• RichardQ
  • NEWBIE
  • 25 Points
  • Member since 2013

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

One of my SF users has set the mandatory state on a custom field.

But when I export the enterprise WSDL file, that column, though correctly typed, has a minOccurs="0".

<element name="Prospective_Target__c" nillable="true" minOccurs="0" type="xsd:double"/>

As a consequence, my mapper hasn't got the all the rules it needs to enforce this rule automatically.

Setting minOccurs="1" maxOccurs="1" is a very easily understood pattern, and especially on a simple element.

Is this something that could be done?

Conversly, because the WSDL files say the column is NOT mandatory in any descernible way, it shouldn't reject content in the way it now does. Hmm. Yeah, I know that's pushing things a bit, but I hope you can see the point.

I'm new on here, so is there anything else I need to ask to get some resolution on this?

Hi.

 

I've just started with the SalesForce SOAP service using PHP. I have a WSDL2PHP translation tool which produces a set of classes (structures and service layer) and this has always worked for the simpler services (and not so simple) I've needed to interact with.

 

What I'm having trouble with is arrays in SOAP.

 

My request currently looks like this.

 

<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
                   xmlns:ns1="urn:enterprise.soap.sforce.com"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <SOAP-ENV:Header>
        <ns1:SessionHeader>
            <ns1:sessionId>**************************************</ns1:sessionId>
        </ns1:SessionHeader>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body>
        <ns1:create>
            <ns1:sObjects>
                <Lead xsi:type="ns1:Lead">
                    <AcceptedEventRelations />
                    <ActivityHistories />
                    <AnnualRevenue />
                    <AttachedContentDocuments />
...
                    <UndecidedEventRelations />
                    <Website />
                    <fieldsToNull />
                    <Id />
                    <type>Lead</type>
                </Lead>
                <ns1:Lead xsi:type="ns1:Lead">
                    <AcceptedEventRelations />
                    <ActivityHistories />
                    <AnnualRevenue />
                    <AttachedContentDocuments />
...
                    <UndecidedEventRelations />
                    <Website />
                    <fieldsToNull />
                    <Id />
                    <type>Lead</type>
                </ns1:Lead>
            </ns1:sObjects>
        </ns1:create>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

 

But I'm getting an error.

 

<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
                  xmlns:sf="urn:fault.enterprise.soap.sforce.com"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body>
        <soapenv:Fault>
            <faultcode>sf:INVALID_TYPE</faultcode>
            <faultstring>INVALID_TYPE: Must send a concrete entity type.</faultstring>
            <detail>
                <sf:InvalidSObjectFault xsi:type="sf:InvalidSObjectFault">
                    <sf:exceptionCode>INVALID_TYPE</sf:exceptionCode>
                    <sf:exceptionMessage>Must send a concrete entity type.</sf:exceptionMessage>
                    <sf:row>-1</sf:row>
                    <sf:column>-1</sf:column>
                </sf:InvalidSObjectFault>
            </detail>
        </soapenv:Fault>
    </soapenv:Body>
</soapenv:Envelope>

 

I'm not a SOAP expert, so I'm probably missing something REALLY obvious.

 

Once I can work out what I'm supposed to create, I can then use that as a pattern for all of the arrays.

 

Is the expected to route to always use stdClass and then cast them via SOAPVar/SOAPParam?

 

Anything useful would be appreciated.

 

Regards,

 

Richard.

Hi.

One of my SF users has set the mandatory state on a custom field.

But when I export the enterprise WSDL file, that column, though correctly typed, has a minOccurs="0".

<element name="Prospective_Target__c" nillable="true" minOccurs="0" type="xsd:double"/>

As a consequence, my mapper hasn't got the all the rules it needs to enforce this rule automatically.

Setting minOccurs="1" maxOccurs="1" is a very easily understood pattern, and especially on a simple element.

Is this something that could be done?

Conversly, because the WSDL files say the column is NOT mandatory in any descernible way, it shouldn't reject content in the way it now does. Hmm. Yeah, I know that's pushing things a bit, but I hope you can see the point.

I'm new on here, so is there anything else I need to ask to get some resolution on this?

Hi.

 

I've just started with the SalesForce SOAP service using PHP. I have a WSDL2PHP translation tool which produces a set of classes (structures and service layer) and this has always worked for the simpler services (and not so simple) I've needed to interact with.

 

What I'm having trouble with is arrays in SOAP.

 

My request currently looks like this.

 

<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
                   xmlns:ns1="urn:enterprise.soap.sforce.com"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <SOAP-ENV:Header>
        <ns1:SessionHeader>
            <ns1:sessionId>**************************************</ns1:sessionId>
        </ns1:SessionHeader>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body>
        <ns1:create>
            <ns1:sObjects>
                <Lead xsi:type="ns1:Lead">
                    <AcceptedEventRelations />
                    <ActivityHistories />
                    <AnnualRevenue />
                    <AttachedContentDocuments />
...
                    <UndecidedEventRelations />
                    <Website />
                    <fieldsToNull />
                    <Id />
                    <type>Lead</type>
                </Lead>
                <ns1:Lead xsi:type="ns1:Lead">
                    <AcceptedEventRelations />
                    <ActivityHistories />
                    <AnnualRevenue />
                    <AttachedContentDocuments />
...
                    <UndecidedEventRelations />
                    <Website />
                    <fieldsToNull />
                    <Id />
                    <type>Lead</type>
                </ns1:Lead>
            </ns1:sObjects>
        </ns1:create>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

 

But I'm getting an error.

 

<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
                  xmlns:sf="urn:fault.enterprise.soap.sforce.com"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body>
        <soapenv:Fault>
            <faultcode>sf:INVALID_TYPE</faultcode>
            <faultstring>INVALID_TYPE: Must send a concrete entity type.</faultstring>
            <detail>
                <sf:InvalidSObjectFault xsi:type="sf:InvalidSObjectFault">
                    <sf:exceptionCode>INVALID_TYPE</sf:exceptionCode>
                    <sf:exceptionMessage>Must send a concrete entity type.</sf:exceptionMessage>
                    <sf:row>-1</sf:row>
                    <sf:column>-1</sf:column>
                </sf:InvalidSObjectFault>
            </detail>
        </soapenv:Fault>
    </soapenv:Body>
</soapenv:Envelope>

 

I'm not a SOAP expert, so I'm probably missing something REALLY obvious.

 

Once I can work out what I'm supposed to create, I can then use that as a pattern for all of the arrays.

 

Is the expected to route to always use stdClass and then cast them via SOAPVar/SOAPParam?

 

Anything useful would be appreciated.

 

Regards,

 

Richard.

Am having issues with SOAP callout. Was supplied a WSDL but am unsure exactly how to make the callout. Looking for help ASAP. Willing to pay $300 for probably a 10 minute call/webEX.