Link to home
Start Free TrialLog in
Avatar of kenozzy
kenozzyFlag for United States of America

asked on

Using WSDL Interface with PHP

I just had this dumped on me...I need to connect to a WSDL interface using PHP.  It looks like nusoap is the easiest solution, but I am open to suggestions.  I was given the following interface information, and need some hints as to how exactly to connnect to this in PHP.  

I need help knowing how to map PHP variables into those in the specification.  

Please help!


[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
[System.ServiceModel.ServiceContractAttribute(ConfigurationName="Interface")]
public interface Interface
{
   
    [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/Interface/RequestApproval", ReplyAction="http://tempuri.org/Interface/RequestApprovalResponse")]
    string RequestApproval(string Id, string Num, int points, string Code);
}

[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
public interface InterfaceChannel : Interface, System.ServiceModel.IClientChannel
{
}

[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
public partial class InterfaceClient : System.ServiceModel.ClientBase<Interface>, Interface
{
   
    public InterfaceClient()
    {
    }
   
    public InterfaceClient(string endpointConfigurationName) :
            base(endpointConfigurationName)
    {
    }
   
    public InterfaceClient(string endpointConfigurationName, string remoteAddress) :
            base(endpointConfigurationName, remoteAddress)
    {
    }
   
    public InterfaceClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) :
            base(endpointConfigurationName, remoteAddress)
    {
    }
   
    public InterfaceClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
            base(binding, remoteAddress)
    {
    }
   
    public string RequestApproval(string Id, string Num, int points, string Code)
    {
        return base.Channel.RequestApproval(Id, Num, points, Code);
    }
}
SOLUTION
Avatar of Pyromanci
Pyromanci
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
can you post the wsdl file?
Avatar of kenozzy

ASKER

Is this what you need?

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <system.serviceModel>
        <bindings>
            <wsHttpBinding>
                <binding name="WSHttpBinding_CommerceInterface" closeTimeout="00:01:00"
                    openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                    bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
                    maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
                    messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
                    allowCookies="false">
                    <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                        maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                    <reliableSession ordered="true" inactivityTimeout="00:10:00"
                        enabled="false" />
                    <security mode="Message">
                        <transport clientCredentialType="Windows" proxyCredentialType="None"
                            realm="" />
                        <message clientCredentialType="Windows" negotiateServiceCredential="true"
                            algorithmSuite="Default" />
                    </security>
                </binding>
            </wsHttpBinding>
        </bindings>
        <client>
            <endpoint address="http://web.com/Rest.Service.svc"
                binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_CommerceInterface"
                contract="CommerceInterface" name="WSHttpBinding_CommerceInterface">
                <identity>
                    <dns value="web.com" />
                </identity>
            </endpoint>
        </client>
    </system.serviceModel>
</configuration>
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial