Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8913179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:23:38+00:00 2026-06-15T04:23:38+00:00

I am attempting to process a SOAP response from First Data’s Global Gateway. I’ve

  • 0

I am attempting to process a SOAP response from First Data’s Global Gateway. I’ve used SoapClient before, but there is no wsdl – and the company says they do not supply one.

I’ve tried various other approaches such as SimpleXMLElement based on examples found here and in the PHP manual but I can’t get anything to work. I suspect namespaces are part of my problem. Can anyone suggest an approach or point me to a similar example – my Google efforts have been fruitless to date.

Using PHP 5.

Partial SOAP Response (with all the HTML header stuff that precedes it stripped off) looks like this:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">

<SOAP-ENV:Header/>

<SOAP-ENV:Body>

<fdggwsapi:FDGGWSApiOrderResponse xmlns:fdggwsapi="http://secure.linkpt.net/fdggwsapi/schemas_us/fdggwsapi">

<fdggwsapi:CommercialServiceProvider/>

<fdggwsapi:TransactionTime>Thu Nov 29 17:03:18 2012</fdggwsapi:TransactionTime>

<fdggwsapi:TransactionID/>

<fdggwsapi:ProcessorReferenceNumber/>

<fdggwsapi:ProcessorResponseMessage/>

<fdggwsapi:ErrorMessage>SGS-005005: Duplicate transaction.</fdggwsapi:ErrorMessage>

<fdggwsapi:OrderId>A-e833606a-5197-45d6-b990-81e52df41274</fdggwsapi:OrderId>
...

<snip>

I also need to be able to determine if a SOAP fault was signalled. XML for that looks like this:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<SOAP-ENV:FaultX>
<faultcode>SOAP-ENV:Client</faultcode>
<faultstring xml:lang="en">MerchantException</faultstring>
<detail>
cvc-pattern-valid: Value '9999185.00' is not facet-valid with respect to pattern '([1-9]([0-9]{0,3}))?[0-9](\.[0-9]{1,2})?' for type '#AnonType_ChargeTotalAmount'.
cvc-type.3.1.3: The value '9999185.00' of element 'v1:ChargeTotal' is not valid.
</detail>
</SOAP-ENV:FaultX>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Using Mr. Code’s answer I have been able to retrieve the data from the non-fault responses. But I need to determine what type of packet I am dealing with and extract data from both types. It would be so much easier if only they would supply a wsdl!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T04:23:39+00:00Added an answer on June 15, 2026 at 4:23 am

    Your response can be parsed with SimpleXML, here’s an example. Notice I am passing the namespace URL to children() to access the elements.

    $obj = simplexml_load_string($xml);
    
    $response = $obj->children('http://schemas.xmlsoap.org/soap/envelope/')->Body->children('http://secure.linkpt.net/fdggwsapi/schemas_us/fdggwsapi')->FDGGWSApiOrderResponse;
    
    echo $response->TransactionTime . "\n";
    echo $response->ErrorMessage;
    

    Outputs

    Thu Nov 29 17:03:18 2012
    SGS-005005: Duplicate transaction.

    Codepad Demo

    Edit: The SoapFault response can be parsed like below. It outputs the fault string and details, or ‘No fault found’:

    if($obj->children('http://schemas.xmlsoap.org/soap/envelope/')->Body->children('http://schemas.xmlsoap.org/soap/envelope/') && isset($obj->children('http://schemas.xmlsoap.org/soap/envelope/')->Body->children('http://schemas.xmlsoap.org/soap/envelope/')->children()->faultcode))
    {
        $fault = $obj->children('http://schemas.xmlsoap.org/soap/envelope/')->Body->children('http://schemas.xmlsoap.org/soap/envelope/')->children();
    
        // soap fault
        echo $fault->faultstring;
        echo $fault->detail;
    }
    else
    {
        echo 'No fault found, do normal parsing...';
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm attempting to start a process from a piece of code but I want
I am attempting to call two_byte_proc(payload,offset) from within process() but it does not write
Attempting to use the data series from this example no longer passes the JSONLint
I'm attempting to process the body of an HTTP PUT request, but it seems
In the process of attempting to convert my previously singleton-based-global-controller classes to more OOP
I am attempting to push updates into a process via a named pipe, but
Can't think any way but with ksh/perl, so powershell is annoying. Attempting to process
I am attempting to create a singleton service that is used to process incoming
I'm attempting to get the date of a creation of a process, but since
I'm in the process of attempting to port some code across from PC to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.