1c mobile, where to implement webservice?

Discussions regarding 1C:Enterprise for mobile devices with Android, iOS, or Windows Phone.

#1
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Jan 13, 2015
Company:

Thank you for your answer! I got codes that I need from there. But, there is occured another question. The question is whether i must implement the webservice part (homework3) in the real server or mobile part. (As i guess, server side must be.) So, what is the answer? And, What should i do on my next steps after that?

 
#2
People who like this:0Yes/0No
Active user
1C:Professional
Rating: 8
Joined: Jun 25, 2013
Company: 1C Company

Hello,

The web service settings described in the book are implemented in Designer mode on your server (your PC can be a server for the example).

Let me know which part of Homework 3 caused difficulties so I can help you

1C Company support team
 
#3
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Jan 13, 2015
Company:

Hello, thank you for your help and interest. Now, I am at below point

Code
1.row     Address = "http://78.186.69.132/1C_DB/tr_TR/ws/ws1.1cws?wsdl";
2.row   Definitions = New WSDefinitions(Address);
3.row   URI = "http://localhost/ws1";
4.row   Proxy = New WSProxy(Definitions, URI, "WebExchange", "WebExchangeSoap");
   
5.row   Proxy.User = "Hüseyin TEMUR";
6.row   Proxy.Password = "xxxxxxxx";

 When I start the exchange command(that is explained also in homework3) an error occurs at 2. row. I am trying to connect the server at out ip (that is what I have to implement). What should I place to 1st and 3rd  row? When I connect from outside, will there be a problem on 3rd row?

 
#4
People who like this:0Yes/0No
Active user
1C:Professional
Rating: 8
Joined: Jun 25, 2013
Company: 1C Company

Hello,

In the example described in the book the mobile device and the server should be in the same network.
Does your device in the same network? If it does, provide us with details on the error you ran into.

"http://78.186.69.132/1C_DB/tr_TR/ws/ws1.1cws?wsdl"
This line is the WSDL file location to get the web service definitions from. Check whether you can obtain it through your browser, for example.

"http://localhost/ws1"
This is a namespace described in your configuration (see page 183 of the book), you can find out more about namespaces at http://en.wikipedia.org/wiki/Namespace
There will be no problem with this line in case of outside connection.

1C Company support team
 
#5
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Jan 13, 2015
Company:

Hello, it still gives the error on 2nd row. It says that "User confirmation can not be done" and it is right. To Access the database, when you enter this web address it asks your username and password. But, I can not find any property related to username and password.

 WSDefinitions has 3 properties, but none of them is related to username and password. So, how can i implement this confirmation?

 
#6
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Jan 13, 2015
Company:

I added this row but still can not confirm the user.

Code
Definitions = New WSDefinitions(Address,"username","password");

 
#7
People who like this:0Yes/0No
Active user
Rating: 4
Joined: Sep 1, 2014
Company: Smart ID Dynamics

Code
WSDLLocation = "http://78.186.69.132/1C_DB/tr_TR/ws/ws1.1cws?wsdl"; 
NamespaceURI = "http://localhost/ws1"; 
WSName = your web service name (ex: "Service" - see xml in browser to get web service name); 
WSPortName = your web service port name (ex: "Port" - see xml in browser to get web service port name); 
WSUser = "Hüseyin TEMUR"; 
WSPassword = "xxxxxxxx"; 

WSDefinition = New WSDefinitions(WSDLLocation, WSUser, WSPassword); 
WS = New WSProxy(WSDefinition, NamespaceURI, WSName, WSPortName ); 
WS.User = WSUser; 
WS.Password = WSPassword;

 
#8
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Jan 13, 2015
Company:

Thank you for joining Marius, but it also does not work. I could not go next step of these 2 lines. How can I learn my webservice name and port name in detail? As I think, webservice name must be given name on the server and no idea about port, does port get a random number on working time?

 
#9
People who like this:0Yes/0No
Active user
Rating: 4
Joined: Sep 1, 2014
Company: Smart ID Dynamics

Open the web service address in browser and search in the XML for name and namespace.
I think the address is incorrect "http://78.186.69.132/1C_DB/tr_TR/ws/ws1.1cws?wsdl" , "ws1.1cws" part I think.

 
#10
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Jan 13, 2015
Company:

Hello, I got some more helps and almost solved this problem, it was about publishing on the web. After publication, I reached and saw xml files.

 Now, I have one more problem. There are 2 different applications. 1st application is a 1c application and the 2nd is my mobile application. My mobile application will be the mobile version of 1st applications one part. So, when i try to exchange data between 2 application, it gives error. The error is said to be about different attributes fields of 2 applications. I tried writeattribute function, but unsuccessful, is there any idea or help about this?

 I get "xml data convertion error".

Edited: huseyin temur - Apr 08, 2015 05:59 AM (correction)
 
#11
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

Hello, huseyin temur!

This means that data that you send between applications contain objects that are not found in the target database, or they are found, but their attributes do not match same attributes in the source application. Try to compare and merge configurations to see the differences.

 
#12
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Jan 13, 2015
Company:

Hello, I am a bit improved. I compare docs, catalogs, accuregisters, inforegisters and then try to write attributes. While writing attributes, I am trying to write standart fields of docs, catalogs, etc... But it always gives error at the second row row.

   
        1st row ---> While CanReadXML(XMLReader) Do

2nd ---->        Data = ReadXML(XMLReader);
                                   ..
                                    .
                                    .

How can I compile step by step at server side? I think server side compilation will be solution.

 
#13
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

You can set a break point and see what it in the XML file. You also can see an offset in the XML file if there is an error reading it.

 
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.