How to pass a document format between wm.io and IS?

Situation: I have a flowservice in webmethods.io and I want it to call an on-premise service passing a document as a parameter. The document has a lot of nested fields, so recreating its format field-by-field is simply out of question. A formal XML schema is not provided in the design specification. I know it is possible to create a document using a sample of data in XML or JSON form, but I can’t rely on the data being complete - if a particular slice I try contains a null value for some field, that field won’t be recognized. Is there a way to extract an XML Schema straight from document’s description in webmethods.io?

Thanks.

I can see that existing documents can be “Exported from server” generating an XML-based description:

<?xml version="1.0" encoding="UTF-8"?>

<Values version="2.0">
  <record name="record" javaclass="com.wm.util.Values">
    <value name="node_type">record</value>
    <value name="node_subtype">unknown</value>
    <value name="node_nsName">****************</value>
    <value name="node_pkg">*********</value>
    <value name="node_comment">generated by webMethods</value>
    <value name="is_public">false</value>
    <value name="field_name">********</value>
    <value name="field_type">record</value>
    <value name="field_dim">0</value>
. . .

I might be able to generate a necessary document description in the same format… but I don’t see a way to put it back into IS to make an actual use of it.

A number of different ways.
via an embedded call in your service pub.flow:restorePipelineFromFile

or when running your service in Designer

you can load the file via the load or “load and replace”. Note the “save” button can be used to create a file based on your inputs, useful if you don’t want to have to enter them each time or create some test data.

The service monitor can also export a file of the same format if you have chosen to audit the pipeline input as part of your audit settings.

regards,
John.

1 Like

You’re talking about input pipeline data. I’m interested about document definitions. There’s no “save” nor “load” buttons.

docinp2

oh sorry,
you need to use the service

pub.schema:createXSD

and give it the name of the document type for which you want a schema. It will include all of the attribute constraints too if they have been set.

regards
John.

Again, I’m not sure we understand each other properly. As far as I can tell, pub.schema:createXSD is used to create a schema for a document on Integration Server. What I want is to take a description of the document created in webmethods.io and create an identical document on IS. I fail to find anything xsd-related on wm.io, though.

Oh I’m sorry I didn’t realise that you had created the document type in webMethods.io, not Designer.
Unfortunately the createXSD service is not exposed in webMethods.io and so the only thing I could recommend is that in the future you create the document type in Designer and then import in to webMethods.io.

I will share this information with the Product Manager to see how we can streamline this going forward.
John.

Thank you. It would be much simpler if I was the one creating the documents, but the problem is that data comes from external sources, so not everything is possible.

I found a work around, not perfect but it works. If you created a document type then you can do the following.

  1. Go to the project where you have your document and simply export any flow service that you have defined, doesn’t matter if it references the document type or not.

  1. Open the resulting zip file, see my example

You should find an entry named pkg…zip

That’s a webMethods package with all your flow/document type assets. You can drag that to the /IntegrationServer/instances/default/replicate/inbound directory of your Integration Server.

  1. Import the package via the IS admin page under packages → management → install inbound release.

  2. Now go to Designer, right click in the package navigator and choose refresh.

  3. You should now see the package and be able to navigate to the Document Type e.g.

I would recommend copying the document type to a package and folder of your own choosing.

John

1 Like

That worked! Thank you.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.