【问题标题】:Soap xml for Paypal API SetMobileCheckout (rolling my own objective-c request)Paypal API SetMobileCheckout 的 Soap xml(滚动我自己的 Objective-C 请求)
【发布时间】:2010-10-21 11:52:41
【问题描述】:

我这里有通用结构:

 <?xml version=”1.0” encoding=”UTF-8”?> 
<SOAP-ENV:Envelope xmlns:xsi= ”  http://www.w3.org/2001/XMLSchema-instance” 
    xmlns:SOAP-ENC=”http://schemas.xmlsoap.org/soap/encoding/” 
    xmlns:SOAP-ENV=”http://schemas.xmlsoap.org/soap/envelope/” 
    xmlns:xsd=”http://www.w3.org/2001/XMLSchema”   
    SOAP-ENV:encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/” 
><SOAP-ENV:Header> 
    <RequesterCredentials xmlns=”urn:ebay:api:PayPalAPI”> 
        <Credentials xmlns=”urn:ebay:apis:eBLBaseComponents”> 
            <Username>api_username</Username> 
            <Password>api_password</Password> 
            <Signature/>     
            <Subject/> 
        </Credentials> 
    </RequesterCredentials> 
</SOAP-ENV:Header> 
<SOAP-ENV:Body> 
    <specific_api_name_Req xmlns=”urn:ebay:api:PayPalAPI”> 
        <specific_api_name_Request> 
            <Version xmlns=urn:ebay:apis:eBLBaseComponents”>service_version 
            </Version> 
            <required_or_optional_fields xsi:type=”some_type_here”>                data 
            </required_or_optional_fields> 
        </specific_api_name_Request> 
    </specific_api_name_Req> 
</SOAP-ENV:Body> 
</SOAP-ENV:Envelope>

我需要的具体调用(SetMobileCheckout 和 DoMobileCheckoutPayment)是here

我正在路上。但我在 Objective-c 中滚动我自己的 xml 请求,我正在努力确保我做对了。

有没有人有真实请求的实际示例?

如果它被包裹在 Objective-C 中,那就是额外的好处,但只是裸 xml 会很棒。

谢谢, 科里

【问题讨论】:

    标签: iphone objective-c xml soap paypal


    【解决方案1】:

    我最终解决了这个问题。

    您可以在 HTTP POST 中使用 NVP。这在 iPhone 上要容易得多。不知道为什么我的 SOAP 响应一直被拒绝,但继续下去太费时了。

    在寻找我的答案时,我确实遇到了 gSoap,这可能对其他人有所帮助。我只需要提出 2 个请求,所以我不想专注于学习该框架。

    我也遇到了wsdl2objC,不幸的是,它现在不能在 iPhone 上运行(数据类型问题)。

    【讨论】:

      【解决方案2】:

      这是一个使用 NVP 的 HTTP POST 请求的链接:

      Has anyone implemented the PayPal API through a native iPhone app?

      【讨论】:

        猜你喜欢
        • 2016-04-18
        • 2012-11-05
        • 2014-05-22
        • 2018-07-06
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2012-10-02
        相关资源
        最近更新 更多