Click here to Skip to main content
15,897,165 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi. I need to write a WebService for it to be consumed by QuickBooks.

The QB documentation gives me the source code skeleton to creat it in .NET; I'd need to replicate it in PHP (NuSOAP).

Can anybody help me with this?

Here's the C# code:

XML
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:2.0.50727.4952
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Serialization;
//
// This source code was auto-generated by wsdl, Version=2.0.50727.3038.
//

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Web.Services.WebServiceAttribute(Namespace="http://developer.intuit.com/")]
[System.Web.Services.WebServiceBindingAttribute(Name="QBWebConnectorSvcSoap", Namespace="http://developer.intuit.com/")]
public abstract partial class QBWebConnectorSvc : System.Web.Services.WebService {
    /// <remarks/>
    [System.Web.Services.WebMethodAttribute()]
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://developer.intuit.com/authenticate", RequestNamespace="http://developer.intuit.com/", ResponseNamespace="http://developer.intuit.com/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
    public abstract string[] authenticate(string strUserName, string strPassword);
    /// <remarks/>
    [System.Web.Services.WebMethodAttribute()]
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://developer.intuit.com/sendRequestXML", RequestNamespace="http://developer.intuit.com/", ResponseNamespace="http://developer.intuit.com/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
    public abstract string sendRequestXML(string ticket, string strHCPResponse, string strCompanyFileName, string qbXMLCountry, int qbXMLMajorVers, int qbXMLMinorVers);
    /// <remarks/>
    [System.Web.Services.WebMethodAttribute()]
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://developer.intuit.com/receiveResponseXML", RequestNamespace="http://developer.intuit.com/", ResponseNamespace="http://developer.intuit.com/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
    public abstract int receiveResponseXML(string ticket, string response, string hresult, string message);
    /// <remarks/>
    [System.Web.Services.WebMethodAttribute()]
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://developer.intuit.com/connectionError", RequestNamespace="http://developer.intuit.com/", ResponseNamespace="http://developer.intuit.com/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
    public abstract string connectionError(string ticket, string hresult, string message);
    /// <remarks/>
    [System.Web.Services.WebMethodAttribute()]
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://developer.intuit.com/getLastError", RequestNamespace="http://developer.intuit.com/", ResponseNamespace="http://developer.intuit.com/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
    public abstract string getLastError(string ticket);
    /// <remarks/>
    [System.Web.Services.WebMethodAttribute()]
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://developer.intuit.com/closeConnection", RequestNamespace="http://developer.intuit.com/", ResponseNamespace="http://developer.intuit.com/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
    public abstract string closeConnection(string ticket);
}
Posted

1 solution

Noone is going to rewrite this for you and there is no tool to convert from C# code to PHP. You'll have to rewrite it by hand.

The code you posted doesn't do anything besides declare an abstract class with some methods. If you want to see what you should really be looking at, remove everything inside square brackets [].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900