Tons of thanks Anne. I have finally been told I'm being emailed the WSDL this pm. The reason I could not get hold of it is it was on a https server.
I'll hopefull be able to make some progress when I get it. Many thanks Neil -----Original Message----- From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: 29 August 2003 14:32 To: [EMAIL PROTECTED] Subject: Re: New to SOAP, need help with code Neil, Just to clarify -- the sample client they gave you is MS SOAP, not .NET. (MS SOAP works with VB 6.0; .NET works with VB.NET). Also: there's an error in the sample code in this statement: XMLCardPaymentRequest = "<Request xmlns='http://xxxxx.co.uk'><UserRef>I'm stuck</UserRefe></Request>" Note that <UserRef> and </UserRefe> don't match. Looking at the sample VB client code, I'd say that what you're trying to do is create a SOAP request message that looks like this: <e:Envelope xmlns:e="http://schemas.xmlsoap.org/soap/envelope/"> <e:Body> <Request xmlns='http://xxxxx.co.uk'> <UserRef>I'm stuck</UserRef> </Request> </e:Body </e:Envelope> It's possible that you also may need to include the encodingStyle attribute, in which case the body element would look like this: <e:Body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> And we're not sure if the payload element name is correct. It may need to look like this instead: <UserRefe>I'm stuck</UserRefe>) And then, of course, you need to find out what to expect in the response message. You know it's a string, but you don't know anything else about it. So you have three important questions to ask of the service provider: - does the service uses Document/Literal or RPC/Encoded? - what is the expected input message format? - what is the expected output message format? The best way to get answers to these questions is to get the WSDL file. If they won't give you the WSDL file, then I suspect that they really don't want you to invoke this service. Once you get answers to these questions, I then suggest that you download Apache Axis and use it instead of Apache SOAP. See http://ws.apache.org/axis. Anne At 08:15 AM 8/29/2003 +0100, you wrote: >Hi, I have been given the following example (unfortunately in .NET) that I >need to use via SOAP. > >I have read 2 books Java Web SErvices / Java and XML and spent 11 days >trying to change it but do not even know where to start (I've only been >doing Java etc for 3 months and am learning it all from books) > >I have been told by the people who created the .net version below that the >interface made available is "CardPaymentRequestXML" > >Is there any way someone can help me get this into Apache SOAP please ? Is >there anything else I would need that's not here? > >Many thanks in advance > >Neil > >------------------------------------------------------------------------- >.NET EXAMPLE: > >'Create a reference to the SOAP client object >Dim objSoapClient as SoapClient >Set objSoapClient = New SoapClient > >' String to hold Response [out] >Dim strXMLResponse as string > >' String to hold the complete payment request [in] >Dim XMLCardPaymentRequest as String > >XMLCardPaymentRequest = "<Request xmlns='http://xxxxx.co.uk'><UserRef>I'm >stuck</UserRefe></Request>" > >' Initialise the soap client object with the WSDI, configuration files >Call objSoapClient.mssoapinit >("http://xxxxx.co.uk/CardPaymentInterface.wsdl", "", "", >"http://xxxxx.co.uk/CardPaymentInterface.wsml") > >' call the CardPaymentRequest method >strXMLResponse = objSoapClient.CardPaymentRequestXML(XML,CardPaymentRequest) > >' Parse the returned XML >Dim objXML as FreeThreadedDOMDocument40 >Dim objNode as IXMLDOMNode >Dim strStatus as string > >Set objXML = New FreeThreadedDOMDocument40 >objXML.async = False >objXML.loadXML strXMLResponse >Set objNode = objXML.selectSingleNode("//Status") >If (objNode Is Nothing) = False Then > If Len(objNode.Text) > 0 Then > strStatus = objNode.Text > End If >End If >If strStatus = "0" Then > ' Successful >Else > ' Failed >End If > >--------------------------------------------------------- >Scanning of this message and addition of this footer is performed by >SurfControl SuperScout Email Filter software in conjunction with >virus detection software. >--------------------------------------------------------- --------------------------------------------------------- Scanning of this message and addition of this footer is performed by SurfControl SuperScout Email Filter software in conjunction with virus detection software. --------------------------------------------------------- --------------------------------------------------------- Scanning of this message and addition of this footer is performed by SurfControl SuperScout Email Filter software in conjunction with virus detection software. ---------------------------------------------------------