#181 HTTP/1.1 400 Bad Request

0.71
closed-rejected
Martin Kutter
WSDL (18)
5
3 days ago
2012-06-21
Sohail Salehi
No

I'm trying to get transaction id from a WSDL serveice as follow:

my $service = SOAP::Lite
-> service('https://sec.paymentexpress.com/pxf/pxf.svc?wsdl');

my @details = SOAP::Data->name('tranDetail'=>\SOAP::Data->value(SOAP::Data->name("amount" => 2.75)->type('xs:string'),
SOAP::Data->name("currency" => 'AUD'),
SOAP::Data->name("txnType" => 'Purchase'),
#SOAP::Data->name("enableAddBillCard" => 'false'),
SOAP::Data->name("returnUrl" => 'http://asapweb3.webhost.co.nz:8000/billing/customer/4ea5e37ccd8bbf14b701f348'),
SOAP::Data->name("txnRef" => 115893)));

my $request = (SOAP::Data->value(SOAP::Data->name('username'=>'myUserName'),
SOAP::Data->name('password'=>'myPassword'),
SOAP::Data->name('TransactionDetails'=>@details)));
my $result = $service->GetTransactionId($request);

as you see it is a complex data type that I'm sending.

But I receive 400 bad request all the time.

I'm 100% sure that request that I'm sending is correct:

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy"
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://paymentexpress.com"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
xmlns:wsa10="http://www.w3.org/2005/08/addressing"
xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract"
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex"
soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" >

<soap:Body>
<tns:GetTransactionId>
<username xsi:type="xsd:string" >myUserName
</username>
<password xsi:type="xsd:string" >myPassword
</password>
<tranDetail>
<amount xsi:type="xsd:int" >2
</amount>
<currency xsi:type="xsd:string" >NZD
</currency>
<txnType xsi:type="xsd:string" >Purchase
</txnType>
<enableAddBillCard xsi:type="xsd:int" >0
</enableAddBillCard>
<returnUrl xsi:type="xsd:anyURI" >http://asapweb3.webhost.co.nz:8000/billing/customer/4ea5e37ccd8bbf14b701f348
</returnUrl>
<txnRef xsi:type="xsd:int" >115893
</txnRef>
</tranDetail>
</tns:GetTransactionId>
</soap:Body>

</soap:Envelope>

can anyone help me please?
Thank you very much.

Discussion

  • Martin Kutter
    Martin Kutter
    2012-06-22

    • status: open --> open-rejected
     
  • Martin Kutter
    Martin Kutter
    2012-06-22

    This is a usage question, not a bug. Please direct questions to the mailing list or the Yahoo SOAP::Lite forum.

     
  • Martin Kutter
    Martin Kutter
    2012-06-22

    • status: open-rejected --> closed-rejected