Skip to main content

There is a service object type in the api of XML. When you create a smart object, there is no xml type. If you have a service object of type xml and map it to a smart object, it becomes a type of text. Has anybody actually used this xml type?

What I was hoping I could do was return an xml document from a smart object and place it in an xml field. Perhaps I'm trying to do this the wrong way. Any advice would be appreciated. 

Hmm, I could have written that better. There is a service object *property* type, SoType.Xml that I am trying to understand. What .net type would you expect that to map to?

The Service Object Property type of XML allows to the schema of that XML field to be mapped to specific fields within a SmartObject.  Attached is a screensho that shows how the single XML property of the ServiceObject can be used to map to multiple SmartObject properties.  This dialog basically captures the xpath the the desired element/attribute within the XML.

 


10958iB1C09DE34C42A3D6.jpg

Thanks! I had just heard about this last week. The still unknown part to me is related to the schema. The service object can set a return type of xml that the smart object I can use as you show here. But apparently, it requires a schema to work correctly.


Any idea where you set that schema?


The schema is defined within the Service Broker.  Since this means the service broker must know about what it is that is being exposed it more than likely requires a custom service broker.  Off the top of my head, I can't think of any out of the box K2 blackpearl service brokers that use the XML type.  However, the K2 connect for SAP service broker does (K2 connect for SAP is an addon product to blackpearl).

Right, I am guessing there is an api call to set the schema in serviceassemblybase somewhere, but I haven't found it yet.

Same problem here man. I guess practically you can't do this.


Read the post http://www.k2underground.com/blogs/blackpointtipsandtricks/archive/2009/04/01/using-the-reference-event-wizard.aspx


There you find a place where it says....


Note:  The Reference Event Wizard only supports simple data types (integer, string, Boolean, etc)  Data sets and other complex structures cannot be used as input/output parameters.


I guess K2 can do only simple type binding. You can't send or receive complex data types.


I too tried the same schema binding process and repeatedly failed.


 sriwantha sri aravinda


With regards to the ServiceObject XML type within custom servicebrokers, DavidL has posted an project on blackmarket that shows how this can be leveraged:

 

http://k2underground.com/k2/ProjectHome.aspx?ProjectID=101

 


Reply