Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

soap question

Guest
Jul 02, 2009 Jul 02, 2009

hello,

          i am trying to create a program which access a soap webservice. but i don't have wsdl served by the server service. now i have to build the soap head/message etc and access. can some one give me an soap example...

i am trying to understand how soap is different then wsdl. i never worked with web service other than wsdl.

another questions is if have wsdl can i save that in a file and use to access a server for webservice which will not serve wsdl....

am i getting confused ??

1.8K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 02, 2009 Jul 02, 2009

Uh huh, you're getting confused. 

WSDL is the Web Service Description Language ... a formal (and rather insufferably over-engineered) formal description of what a web-service consists of:  how to call it, what to say to it, and what it can say in response.  It is, if you will, a formal description of the service's API.

See:  http://en.wikipedia.org/wiki/Web_Services_Description_Language

Now, meanwhile, what is "SOAP?"  Well, SOAP is the mechanics of how the call actually takes place:  it's the physical process of building the text of the request that you send, and of interpreting the response that you receive.

If you do not have a WSDL, you really do want to get one, because that will make your code much less dependent on their code.  As long as they keep the WSDL up-to-date when they change their code, it will enable your code to "automatically adapt" to those changes without buggering you at a very-inconvenient hour of the night.

If you absolutely do not have WSDL information and absolutely cannot get it, then yes, you can construct a SOAP-message that matches what "you know" to be correct, and you can interpret the response, as long as whatever documentation they provide to you is actually correct and up-to-date... (of course it is... of course it is...).  Ahem.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 06, 2009 Jul 06, 2009

let me tell you what is my issue is clearly.

1.i have milsoft product called multispeak (multispeak.com) where i have to access soap to do some transcations.

2. i don't have wsdl served by the server ( i am sure about this) but the company can send me a xsd/wsdl. ( i am not sure where they get this one)

3. NOW can i save this wsdl on my server some place or use it any way to access the service on milsoft server.

4. if that is not going to work i need to build soap code. so i need a working example......can some one post it.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jul 06, 2009 Jul 06, 2009

Yes, having a local copy of the WSDL and pointing ColdFusion to that

copy will work.

Mack

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 07, 2009 Jul 07, 2009

how can i invoke that. can you point me to some syntax...thanks,.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jul 07, 2009 Jul 07, 2009

The CF developer guide chapter on web services is a good place to find

examples on how to invoke web services.

Mack

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 08, 2009 Jul 08, 2009

mack_,

       developer guide does not provide this what i am talking about. can you point me to a exmaple or post it if you have one...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 08, 2009 Jul 08, 2009
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 08, 2009 Jul 08, 2009

It is very easy for there to be conflicts between SOAP and non-SOAP requests, and the first page of a Google search for "ajax soap xmlhttprequest" gives excellent pages which describe the issues and also how to address them.

It is advisable that any one URL handle only one type of request.  You can, of course, map two subdomain names to the same server, and your browser will be none the wiser.  To the browser (which is all that really matters here), the two streams are clearly distinct since they are going to different places. Otherwise you run into the obvious problem that messages in the "wrong" format will wind up in the hands of code that does not know what to do with it.

Within your own "hand-crafted" application you can work-around issues like these, but obviously, you're using ColdFusion and you want to be as "lazy" as you possibly can be.  Keep the requests clearly separate from the browser's point-of-view and you should be fine.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jul 08, 2009 Jul 08, 2009

If you're having the issue in that blog post it means your having

problems publishing a web service. Your original question was

referring to consuming a web service as far as I can tell.

You can get better answers if you define your problem better (one of

my personal favorites :

http://catb.org/esr/faqs/smart-questions.html#beprecise).

Mack

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 08, 2009 Jul 08, 2009

no, i think it is very clear. i am not creating anything to publish. i am trying to consume what is already there some where. my issue is different only because i don't have a WSDL served by server. instead i got wsdl from the company which is hosting that server. now that's why i am asking how can store wsdl locally and point it to host server and communicate...that's all my issue is. since most of the webservice work i did till today had WSDL served by server so i just used cfinvoke. Now can you just clarify is this possible or not. since i am not sure. can we store wsdl and use to access a web service some where else...or not. if yes i want to know the syntax. that's all..thanks. and sorry for the con FUSION ....

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jul 08, 2009 Jul 08, 2009
LATEST

Did you try pointing the cfinvoke tag to the local file ? (local file

means the wsdl file as served by an HTTP server, I don't think it will

work with an URL like file:///c:/test.wsdl)

Mack

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 07, 2009 Jul 07, 2009

All that you ultimately need is ... the WSDL.  Some services furnish their own WSDL but most do not, because in practice they just don't change and so it's a waste of bandwidth.  The WSDL file, however you get it and however you provide it to ColdFusion, is what you need to make short work of talking to the service.

The WSDL is, quite simply, a formal definition of the service's API:  what messages can be sent, with what parameters, and what to expect in reply.  It serves as a formal grammar, if you will, for interacting with this particular service.  It allows you to write much less code (basically, "don't leave home without it!!") because the WSDL succinctly provides a great deal of information.  (It also allows ColdFusion et al to recognize when you have made an error, or when the remote service has just barfed in your general direction.)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Jul 08, 2009 Jul 08, 2009

http://www.morgankelsey.com/post/consuming-a-webservice-a-local-wsdl

What I found from a Google Search:

http://www.google.com/search?q=coldfusion+web+service+local+wsdl

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources