Welcome to the "trac"-ing site of soap4r!
[soap4r] [httpclient] [openpgp4u] [pkcs1] [logger] [csv] [vtr]

Ticket #176 (closed enhancement: fixed)

Opened 3 years ago

Last modified 1 year ago

simpleContent + attribute extension

Reported by: nahi Assigned to: nahi
Priority: high Milestone: 1.5.6
Component: wsdl4r Version: 1.5
Keywords: Cc:

Description

#49 only supports simpleContent + restriction.

        <xs:complexType name="BasicAmountType">
                <xs:simpleContent>
                        <xs:extension base="xs:string">
                                <xs:attribute name="currencyID" type="ebl:CurrencyCodeType" use="required"/>
                        </xs:extension>
                </xs:simpleContent>
        </xs:complexType>

Original posting follows:

Hi,

Now the any element seems to work for the request! it looks like this:

<?xml version="1.0" encoding="utf-8" ?>
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <env:Header>
        <RequesterCredentials
xmlns:n1="urn:ebay:apis:eBLBaseComponents"
            env:mustUnderstand="0"
            xmlns="urn:ebay:api:PayPalAPI">
          <n1:Credentials>
            <Password>monkey69</Password>
            <Subject></Subject>
            <Username>william_api1.digital-tunes.net</Username>
          </n1:Credentials>
        </RequesterCredentials>
  </env:Header>
  <env:Body>
    <SetExpressCheckoutReq xmlns="urn:ebay:api:PayPalAPI">
      <SetExpressCheckoutRequest
xmlns:n2="urn:ebay:apis:eBLBaseComponents">
        <n2:Version>2.0</n2:Version>
        <n2:SetExpressCheckoutRequestDetails>
          <n2:OrderTotal>500</n2:OrderTotal>
          <n2:ReturnURL>http://apinamix.net</n2:ReturnURL>
          <n2:CancelURL>http://apinamix.net</n2:CancelURL>
        </n2:SetExpressCheckoutRequestDetails>
      </SetExpressCheckoutRequest>
    </SetExpressCheckoutReq>
  </env:Body>
</env:Envelope>


But now the paypal response complains that the OrderTotal is missing  :( 

I think this is because the OrderTotal element should be like this:

<OrderTotal currencyId="EUR">500</OrderTotal>

but at the moment the ruby generated class BasicAmountType simply
extends string, so I'm not sure how I should set the currencyId? Maybe
I am missing something obvious...


Thanks!

Change History

11/06/05 22:54:12 changed by nahi

  • status changed from new to closed.
  • resolution set to fixed.

(In [1663]) suppor simpleContent + attribute extension. closes #176.

06/01/07 17:36:38 changed by nahi

  • type changed from defect to enhancement.