calling my own WebService (access to OrderXml class)

149 views
Skip to first unread message

sha...@web.de

unread,
Aug 12, 2013, 5:09:40 AM8/12/13
to xmpie...@googlegroups.com
Hi,
 
I'd like to call my own WebService after the order received event.
Is there a way to access the OrderXml class? I would prefer to have the XML content as object instead of XmlDocument - that would make the work much easier.
 
Thanks
Sven

Igor

unread,
Aug 14, 2013, 11:56:34 AM8/14/13
to xmpie...@googlegroups.com
There is no OrderXML class .
You can setup a trigger and write your own web service that will get XML based on the configured template. Template can be anything you want and can be used not only get OrderDetails , but lest say you want to know that once order progress from queue to queue you want to know the status ...
it could be that your system need different XML structure so you can using our templates and XSLT convert it to anything you want and add extra details.
First test default XML template and use network or disk destination 
and check that it saves it. 
Than point to your web service , with  default namespaces well has 
method Execute with input XML parameter see below. 
Once it all works you can play and create your own xml template. 
namespace WebService1 

    /// <summary> 
    /// Summary description for Service1 
    /// </summary> 
    [WebService(Namespace = "http://tempuri.org/")] 
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] 
    [ToolboxItem(false)] 
    public class Service1 : System.Web.Services.WebService 
    { 

        [WebMethod] 
        public void Execute(XmlDocument orderXml) 
        { 
            //do something 
- hide quoted text -
        } 

sha...@web.de

unread,
Jan 15, 2014, 3:48:34 AM1/15/14
to xmpie...@googlegroups.com
Hi Igor,

thank you for your reply. Now it's working just fine. I've found out, that the XML is generated through a Stored Procedure. I've written plain C# classes to deserialize the XML to objects. It works pretty good.
But I have another question: Is it sure that the OrderXml contains only ONE order per each WebService call? Or could it be possible that multiple orders are contained in the XML?

Thank you!
Sven

Guillaume Besnier

unread,
Jan 16, 2014, 10:53:38 AM1/16/14
to xmpie...@googlegroups.com
Should there be several ordered products in the same order uStore, the XML document will contain all the relevant information.
But I don't think uStore can merge several separate orders details into one single XML document.



Expéditeur : sha...@web.de
Date de réception : Mercredi, Janvier 15, 2014 9:48AM
Destinataire : xmpie...@googlegroups.com
Sujet : [xmpie-users] Re: calling my own WebService (access to OrderXml class)

 
--
You received this message because you are subscribed to the Google Groups "XMPie Interest Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xmpie-users...@googlegroups.com.
To post to this group, send email to xmpie...@googlegroups.com.
Visit this group at http://groups.google.com/group/xmpie-users.
For more options, visit https://groups.google.com/groups/opt_out.




Ce courrier électronique ne contient aucun virus ou logiciel malveillant parce que la protection Antivirus avast! est active.


Sven Glöckner

unread,
Jan 16, 2014, 11:22:07 AM1/16/14
to xmpie...@googlegroups.com

Hi Guillaume,

 

the Order XML object is created by the dbo.Order_DetailsXML Stored Procedure. It takes a parameter for the number of orders. That means it would theoretically be possible to generate an order XML object that contains multiple orders. But in practice this should not happen. I connected my WebService call to a trigger after an order has been placed in the store.

--
You received this message because you are subscribed to a topic in the Google Groups "XMPie Interest Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/xmpie-users/1yi44hfBpGI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to xmpie-users...@googlegroups.com.


To post to this group, send email to

Igor

unread,
Jan 16, 2014, 12:47:33 PM1/16/14
to xmpie...@googlegroups.com

Order Details XML  triggered once particular order placed in the system is one thing , it will be fired each time new order placed in the system.

Now you can write your own template and get any data you want  and disregard particular order id, but it will call your system numerous of time since it designed to inject or export particular order data.

Now there is different method that called OrderWS.GetLatestOrdersXml  , that once you need to call yourself and it required to check a box in the store advanced setting   "Orders of this store are exportable by API".

I personally do not like this checkbox and would prefer to pass id's of the stores I'm interested , but it seems does what you need.

Igor.

To unsubscribe from this group and all its topics, send an email to xmpie-users+unsubscribe@googlegroups.com.


To post to this group, send email to

Reply all
Reply to author
Forward
0 new messages