Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6383641
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:40:30+00:00 2026-05-25T02:40:30+00:00

I have a WCF web service which allows both Basic HTTP and WS-HTTP clients,

  • 0

I have a WCF web service which allows both Basic HTTP and WS-HTTP clients, both over HTTPS using user name & password authentication. This is achieved with two bindings on the same service.

So, the service is at https://foo.com/Service.svc, the Basic HTTP (SOAP 1.1) endpoint is https://foo.com/Service.svc/Unp11, and the WS-HTTP (SOAP 1.2) endpoint is https://foo.com/Service.svc/Unp .

A client is trying to access this web service via PHP 5, using its built-in SOAP support, and is having trouble connecting to the service. He keeps getting an HTTP 400 (Bad Request) response, which tends to happen if the SOAP message is badly formed, or a SOAP 1.1 message is sent to a SOAP 1.2 endpoint (or vice versa).

I only know basic PHP so I’m having trouble helping him. I know you can create a client by doing

$client = new SoapClient('https://foo.com/Service.svc?wsdl');

but how do you specify the binding/endpoint? Are there any known issues achieving all this with PHP?

UPDATE

Ok, so I can use PHP to connect to the WCF service ok (specifying the SOAP version in the SoapClient constructor), and calling $client->__getFunctions() returns a correct list of all the web service operations.

When I try to call one using $client->__soapCall, the page just sits there loading for quite a while, and eventually returns the error “Error Fetching http headers“. What exactly is this supposed to mean and how do I fix it? (Consuming the service from .Net client works perfectly.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T02:40:31+00:00Added an answer on May 25, 2026 at 2:40 am

    Just ran into this today, creating a WCF with multiple bindings for a PHP caller. Setting the location appears to allow for both the WSDL version of PHP’s SoapClient and specifying a binding to use.

    WCF config is (1 service with 2 bindings wsHttp and basicHttp), pretty straight-forward.

    PHP code:

    $client = new SoapClient("http://example.com/service.svc?wsdl");
    $client->__setLocation("http://example.com/service.svc/basic");
    $response = $client->MethodName(array( "paramName" => "paramValue" ... ));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WCF Web Service which is referenced from a class library. After
I have a WCF web service, and I want to use Basic authentication. I
I have a website that talks to a remote WCF web service. Both use
I have a Linux/c client app that connects to a WCF web service over
I have two WCF clients consuming a 3rd party web service. These two clients
I have a WCF Web Service which is kept under an Application Pool on
I have a WCF web service in which I want to use my Repositories
I have converted my web service to wcf service which has some datacontracts. As
I have a wcf web service which returns a wsdl response when I invoke
I am writing a WCF web service which allows to register new users in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.