Temp Deliver for IBF, Part One!

xiaoxiao2021-03-05  29

While Using A Template with Empty Elements, Structure Is Organized As Follows:

-Metadata scopes

-ENTITIES

-Views

-Menu Item Definition

-Actions

-RELATIONSHIP

-View Locators

-Ports [EMPTY]

-Operations [EMPTY]

-Transformations [EMPTY]

-SChemas [EMPTY]

-Translations [EMPTY]

-Groups [EMPTY]

When we add metadata information, we add 'SayHello' under Metadata Scopes It's reasonable, because we have the web service at.. "Http: //localhost/IBFSimpleSolution/SayHello.asmx" One purpose of the metadata here is for rendering that service (am i using the correct word 'rendering'? Is IT A Right Undering? Not for Sure, But I think so for now

Remember in the IBFSimpleSolution, we defined a Friend class and a GreetingMessage class. They seems to be in the equal level, but here, they belongs separately, Friend in Entity and GreetingMessage in View. Why? In my point of View, there is misunderstanding . here As I illustrated above, what we're going to render here is the service represented by "http: //localhost/IBFSimpleSolution/SayHello.asmx", instead of the classes we created at the server side (we can take that. AS A Reference, As IT May Reperest The Business Objects in Lob, While The Concern Should Be from The Service Aspect

. Ok, one question "why it chooses 'Friend' as an entity and GreetingMessage As the view?" Here is a possible answer of my own Bear in mind that we created one SayHello service with two operations:.. GetGreetingMessage & TestGetGreetingMessage The second ONE IS for Testing, So Let's Focus on The First One. Let's See The Definition of getGreetingMessage.

Public GreetingMessage getGreetingMessage (Friend Afriend) {...}

The return type is GreetingMessage which is some kind of representation of aFriend. And aFriend is of Friend type which is the LOB oject in this case. Because a "Friend" object will be used as the starting point for invoking IBF Services. And The name of the friend can also be used to build a greeting message. Optionally, the name of the friend can be used to decide the type of message to be returned. How about the GreetingMessage Views? In the "Greeting Service" application, each Friend entity would have a greeting message associated with it. Hence, we shall define a view named "GreetingMessage". So the relationship between entity and view seems a little bit clear. Does it means that this kind of structure interprets the input and output direction of a Procedure (Service Operation)? What is the truth? don't know yet. Later Research SHOULD BE FOCUSED ON More About The Term Such as 'Entity', 'View', etc .for now, We've Already Know That, in The 'Sayhello' Metadata Scope (Which IS Used for RENDERING THE Service), We Have The 'Friend' As Our Entity, and 'GreetingMessage' As The View of 'Friend'. What else do we know? Nothing.

IT DOESN'T Mean Anything IF WE JUST Stop Here. We Even Don't Know What "Friend" and "GreetingMessage" Are. We need do something more 13/64 ', it Says "The next Step is to create Port elements to store the XML Schema definition for the Friend Entity and the GreetingMessage View. "So, here, one question again." what is a port? What does port really mean? "It's quite intuitive that when you want to input something, you should use the 'port', and if you want to get something, you should use the 'port'. Both 'ports' are standardized. It looks quite reasonable to think of 'port' like this, but is it really true? I am not sure. Let's check it later. for now, I just assume that the 'FriendPort' must be filled with an object which suits for the schema definition. And from the 'GreetingMessagePort', there must be a GreetingMessage object Qulified by Related Schema Definition. But it doesn't mean That the 'Friendport' and 'GreetingMessageport' Already Have Set Up ome kind of relationships between 'Friend' entity and 'GreetingMessage' View for their similar names. I think you can also call them 'port1' and 'port2'. Let's see later if they would be binded or connected.

Now, as the reference illustrated, we need to set up the Schema elements corresponding to each of the ports created above. I was always wondering why we still need to create schema elements if we already have the schema definition for ports. Truly, you can see that, the schema definitions of ports are referenced in the schemas elements which means they are not duplicated information. But still why? Why do we need that? I'll think about it later. (Oh, gush. I see it now. After you define the schema elements, we set up the 'Friends' DefaultReferenceSchemaName to the newly defined element. that's something like binding, and it's logically true because, there should be a binding. Imagine that there is a service. Of course, the operation Parameter's Type Should Be Bound with The Parameter Itself. That Makes Sense. Got it! contlution, Schema Elements Are Anting as a binding role.

All Right, Now, As the Author Said in The Reference, "At this Stage

Virtual

Information

Bridge connecting office applications to our web service ". Let's make a rev fore. We've Already GOT.

1. Entity and View (Reference By The Service Operation)

2. Ports (How to Access Entities and Views)

3. schema element (not dup, but for what are we going to use it? Binding! And contrarily, if we have schema, why do we use ports storing schema definition there? Is it something about the 'direction'? Input? Output Maybe. Also binding

4. Binding 'Entity' and ITS Type Using Schema, And The Same To 'View'

And ... .Yes. I think that's the information we need to describe the service. So, now we have the outline the metadata structure which is suitable for describing and holding the service information.Till now. I think all that mentioned above is about how IBF Organizes The Metadata in The Rendering Level. (How It Describes a 'Service', 'Service Function', A 'Procedure', Something Like a Container

Next, I Will Say Something About The Metadata Organization In The Operational Level (As I Name IT).

Now, we already have the container (the metadata in the rendering level), I do not know if it locates at the client side or the server side. I think the metadata I've mentioned till now locates at the client side, here Is A Sample Diagram for That. What Will The Server Side Metadata (Or Metadata Service) Look Like? I Wondred.

Ok, let's move on I remember in Java When you've got a web service It's something like the URI:... "Http: //localhost/HelloWorldService/HelloWorld.WSDL" After you import the service, you can create a. new service instance in your code to access the operations that are provided within the service And here in IBF solution, there is a similar way to access the service provided in the URI.. "http: //localhost/IBFSimpleSolution/SayHello.asmx" You NEED TO CREATE A Port for That (Something Similar with the service instance in java).

When you get the service in the port, now it's time for you to define the desired operations. In this case, it is the GetGreetingMessage operation. Oh, My Gush! I made a mistake. Here, the operation GetGreetingMessage is still used for describing the service. In java, when you create a new service instance (eg. myService), you can directly call directly 'myService.GetGreetingMessage'. In IBF (at least here), things are a little bit different. you need to define an operation and bind it with the service operation which is represented using the SOAP Action.All right, now, I can say that, we have already well prepared for describing the service. Can I now call it as the 'Rendering level' now? Probably ... ..

转载请注明原文地址:https://www.9cbs.com/read-34398.html

New Post(0)