views:

964

answers:

3

I have the generic structure here:

 <?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>

The specific calls (SetMobileCheckout and DoMobileCheckoutPayment) I need are here

I'm well on my way. But I am rolling my own xml request in objective-c and I I'm trying to make sure I get this right.

Has anyone got an actual example with a real request?

Bonus if it is wrapped in objective-C, but just naked xml would be great.

Thanks, Corey

A: 

I eventually went around the problem.

You can use NVP in a HTTP POST. This was munch easier on the iPhone. Not sure why my SOAP response kept getting rejected, but it was too time consuming to keep going.

In search for my answer, I did run across gSoap, which may help others. I just needed to make 2 requests, so I didn't want to get wrapped up in leaning that framework.

I also ran across wsdl2objC, unfortunately, it is not working on the iPhone right now (Data Type issues).

Corey Floyd
A: 

Here is a link to the HTTP POST request which uses NVP instead:

http://stackoverflow.com/questions/779423/has-anyone-implemented-the-paypal-api-through-a-native-iphone-app/850940#850940

Corey Floyd
A: 

Try to follow this link . I believe it would help you.

It's very simple to understand. The link has very simple flow & easy variable names

http://helpmesolve.blogspot.com/

sugar