Jump to content

Problem with SOAP Request


sam.fortune

Recommended Posts

We are trying to develop a Flight Reservation System. It communicates with a remote server using non-wsdl mode.

The remote server requires a couple of ID's in the header.

 

But whenever we try to connect to this server using the PHP Soap Client, it throws an error showing :-

 

Fatal error: Uncaught SoapFault exception: [sOAP-ENV:Server.Exception:] Error occurred while trying to invoke requested method. in C:\xampp\htdocs\soap\two.php:41 Stack trace: #0 C:\xampp\htdocs\soap\two.php(41): SoapClient->__soapCall('getAvailability', Array) #1 {main} thrown in C:\xampp\htdocs\soap\two.php on line 41

 

 

Please let me know your thoughts on this and some inputs on executing SOAP requests.

 

Thanks in Adv.

 

 

Sam

Link to comment
Share on other sites

Status Update:-

 

Now I have connection the tested ok. In fact the connectivity or response issue I had earlier was because the 'request' xml generated thru my nusoap client (using php) was not in the exact format required by the remote server. I debugged the issue by pasting the samle xml to the remote server bypassing the soap xml generator and it worked!

 

So now, I need help on creating the proper structure of the nusoap generated xml.

 

THE FOLLOWING IS THE DESIRED STRUCTURE:-

 

[syntax=php]<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:xxXXXx" xmlns:ns2="http://xml.apache.org/xml-soap" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

  <SOAP-ENV:Header>

    <ClientId>XXXX-XXXXX</ClientId>

    <CarrierAccount>XX</CarrierAccount>

  </SOAP-ENV:Header>

  <SOAP-ENV:Body>

    <ns1:operation SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

      <input xsi:type="ns1:GetAvailRequest">

        <CAccount xsi:type="xsd:string">0S</CAccount>

        <AQueries xsi:type="ns2:Vector">

          <item xsi:type="ns1:AvailabilityQuery">

            <BTime xsi:type="xsd:string">0000</BTime>

            <DDate xsi:type="xsd:dateTime">2010-10-27T12:00:00Z</DDate>

            <Origin xsi:type="xsd:string">DEL</Origin>

            <Dest xsi:type="xsd:string">BLR</Dest>

            <NumberPass xsi:type="xsd:int">1</NumberPass>

            <Options xsi:type="ns1:FareOption">

              <CCode xsi:type="xsd:string">INR</CCode>

              <BCurrency xsi:type="xsd:string">INR</BCurrency>

            </Options>

          </item>

        </AQueries>

      </input>

    </ns1:operation>

  </SOAP-ENV:Body>

</SOAP-ENV:Envelope>[/syntax]

 

Since there are some complex tags Iam not able to reproduce the exact structure.

 

 

So what I basically want is the manner in which the params should be passed into the nusoap client so as to generate complex multiple noded xml requests.

 

Please help.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.