Hello Dann,
> I am still having problems though. If I try call any of the declared > functions, I receieve errors like this. > <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" > xmlns:a="http://www.w3.org/2005/08/addressing"><s:Header><a:Action > s:mustUnderstand="1">http://www.w3.org/2005/08/addressing/fault</a:Action></s:Header><s:Body><s:Fault><s:Code><s:Value>s:Sender</s:Value><s:Subcode><s:Value>a:ActionMismatch</s:Value></s:Subcode></s:Code><s:Reason><s:Text > xml:lang="en-US">The SOAP action specified on the message, '', does not > match the HTTP SOAP Action, > 'http://www.fastenterprises.com/MFET/SubmissionListBySubmis > sionId'. > </s:Text></s:Reason><s:Detail><a:ProblemHeaderQName>a:Action</a:ProblemHeaderQName></s:Detail></s:Fault></s:Body></s:Envelope> > > Her eis the function I am calling > SubmissionWS.GetMFET(false,'',httprio2);SubmissionListBySubmissionId('100') > ; > The problem is that the SubmissionListBySubmissionId('100') function > should have 2 parameters, a Header and the SubmissionID. The '100' that I > have coded in there is the SubmissionID. It appears the the WSDL import > is not properly creating the function.
I assume 'Header' is a SOAP header, not a parameter [part] named 'Header'. If that's the case, Delphi SOAP does not expose SOAP headers in the parameter list. Instead you set the header first and then invoke the method/operation. That's because not all Services/WSDLs describe the headers expected for each operation... and even for the ones that do, the headers are often optional.
I'll check the WSDL you sent later today to see if that's indeed the case [I'm still @home right now]. Also, the namespace of the fault you got back is that of WS-Addressing (http://www.w3.org/Submission/ws-addressing/)... so I have the feeling that this Service might require WS-Addressing support, something Delphi does not support yet. New services explicitly say so via policy declaractions in the WSDL; I'll check for that too.
For how to set headers with Delphi SOAP see ISOAPHeaders. For example:
{code} CredHeader := Credentials.Create; try CredHeader.name_ := 'La Charanga Habanera'; CredHeader.password := 'Esta bueno ya!'; (Service as ISOAPHeaders).Send(CredHeader); {code}
Service above is the interface obtained from a RIO. And Credentials is a TSOAPHeader-derived type (typicall generated when importing the service but for Services that describe their headers via word-of-mouth, it's easy to construct one too).
More later after I look at the WSDL.
Cheers,
Bruneau
> > Here is the declaration: > MFET = interface(IInvokable) > ['{5959790D-89C4-E195-0CF9-C4FC82ADE863}'] > > // Cannot unwrap: > // - Input message has more than one part > // - The output part is not a complex type > function NewSubmission(const SubmissionType: SubmissionType2; const > ReferenceId: ReferenceId; const File_: File_): SubmissionId; stdcall; > > // Cannot unwrap: > // - Input message has more than one part > function SubmissionListByDate(const DateFrom: DateFrom; const DateTo: > DateTo): SubmissionList; stdcall; > > // Cannot unwrap: > // - Input element wrapper name does not match operation's name > function SubmissionListByReferenceId(const ReferenceId: ReferenceId): > SubmissionList; stdcall; > > // Cannot unwrap: > // - Input element wrapper name does not match operation's name > function SubmissionListBySubmissionId(const SubmissionId: > SubmissionId): SubmissionList; stdcall; > end; > > > So what should I try? > DAN