Desktop version

Main > Forum > 1C:Enterprise Platform > Studying 1C:Enterprise platform > Adding WebService to 1C:SB

Forum

Search UsersRules
Adding WebService to 1C:SB
#1
Just came
Points:: 0
Joined:: Oct 9, 2012

Hi,

I did a SOA for a webpage and like to learn how to send data to the SOA from 1C:SB.
So I study the developer guide chapter 17 and how to do - but if I understand right the meaning is that an external user can request data from 1C, isn't it?

I need to send a post from 1C:SB to my own SOA - how can I do this?

Thanks

Andre

Profile
#2
Active user
Points:: 0
Joined:: Sep 26, 2012

I can show my example
I have working WSDL, then I do next script

Code
lUser = ""; 
lPass = "";

Definition = New WSDefinitions("http://10.20.1.1/csp/test/test.web.Orders.CLS?WSDL=1", lUser, lPass);
//if you dont have pass to service then
//Definition = New WSDefinitions("http://10.20.1.1/csp/test/test.web.Orders.CLS?WSDL=1");

Service = New WSProxy(Definition, "http://some.ru/ens", "Orders", "OrdersSoap");
Service.User       = lUser; // if your service have pass
Service.Password    = lPass;
       
// send data to service
Response = Service.postOrder("SomeData");

//where
//"http://some.ru/ens" - Namespace URI
//"Orders" - at wsdl service name
//"OrdersSoap" - at wsdl port name

Profile
#3
Just came
Points:: 0
Joined:: Oct 9, 2012

Thanks but maybe you can help me to also do a static way for?
I can add the service at common->WS-reference what works fine.


How can I create a new instance for the object?
I mean something like: mySOA = New Result = New VM_Categories.VM_CategoriesSOAP();

Thanks

Andre

Profile
#4
Active user
Points:: 0
Joined:: Sep 26, 2012

I think like so

Code
Service  = WSReferences.WSReference1.CreateWSProxy("http://some.ru/ens", 
                                     "VM_Categories", "VM_CategoriesSoap");

result = Service.GetAllCategories();

// where "http://some.ru/ens" is Namespace URI of Package at Data model

Profile
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)



© 1C LLC. All rights reserved
1C Company respects the privacy of our customers and visitors
to our Web-site.