Adding WebService to 1C:SB

Understanding basics of 1C:Enterprise platform. To start working with 1C:Enterprise platform visit Getting started page

#1
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Oct 9, 2012
Company: Net Lap Consulting GmbH

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

 
#2
People who like this:0Yes/0No
Active user
Rating: 7
Joined: Sep 26, 2012
Company: individual

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

 
#3
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Oct 9, 2012
Company: Net Lap Consulting GmbH

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

 
#4
People who like this:0Yes/0No
Active user
Rating: 7
Joined: Sep 26, 2012
Company: individual

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

Edited: ivan avdonin - Feb 07, 2013 04:35 PM
 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.