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

Two different web services component types, same name, different contents

Explorer ,
Jun 15, 2010 Jun 15, 2010

Copy link to clipboard

Copied

I am writing two different web services, "ClientOneOrderIn.cfc?WSDL" and "ClientTwoOrders.cfc?WSDL", for accepting orders based on client requirements.  Both require an array of OrderLines called "Line", so the normal approach is:

    <cfargument name="OrderLines" type="Line[]" required="yes">

and provide the properties of "Line" in file "Line.cfc".

The problem is that the properties (nodes) in "Line" is different for the two web services.

How do I create two files, such as "ClientOneLine.cfc" and "ClientTwoLine.cfc" that contain the distinct sets of properties that will show
up in the WSDL and require XML of the format:


      ...
      <OrderLines>

        <Line>
          ...
        </Line>       
        <Line>
          ...
        </Line>       
      </OrderLines>
      ...

I need the URL for both web services to be the same except for the web service name, so using different folders isn't an option.

Thanks for any help on this!!!

TOPICS
Advanced techniques

Views

437

Translate

Translate

Report

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
LEGEND ,
Jun 15, 2010 Jun 15, 2010

Copy link to clipboard

Copied

To give both services the same url you can put each function into the same cfc file.

Votes

Translate

Translate

Report

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
Explorer ,
Jun 15, 2010 Jun 15, 2010

Copy link to clipboard

Copied

LATEST

They each must have their own URL, differing by just the file name:  two web services are for two completely different clients.

     http://ourdomain/services/clientone.cfc?WSDL

     http://ourdomain/services/clienttwo.cfc?WSDL

That's not the problem.  The problem is that both clientone.cfc and clienttwo.cfc have this in their argument list:

     <cfargument name="OrderLines" type="Line[]" required="yes">

but the nodes in "Line" for the first client is different than for the second client:

If I build a file called "Line.cfc" with the cfproperties for the nodes for the first client, it is wrong for the second client.

I need two different Line.cfc files: one for the first web service and one for the second.  The two web services have to be in the same folder, but the Line.cfc files do not have to be, but I don't know how to get that to work.  How does each of the web services know which subfolder to get their copy of Line.cfc from?!

(Or I need a way to have a ClientOneLine.cfc and ClientTwoLine.cfc that each have the proper cfproperties for their client, but get referenced as "Line")

Since I suspect this is a common need, it is probably simple and it is something I'm just not seeing.

Votes

Translate

Translate

Report

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
Documentation