Jose, $lb() holds STORED values of you object instance. If your opened instance modified property(ies) then I see no point of looking into stored data, just serialize you IN-MEMORY values to JSON.

On the other hand, if a process A opened and modified instance of the object and without saving and you want to serialize the same instance from process B, then again, there is no difference between opening an object instance or using some custom serialization directly from stored data.

It is not good practice anyway to keep objects opened for a long time without saving their new values.

lastly, my comment about JSON array was that JSON array doesn't need to know the name in the name:value pair so you can easily write a custom JSON serializer to serialize directly $lb() into JSON array.

 

 

maybe I missed your original business case need, can you explain why current implementation is not good enough for you?

Safeena,

you do not invoke web methods directly. You need to create a client class by consuming a WSDL file that your service exposes. There is a wizard that guides you through the process of client creation. Apart to client class itself the wizard also generates all data types used by a web service. Please consult documentation here.

There are some other option when using Ensemble but I suggest you follow the link above.

Thomas,

Hope I understood your question correctly, if not then let me know.

In general, when dealing with XML VDoc documents (files), you need to create a production that uses services based on

EnsLib.EDI.XML.Service.FileService, operations based on EnsLib.EDI.XML.Operation.FileOperation and a routing process - EnsLib.MsgRouter.VDocRoutingEngine. There is no need to do any coding, just supply parameters in the production diagram.

You may need to provide DocSchemaCategory setting for a service, for this, you need to import the XML Schema, using Import button at Ensemble->Interopeate->XML->XML Schema Structures page.

for actual routing, you need to design a rule, and supply path to the document element/attribute that's used to decide where the rule sends document to. I prefer using XPATH expressions for this.

An example of routing rule contents is here:

<ruleDefinition alias="" context="EnsLib.MsgRouter.VDocRoutingEngine" production="tzp.dasta.router.Production">
<ruleSet name="" effectiveBegin="" effectiveEnd="">
<trace value="Document.{/dasta/is/ip/lo/loi/@material}"></trace>
<rule name="">
<constraint name="source" value="Dasta3Zadanka"></constraint>
<constraint name="msgClass" value="EnsLib.EDI.XML.Document"></constraint>
<constraint name="docCategory" value="ds030101"></constraint>
<when condition="Document.{/dasta/is/ip/lo/loi/@material}=&quot;B&quot;">
<send transform="" target="Dasta3Biochemie"></send>
<return></return>
</when>
<otherwise>
<send transform="" target="Dasta3Mikrobiologie"></send>
<return></return>
</otherwise>
</rule>
</ruleSet>
</ruleDefinition>

You can create a VDOC document from a persistent (any, not only persistent) object, as long as it extends also from %XML.Adaptor. First, you serialize your object instance to XML stream or string, and then using ImportFromString/ImportFromLibraryStream (or other - see online reference for EnsLib.EDI.XML.Document class) method you instantiate a VDoc document.

HTH.

Dan

May others find it useful:

I created a small dummy java class that implements public static String evaluate() method (with 1 to 5 arguments for my needs), compiled it and made a jar file.

replaced original references to java:com.intersys.xsltgateway.XSLTGateway by my faked ones (Atelier refactor, easy...) in all used XSL stylesheets.

Then I supplied this dummy jar file into a list of external JAR files to the OrangeVolt XSL run configuration. It all worked fine and I eventually received transformed document (with dummy data in places of original isc:evaluate calls).

Just need to remember to put back pointer to original callback handler class before deploying transformation to Cache server.

Thank you all for replies,

a few clarifications:

1. I can run the transformation from Cache, using %XML.XSLT2.Tranformer class (and supplying an instance of Cache callback class), this works fine.

2. when there are no isc:evaluate callbacks in the XSL stylesheet, then Atelier runs transformation fine, too.

So, Jamie is right.

PS: this is not an important issue, but I was looking forward to see Eclipse's user friendly debugger in action. But I can live with that limitation, understanding why it is so.