Create XML Pattern PHP Soap Client

I am trying to get paninfo from a government provided web service. Request sample xml for service is as follow.

<soapenv:Envelope xmlns:soapenv=""
xmlns:pan="" xmlns:typ="">

I have used PHP soap client as follows:

$client = new SoapClient("",array('trace' => 1, 'exceptions' => 0,"cache_wsdl" => 0



$params = new SoapVar("<login><string:userName>xxxxxxxxx</string:userName><string:password>xxxxxxxxx</string:password></login><panNo><string:panNo>xxxxxxxxxx</string:panNo></panNo>", XSD_ANYXML);
$result = $client->GetPanInfo($params);

It generated the following XML pattern

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="" xmlns:ns1="">

In response i got 500 internal server error with empty response.

There is same question on stackoverflow but in ruby on rails. Can any1 help me resolve it in PHP.

Savon create matched XML pattern


The request you send doesn't match the expected format :

  • You are missing the types schema import : xmlns:typ=""

  • Your prefix on 'getPanInfo' should be 'pan' and not ns1

  • the prefix on username and password is not 'string' but 'typ'

  • Same for panNo

Need Your Help

Loopback in Route table

windows-7 vmware routes routed-commands loopback-address

I and working on a project to create a WAN emulator using FreeBDS in a VMWare guest configured to route traffic between the host operating system and its normal gateway router. I plan to modify the