NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Using flat XML to fake SOAP Server


Joined: 13 Aug 2004
Posts: 5
Reply with quote
I'm building an application within a 'Black Box'.
Because of this, I can not connect to the SOAP server that this application will eventually be connecting to. Instead, I have a flat SOAP formated XML file that I will be using as my test data.

My question is this: Can I some how fake a SOAP server by connecting to this file (which contains the SOAP XML data).

Perhaps something like this?
Code:

require_once('nusoap.php');
$soap = new soapclient("SOAPXML/Response_Pass.xml")
...


What would go next?
All I'm looking to get back is the Array of data called from $soap->call() ... however I'm not sure what I should put in the CALL data, as all I have is the XML data at this time.

Suggestions?
View user's profileFind all posts by mikehummelSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
what is "flat SOAP formated XML" ?
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Example of xml


Joined: 13 Aug 2004
Posts: 5
Reply with quote
Code:

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <env:Header/>
    <env:Body env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <m:authenticationTransactionResponse xmlns:m="http://netview.demo.com/transact/">
            <transaction-response xmlns:n1="java:com.demo.hawaii.integration" xsi:type="n1:transaction-response-type">
                <result xsi:type="n1:result-type">passed</result>
                <transaction-number xsi:type="xsd:long">5008154</transaction-number>
                <accounts-transaction-id xsi:type="xsd:string">434343434</accounts-transaction-id>
                <verbose-details xsi:type="n1:verbose-details-type">
                    <information soapenc:arrayType="n1:information-type[1]">
                        <information-type xsi:type="n1:information-type">
                            <code xsi:type="n1:information-code-type">original-request</code>
                            <simple-detail soapenc:arrayType="n1:simple-detail-type[1]">
                                <simple-detail-type xsi:type="n1:simple-detail-type">
                                    <text xsi:type="xsd:string">Original request = iCheck</text>
                                </simple-detail-type>
                            </simple-detail>
                            <complex-detail soapenc:arrayType="n1:complex-detail-type[0]"/>
                        </information-type>
                    </information>
                    <error soapenc:arrayType="n1:error-information-type[0]"/>
                    <failed soapenc:arrayType="n1:failed-information-type[0]"/>
                    <passed soapenc:arrayType="n1:passed-information-type[1]">
                        <passed-information-type xsi:type="n1:passed-information-type">
                            <code xsi:type="n1:passed-type">passed</code>
                            <simple-detail soapenc:arrayType="n1:simple-detail-type[1]">
                                <simple-detail-type xsi:type="n1:simple-detail-type">
                                    <text xsi:type="xsd:string">The individual has passed the
                                        requested verification process.</text>
                                </simple-detail-type>
                            </simple-detail>
                            <complex-detail soapenc:arrayType="n1:complex-detail-type[0]"/>
                        </passed-information-type>
                    </passed>
                    <questions-detail soapenc:arrayType="n1:questions-detail-information-type[0]"/>
                </verbose-details>
            </transaction-response>
        </m:authenticationTransactionResponse>
    </env:Body>
</env:Envelope>
View user's profileFind all posts by mikehummelSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
hmm Sad , if you want to call SOAP server using such packets you don't need nusoap at all. Nusoap is a library that lets you forget about writing such packets. With Nusoap the envelopes themselves are created on the fly, of course.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 13 Aug 2004
Posts: 5
Reply with quote
ddmitrie wrote:
hmm Sad , if you want to call SOAP server using such packets you don't need nusoap at all. Nusoap is a library that lets you forget about writing such packets. With Nusoap the envelopes themselves are created on the fly, of course.


Well, once this project has been "put together", I will have access to the soap connections. Right now I don't have access to the soap server, I only have this "soap xml" stream. Can I fake a soap server request using this soap xml?
View user's profileFind all posts by mikehummelSend private message
Using flat XML to fake SOAP Server
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic