EldoS | Feel safer!

Software components for data protection, secure storage and transfer

SOAPAction does not match an operation

Also by EldoS: RawDisk
Access locked and protected files in Windows, read and write disks and partitions and more.
#32110
Posted: 02/05/2015 06:26:37
by Krzysztof Koralewski (Standard support level)
Joined: 10/15/2014
Posts: 8

I have Delphi XE5 with BlackBox 12.0.266. I'm sending SOAP message
Code
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:ns="http://www.mf.gov.pl/schematy/DI/UslugiUBD/2013/11/05">
   <soap:Header/>
   <soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <ns:WyslijDokumentZbiorczyPytanie>
         <ns:Dokument>PD94bWwgdmVyc2lvbj0iM ... 25hdHVyZT4=</ns:Dokument>
      </ns:WyslijDokumentZbiorczyPytanie>
   </soap:Body>
</soap:Envelope>

I get an error "The given SOAPAction https://test-ubd.mf.gov.pl/uslugi/dokumenty does not match an operation.". The same is with BB 12.0.265. I tested SOAP ver 1.1 and ver 1.2.

With BB 12.0.263 for SOAP ver 1.2 I get an error too, but with ver 1.1 everything is OK.

My Delphi code is:
Code
SOAPClient := TElXMLSOAPClient.Create(nil);

SOAPClient.SOAPPrefix  := 'soap';
SOAPClient.SOAPVersion := SOAP_v1_2;

SOAPClient.AddStringParameter('Dokument', 'http://www.mf.gov.pl/schematy/DI/UslugiUBD/2013/11/05', DataToSend));

SOAPClient.OperationName         := 'WyslijDokumentZbiorczyPytanie';
SOAPClient.OperationNamespaceURI := 'http://www.mf.gov.pl/schematy/DI/UslugiUBD/2013/11/05';

SOAPClient.MessageNamespaces.AddNamespace('ns', 'http://www.mf.gov.pl/schematy/DI/UslugiUBD/2013/11/05');

SOAPClient.GenerateMessage;
SOAPClient.SOAPMessage.Envelope.CreateHeader;

SOAPClient.HTTPClient := HTTPSClient;
SOAPClient.URL        := 'https://test-ubd.mf.gov.pl/uslugi/dokumenty';
SOAPClient.SOAPAction := 'https://test-ubd.mf.gov.pl/uslugi/dokumenty';

SOAPClient.SendMessage;

FreeAndNil(SOAPClient);


Can you help me, please.
Regards
Krzysztof Koralewski
#32111
Posted: 02/05/2015 06:41:15
by Dmytro Bogatskyy (EldoS Corp.)

Thank you for contacting us.

Quote

I get an error "The given SOAPAction https://test-ubd.mf.gov.pl/uslugi/dokumenty does not match an operation.". The same is with BB 12.0.265. I tested SOAP ver 1.1 and ver 1.2.

With BB 12.0.263 for SOAP ver 1.2 I get an error too, but with ver 1.1 everything is OK.

Are you sure that you need to set SOAPAction header?
Please try to remove "SOAPClient.SOAPAction := ..." line.
In the build 263 there was a bug that a SOAPAction header wasn't included in the request for SOAP v1.1, so this explains why it worked for you for version 1.1

P.S. Usually the Webservice URL and SOAPAction doesn't match, for example see the sample at: https://www.eldos.com/forum/read.php?F...ssage31520
#32112
Posted: 02/05/2015 07:05:06
by Krzysztof Koralewski (Standard support level)
Joined: 10/15/2014
Posts: 8

Thank you very much for very quick answer. I removed "SOAPClient.SOAPAction := ..." line. Now it works with all my version of BlackBox (12.0.263, 265,266) with any SOAP message version.

Thanks a lot.
Krzysztof Koralewski

Reply

Statistics

Topic viewed 1972 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!