Results 1 to 6 of 6

Thread: SOAP and Visual Studio 2003 format and Visual Basic .Net

  1. #1
    andrew.smith@ingine.fi is offline Junior Member
    Join Date
    Jun 2010
    Posts
    3

    Default SOAP and Visual Studio 2003 format and Visual Basic .Net

    Hello,

    I am working with a developer who is attempting to use the Sugar SOAP interface using Visual Studio 2003 and Visual Basic .Net and is having a very hard time getting he code to simply connect to the SOAP service.

    The sugar version is 5.5.2

    I work with perl and have had success using the soap lite module so I can confirm that the SOAP service is working.

    He has tried PocketSoap which converts the SugarCrm WSDL description nicely to a Visual Basic
    project but the result is a much older version of the Visual Basic (6.0) and we cannot find filters to convert it to Visual Studio 2003 format and Visual Basic .Net. It could be done by hand but seems awfully big project and has to be redone each time the database definition is changed.

    The Microsoft WSDL to SoapClient Tool it ends in an error message. This error message is below. If you check the created Visual Basic file (koe.vb) you can see that it terminates while it is creating login-SoapMethod

    How are others accessing sugarCRM with Visual Studio 2003 format and Visual Basic .Net? Any advice?

    Best,
    Andrew Smith

    Microsoft (R) WSDL to SoapClient Utility
    [Microsoft (R) Web Services Enhancements, Version 2.0]
    Copyright (C) Microsoft Corporation 1998-2004. All rights reserved.


    An error occurred processing this WSDL. More information:
    System.Exception: Invalid WSDL file from SoapService
    at ClientGen.ClientGen.GetBindingType(ServiceDescript ion desc, OperationBinding op, Boolean isInput)
    at ClientGen.ClientGen.WriteVBOperationBinding(Stream Writer writer, ServiceDescription desc, OperationBinding op)
    at ClientGen.ClientGen.WriteOperationBinding(StreamWr iter writer, ServiceDescription desc, OperationBinding op)
    at ClientGen.ClientGen.WriteClass(StreamWriter writer, ServiceDescription desc, String className, String url, Binding binding)
    at ClientGen.ClientGen.GenerateCode(ServiceDescriptio n desc, String outputFile, XmlSchemas schemas)
    at ClientGen.ClientGen.GenerateCode(String descriptionFile, String outputFile, XmlSchemas schemas)
    at ClientGen.Class1.Main(String[] arguments)


    --------------------------------------

    '------------------------------------------------------------------------------
    ' <autogenerated>
    ' This code was generated by a tool.
    ' Runtime Version: 1.1.4322.2443
    '
    ' Changes to this file may cause incorrect behavior and will be lost if
    ' the code is regenerated.
    ' </autogenerated>
    '------------------------------------------------------------------------------

    Option Strict Off
    Option Explicit On

    Imports Microsoft.Web.Services2
    Imports Microsoft.Web.Services2.Addressing
    Imports Microsoft.Web.Services2.Messaging
    Imports System
    Imports System.Xml
    Imports System.Xml.Serialization

    '
    'InfoVersionComment, WseWsdl2, Version=2.0.3.0, Culture=neutral, PublicKeyToken=26ba029e599ec4f8, RunTime Version: 1.1.4322.2443
    '

    <SoapService("http://www.sugarcrm.com/sugarcrm")> _
    Public Class sugarsoap
    Inherits SoapClient

    Public Sub New()
    MyBase.New(New Uri("http://192.168.0.25/soap.php"))
    End Sub

    <SoapMethod("http://192.168.0.102/soap.php/is_user_admin")> _
    Public Function is_user_admin( request As SoapEnvelope) As SoapEnvelope
    Return MyBase.SendRequestResponse("is_user_admin", request)
    End Function

    Public Function Beginis_user_admin( request As SoapEnvelope, callback As System.AsyncCallback, asyncState As Object) As IAsyncResult
    Return MyBase.BeginSendRequestResponse("is_user_admin", request, callback, asyncState)
    End Function

    Public Function Endis_user_admin( asyncResult As IAsyncResult ) As SoapEnvelope
    Return MyBase.EndSendRequestResponse(asyncResult)
    End Function

    <SoapMethod("http://192.168.0.102/soap.php/login")> _
    Last edited by andrew.smith@ingine.fi; 2010-06-08 at 08:09 AM.

  2. #2
    Angel's Avatar
    Angel is offline Sugar Community Member
    Join Date
    Jul 2005
    Location
    Los Angeles
    Posts
    4,813

    Default Re: SOAP and Visual Studio 2003 format and Visual Basic .Net

    I am not sure I understand what it is you've done in VS, but have you tried adding a Web Reference to the project that in turn points to the Sugar WSDL?

    That's all you normally have to do and then within your code you'd instantiate a Sugar SOAP object and proceed to access its methods.

    You can also try using my .NET wrapper as it simplifies quite a few things required to make the two talk to each other. The link to the download is in my sig.
    Regards,

    Angel Magaņa
    Co-Author: Implementing SugarCRM 5.x (Packt Publishing -- Sept. 2010)
    Blog: http://cheleguanaco.blogspot.com.
    Twitter: @cheleguanaco.

    ________
    | Projects: |_____________________________________
    |
    | CandyWrapper (.NET Wrapper for SugarCRM SOAP API). Source now available on GitHub!
    | GoldMine to SugarCRM Express Conversion. Latest: 1.0.1.7 (Nov. 3, 2009)
    | CRM SkyDialer (Skype Integration). Latest: 1.0.2 (Feb. 17, 2010)
    | Round Robin Leads Assignment
    | Phone Number Formatter
    | CaseTwit (Twitter Integration)
    ______________________________________________

  3. #3
    andrew.smith@ingine.fi is offline Junior Member
    Join Date
    Jun 2010
    Posts
    3

    Default Re: SOAP and Visual Studio 2003 format and Visual Basic .Net

    Hey,

    Thanks for the quick reply.
    I sent your response on to the VB developer and have not heard back from him yet.

    I'll update when I do.

    Best,

    Andrew

  4. #4
    andrew.smith@ingine.fi is offline Junior Member
    Join Date
    Jun 2010
    Posts
    3

    Default Re: SOAP and Visual Studio 2003 format and Visual Basic .Net

    Angel,

    We have had success connecting! He was using an older version of the vb .net. An upgrade solved the problem.

    Is there anything special that needs to happen to access a custom module? The function get_module_fields succeeds with the standard modules, such as contacts but fails with custom modules. In our case J001_Invoice. J001_Invoice is what is returned with get_available_modules so pretty sure that's the correct name.

    I can however access the custom modules with perl using soap:lite. Any idea why we would be having this issue with candywrapper?

    Thanks Again,

    Andrew Smith
    Last edited by andrew.smith@ingine.fi; 2010-06-15 at 03:05 PM.

  5. #5
    Angel's Avatar
    Angel is offline Sugar Community Member
    Join Date
    Jul 2005
    Location
    Los Angeles
    Posts
    4,813

    Default Re: SOAP and Visual Studio 2003 format and Visual Basic .Net

    No, I am not aware of any reason.

    I'll give it a look to see if it is a bug in CW. Thanks for bringing it to my attention.
    Regards,

    Angel Magaņa
    Co-Author: Implementing SugarCRM 5.x (Packt Publishing -- Sept. 2010)
    Blog: http://cheleguanaco.blogspot.com.
    Twitter: @cheleguanaco.

    ________
    | Projects: |_____________________________________
    |
    | CandyWrapper (.NET Wrapper for SugarCRM SOAP API). Source now available on GitHub!
    | GoldMine to SugarCRM Express Conversion. Latest: 1.0.1.7 (Nov. 3, 2009)
    | CRM SkyDialer (Skype Integration). Latest: 1.0.2 (Feb. 17, 2010)
    | Round Robin Leads Assignment
    | Phone Number Formatter
    | CaseTwit (Twitter Integration)
    ______________________________________________

  6. #6
    Angel's Avatar
    Angel is offline Sugar Community Member
    Join Date
    Jul 2005
    Location
    Los Angeles
    Posts
    4,813

    Default Re: SOAP and Visual Studio 2003 format and Visual Basic .Net

    OK, maybe I am being dense (wouldn't be the first time), but CW is a .NET 2.0 library. If I try to add it via the normal means to a .NET 1.1 project in VS 2003, I get an error.

    Are you sure he is using VS 2003?
    Regards,

    Angel Magaņa
    Co-Author: Implementing SugarCRM 5.x (Packt Publishing -- Sept. 2010)
    Blog: http://cheleguanaco.blogspot.com.
    Twitter: @cheleguanaco.

    ________
    | Projects: |_____________________________________
    |
    | CandyWrapper (.NET Wrapper for SugarCRM SOAP API). Source now available on GitHub!
    | GoldMine to SugarCRM Express Conversion. Latest: 1.0.1.7 (Nov. 3, 2009)
    | CRM SkyDialer (Skype Integration). Latest: 1.0.2 (Feb. 17, 2010)
    | Round Robin Leads Assignment
    | Phone Number Formatter
    | CaseTwit (Twitter Integration)
    ______________________________________________

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 2010-04-01, 04:12 PM
  2. Replies: 1
    Last Post: 2010-01-19, 05:18 PM
  3. Visual aids in detailview
    By jry in forum Developer Help
    Replies: 5
    Last Post: 2009-11-02, 05:17 AM
  4. Replies: 0
    Last Post: 2009-05-12, 02:17 PM
  5. Visual CRM to Sugar CRM ?
    By jjcheap in forum General Discussion
    Replies: 0
    Last Post: 2005-10-28, 03:44 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •