Solved

how do I post two vars to a SOAP web service? What do I need to know in order to proce

Posted on 2004-04-15
15
295 Views
Last Modified: 2013-12-24
What do I need to know in order to process a cfinvoke if this is the approach. Please do no copy and paste the Macromedia user's guide with this tag. I have that. I need to be sure what's the best tag I can use:  cfhttp, cfinvoke, or  cfx_rawsocket (custom tag)

How do I use the tag? What do I need from the other end?
0
Comment
Question by:gaby22
  • 7
  • 6
  • 2
15 Comments
 
LVL 6

Expert Comment

by:PE_CF_DEV
ID: 10836080
What service are you trying to use? What are they returning once you query that service? Does that service have a valide WSDL?
0
 

Author Comment

by:gaby22
ID: 10836302

I'm using CF posting to SOAP service. the service has a
http://admin.server01.com/prodwebservice/prodsaleImport.asmx?WSDL


returning var: SubmitProdResponse

0
 
LVL 6

Accepted Solution

by:
PE_CF_DEV earned 500 total points
ID: 10836536
Well I couldn't view the WSDL..maybe I am not allowed to access it? But I would assume you would use the invoke tag like this:

<cfinvoke    webservice = "http://admin.server01.com/prodwebservice/prodsaleImport.asmx?WSDL"   
method = "operation_name"  
NameoifVar1=valuesofVar1
NameofVar2=var2
 returnVariable = "the name you want to reference">

Cfinvoke is the best way to consume a webservice. Some webtools though like USPS don't provide a nice WSDL so you would have to use cfhttp. I don't know why you would want to use something else unless the webservice requires some wierd transport protocol or something.

as for the method name...this would be the part I would have gotten from the WSDL, it would be the serivce/function/method you want to use...a WSDL could house more than one operation like a calculator webservice where you could call add or subtract as the method with 2 varabiles being sent number1=2 and number2 = 2 and it would add  them together and return 4 or subtract  and return 0, depending on the value I put in method. If I need to explain something more let me know.
0
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 
LVL 1

Expert Comment

by:MediaStorm
ID: 10837544
CFInvoke should work for most applications. CFHTTP is also an option if you can't / don't want to use invocation (IE- Non-MX version of CF)
For stuff that is a bit more esoteric like the UPS XML stuff you will need to use a socket tag or the java factory in MX 6.1. CFHTTP will not work with UPS.

Also, if you are trying to invoke a .NET service from CFMX, you need to make sure you have updated to MX 6.1 to make it work properly.
0
 
LVL 6

Expert Comment

by:PE_CF_DEV
ID: 10841688
You can use cfhttp to send info to UPS and USPS.
0
 

Author Comment

by:gaby22
ID: 10842693
Thank you PE_CF_DEV ..very clear answer
0
 
LVL 1

Expert Comment

by:MediaStorm
ID: 10843139
PE_CF_DEV-

I'd love to see a working example of using CFHTTP in CFMX to post and retrieve results to the UPS XML service using CFHTTP. Not the UPS HTML server, the UPS XML server. Since no one else has been able to do it to date,  I'd like to see what magic you can display to make it work using CFHTTP.

USPS yes, UPS HTML yes, UPS XML no. I think you might be have jumped into the deep end of the pool making this claim. Prove me wrong and I will give you 500 points as well.
0
 
LVL 6

Expert Comment

by:PE_CF_DEV
ID: 10843412
Build your XML request and just send it like this to UPS:

<cfhttp url="https://wwwcie.ups.com/ups.app/xml/Rate" method="post">
      <cfhttpparam name="Content-Type" type="HEADER" value="content-type: text/xml; charset='UTF-8';">
      <cfhttpparam type="body" value=#upsxml#>
</cfhttp>
0
 
LVL 6

Expert Comment

by:PE_CF_DEV
ID: 10843618
Sorry I had to modify some code so it would work on a public server. But here is a link you can use to see the UPS code in action:

http://www.thewayjg.com/showups.html
0
 
LVL 1

Expert Comment

by:MediaStorm
ID: 10843869
Off-Topic:

PE_CF_DEV-

What is your average response time back from the UPS server for tracking results? The rate lookup example from your link has a very quick return for rate info. For tracking we're seeing a huge lag from UPS in the neighborhood from 2,500 ms to over 15,000+ ms and anywhere in between.

Ping times between us and them are good and the delay appears to simply be waiting on query results from their server.

The responses were considerably faster in the past but I was curious if anyone else was seeing lags in tracking results as well.

I'll check out your CFHTTP code and let you know how I fair. We've been using a java factory object to do the RAW posts per Macromedia's recommendation but I would prefer to simplify it and use only CFHTTP if possible.

Thx.
0
 
LVL 6

Expert Comment

by:PE_CF_DEV
ID: 10843941
Well in all our testing the page has a load time of about 650-730 milliseconds.  USPS is slower sometimes due to thier bloated response for international shipping with all the restrictions, prohibitions, and disclaimers. I am actually in the process right now building our completed Shipping Matrix which will utlimately quote rates for UPS USPS and FedEx (FedEx if I get time), as a query bean which will then be displayed to our customers.
0
 
LVL 1

Expert Comment

by:MediaStorm
ID: 10844023
Wow-

We're not seeing tracking query responses anywhere close to those ranges. We're not getting anything back from tracking in under 2 seconds. We don't use the rate queries currently as rate queries are done locally on our backend via the ERP on the AS/400 so I didn't have anything to compare tracking results with.

If you're getting UPS tracking back in those timeframes then something is definately weird on our end and I need to start digging around to find the cause.

I'm measuring the query response times using a getTickCount() before and immediately after the post to UPS so it's likely network related. I'll try the same code off of a different network and let you know if I see a difference.
0
 
LVL 6

Expert Comment

by:PE_CF_DEV
ID: 10844138
Humm I have not setup the tracking information yet I would imagine it is slightly slower. But Amazon uses UPS online tools to display tracking on thier website If I recall and they don't seem to have slow page times... I will look into it later if i get a chance.
0
 
LVL 1

Expert Comment

by:MediaStorm
ID: 10844176
I'd be interested in what you find. I just tried it from a completely different server on a completely different network and got similar results.

I'll try a rate inquiry for comparison as well.
0
 
LVL 1

Expert Comment

by:MediaStorm
ID: 10844581
PE_CF_DEV-

I checked the rate inquiry vs tracking inquiry and I am indeed getting rate results back in the sub 600ms range so the delay is definately on the UPS end.

Also, I promised you 500 points for demonstrating UPS XML working with CFHTTP and I'm happy to eat me words. I'll post a question to get your points to you.

The last attempt I made at trying to get CFMX to work with UPS XML still had problems due to the SSL layer and would always return the invalid request message from UPS. I'm glad to see that MM finally got that resolved and everything is in good order now.

Look for a question post from me in a few minutes to get your points to you.
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Hosting a website using port 443 SSL CA using Wampserver 2 How to: 6 53
website does not load without www 12 73
file too large for website 6 70
Forbidden errors 5 142
Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question