| View previous topic :: View next topic |
| Author |
Message |
rullbandspelare Pro Scripter
Joined: 23 Mar 2004 Posts: 80
Reputation: 100   Earn Points, Win a T-Shirt
|
Posted: Sun Oct 19, 2008 5:49 am Post subject: SOAP and WSDL interaction? |
|
|
Hi!
I am trying to interact with a WSDL web service.
Is there anyone who have used MS with webservices like this?
I am trying to send a request with HTTPrequest, but I am not sure that it works. Is there anyway to change the HTTP header
My plan is to use cURL if HTTPrequest does not work.
Thanks for ANY input.
Did this message help you? If so please reward the poster with Reputation Points? Reward Points
|
|
| Back to top |
|
 |
mtettmar Site Admin

Joined: 19 Sep 2002 Posts: 4221 Location: Dorset, UK Reputation: 621   votes: 28 Earn Points, Win a T-Shirt
|
|
| Back to top |
|
 |
rullbandspelare Pro Scripter
Joined: 23 Mar 2004 Posts: 80
Reputation: 100   Earn Points, Win a T-Shirt
|
Posted: Sun Oct 19, 2008 9:44 pm Post subject: |
|
|
Cool!
Thanks for the very helpful answer!
The URL in the example did not work. But this one does
I looked a bit in the forum but I am still not able to input/output variables from the VBscript.
This is what I would like to do. Input %IN% to the VBscript and output %OUT%
Did this message help you? If so please reward the poster with Reputation Points? Reward Points
|
|
| Back to top |
|
 |
mtettmar Site Admin

Joined: 19 Sep 2002 Posts: 4221 Location: Dorset, UK Reputation: 621   votes: 28 Earn Points, Win a T-Shirt
|
Posted: Mon Oct 20, 2008 8:15 am Post subject: |
|
|
Make it a function. Pass the value into the function and set the function's result to the output:
And you may also want to remove those MsgBox lines and instead have the function return the error codes. _________________ Regards,
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Please do not email/PM me for private support - post to the forum so that everyone benefits. For private support please send email via our web site.
Did this message help you? If so please reward the poster with Reputation Points? Reward Points
|
|
| Back to top |
|
 |
rullbandspelare Pro Scripter
Joined: 23 Mar 2004 Posts: 80
Reputation: 100   Earn Points, Win a T-Shirt
|
Posted: Mon Oct 20, 2008 9:00 am Post subject: |
|
|
As always: Super fast support!
This support alone is worth the price of MachroScheduler
But....
The example is not working.
Compilation error Microsoft VBScript :1010
Identifier expected
Line 2, Column 21
Did this message help you? If so please reward the poster with Reputation Points? Reward Points
|
|
| Back to top |
|
 |
mtettmar Site Admin

Joined: 19 Sep 2002 Posts: 4221 Location: Dorset, UK Reputation: 621   votes: 28 Earn Points, Win a T-Shirt
|
Posted: Mon Oct 20, 2008 9:41 am Post subject: |
|
|
Ah. IN is a reserved word. So we need to use a different variable name. Try:
_________________ Regards,
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Please do not email/PM me for private support - post to the forum so that everyone benefits. For private support please send email via our web site.
Did this message help you? If so please reward the poster with Reputation Points? Reward Points
|
|
| Back to top |
|
 |
mtettmar Site Admin

Joined: 19 Sep 2002 Posts: 4221 Location: Dorset, UK Reputation: 621   votes: 28 Earn Points, Win a T-Shirt
|
Posted: Wed Oct 22, 2008 1:57 pm Post subject: |
|
|
Just discovered that MSSOAP.SOAPClient does not work under Vista and is no longer supported by Microsoft. Instead you need to use the MsXml2.XMLHTTP and MsXml2.DOMDocument objects. It's a little more complicated, but once you've seen one example the next is easier. First construct the XML, then post it to the service, then parse the XML response:
_________________ Regards,
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Please do not email/PM me for private support - post to the forum so that everyone benefits. For private support please send email via our web site.
Did this message help you? If so please reward the poster with Reputation Points? Reward Points
|
|
| Back to top |
|
 |
rullbandspelare Pro Scripter
Joined: 23 Mar 2004 Posts: 80
Reputation: 100   Earn Points, Win a T-Shirt
|
|
| Back to top |
|
 |
mtettmar Site Admin

Joined: 19 Sep 2002 Posts: 4221 Location: Dorset, UK Reputation: 621   votes: 28 Earn Points, Win a T-Shirt
|
Posted: Sat Oct 25, 2008 6:53 am Post subject: |
|
|
First, I'm not an XML expert so I may be wrong, but in your example Numbers and Characters are attributes not values. A function would return values. If a Soap function returned more than one it would do so like this:
<StripToNumericResult>
<Numbers>1234</Numbers>
<Characters>axdf</Characters>
</StripToNumericResult> _________________ Regards,
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Please do not email/PM me for private support - post to the forum so that everyone benefits. For private support please send email via our web site.
Did this message help you? If so please reward the poster with Reputation Points? Reward Points
|
|
| Back to top |
|
 |
rullbandspelare Pro Scripter
Joined: 23 Mar 2004 Posts: 80
Reputation: 100   Earn Points, Win a T-Shirt
|
Posted: Sat Oct 25, 2008 12:56 pm Post subject: |
|
|
I for sure am no XML expert either.
But in my case the returned result realy is presented in this way in the XML answer.
I have tried some variations like, objXml.getAttribute("value") ,to extract the "123456" from:
StripToNumericResult Numbers="123456" Characters="abcde" />
I am not very good at VB syntax and this i guess, is more of a XML VBscript issue than Machroscheduler issue
Did this message help you? If so please reward the poster with Reputation Points? Reward Points
|
|
| Back to top |
|
 |
mtettmar Site Admin

Joined: 19 Sep 2002 Posts: 4221 Location: Dorset, UK Reputation: 621   votes: 28 Earn Points, Win a T-Shirt
|
Posted: Sun Oct 26, 2008 9:08 am Post subject: |
|
|
It's an MS XML thing. Need to check out the docs at microsoft.com ...
Here:
http://msdn.microsoft.com/en-us/library/system.xml.xmlnode.attributes.aspx
So we can use the attributes property of the node. Something like:
xmlNode = objXml.selectSingleNode("//soap:Envelope/soap:Body/m:StripToNumericResponse/m:StripToNumericResult")
sNumbers = xmlNode.Attributes["Numbers"].Value
sChars = xmlNode.Attributes["Characters"].Value _________________ Regards,
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Please do not email/PM me for private support - post to the forum so that everyone benefits. For private support please send email via our web site.
Did this message help you? If so please reward the poster with Reputation Points? Reward Points
|
|
| Back to top |
|
 |
rullbandspelare Pro Scripter
Joined: 23 Mar 2004 Posts: 80
Reputation: 100   Earn Points, Win a T-Shirt
|
Posted: Tue Oct 28, 2008 7:14 pm Post subject: |
|
|
It did not work. Complaints of the [ and ] . canged to () wich gave some other errors.
Instead i dug it out of the complete XML answer:
Did this message help you? If so please reward the poster with Reputation Points? Reward Points
|
|
| Back to top |
|
 |
|