cancel
Showing results for 
Search instead for 
Did you mean: 

Problem Creating an ABAP Proxy based on a WSDL which uses extensions.

Former Member
0 Kudos

Hi all,

I'm trying to create an Asset in Salesforce using ABAP.

I can generate the ABAP Proxy OK, (from the SalesForce Enterprise WSDL I created) but the Asset definition does not exist.

I think my issue stems from the fact that the SalesForce WSDL uses extension elements for the definition of Asset.

I found the following notes on the extension element

516072 - XI Proxy Generation (not really for abap)

1386239 - Extention of complex type containing xsd:any (this is close but we are on SAP BASIS Release 70 701 not 702

Threads which talks about extension element not supported.

Threads which talks about how to modify the WSDL

(but this is using xmlspy which I don't have and the instructions aren't clear to me)

What I'm really looking for is

1) Any Notes which I could apply in a basis 701 environment to enable creating abap proxies from wsdl with extension elements

2) Any tips on how to modify my WSDL to remove the extension elements yet still offer the same functionality (i.e. I need to use the create function with a sobject of Asset (which is currently defined via an extension.

3) Anyone who has integrated with SalesForce to create SalesForce objects (Accounts, Assets, etc) either tips on how to modify the WSDL or sample ABAP code as to how you got around the missing extension elements.

Regards,

John

Accepted Solutions (1)

Accepted Solutions (1)

prateek
Active Contributor
0 Kudos

1) Any Notes which I could apply in a basis 701 environment to enable creating abap proxies from wsdl with extension elements

I doubt that it is supported yet.

2) Any tips on how to modify my WSDL to remove the extension elements yet still offer the same functionality (i.e. I need to use the create function with a sobject of Asset (which is currently defined via an extension.

XML Spy is a free tool, at least the trial version. Use it and try to remove the tags as suggested by Udo in the link.

Regards,

Prateek

Answers (1)

Answers (1)

rb
Active Participant
0 Kudos

Hi John,

couldn´t you post a section from your wsdl file which includes the type definition with an extension?

I think you could remove the extension an copy all elements from the type definition which is extended into the new type definition.

Here an example that you get the idea:

<xsd:complexType name="PERSON"> 
        <xsd:sequence> 
           <xsd:element name="firstName" type="xsd:string"></xsd:element> 
           <xsd:element name="lastName" type="xsd:string"></xsd:element> 
           <xsd:element name="ageInYears" type="xsd:int"></xsd:element> 
           <xsd:element name="weightInLbs" type="xsd:float"></xsd:element> 
           <xsd:element name="heightInInches" type="xsd:float"></xsd:element> 
        </xsd:sequence> 
     </xsd:complexType> 

     <xsd:complexType name="femalePerson"> 
        <xsd:complexContent> 
           <xsd:extension base="typens:PERSON" > 
           <xsd:element name="favoriteLipstick" type="xsd:string"></xsd:element> 
           </xsd:extension> 
        </xsd:complexContent> 
     </xsd:complexType>

is going to be ->

<xsd:complexType name="PERSON"> 
        <xsd:sequence> 
           <xsd:element name="firstName" type="xsd:string"></xsd:element> 
           <xsd:element name="lastName" type="xsd:string"></xsd:element> 
           <xsd:element name="ageInYears" type="xsd:int"></xsd:element> 
           <xsd:element name="weightInLbs" type="xsd:float"></xsd:element> 
           <xsd:element name="heightInInches" type="xsd:float"></xsd:element> 
        </xsd:sequence> 
     </xsd:complexType> 

     <xsd:complexType name="femalePerson"> 
           <xsd:element name="firstName" type="xsd:string"></xsd:element> 
           <xsd:element name="lastName" type="xsd:string"></xsd:element> 
           <xsd:element name="ageInYears" type="xsd:int"></xsd:element> 
           <xsd:element name="weightInLbs" type="xsd:float"></xsd:element> 
           <xsd:element name="heightInInches" type="xsd:float"></xsd:element> 
           <xsd:element name="favoriteLipstick" type="xsd:string"></xsd:element> 
     </xsd:complexType>

Save your changes to a local file and use this to generate your proxy.

Bye Richard