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

  • Home
  • SEARCH
  • 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 8247967
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T23:02:16+00:00 2026-06-07T23:02:16+00:00

I am using SoapClient to send some data from a PHP site to a

  • 0

I am using SoapClient to send some data from a PHP site to a .Net WCF service.
This is my (shortened for clarity) code:

$wsdl = '/var/www/libraries/MyWsdl.xml';
$myClient = new SoapClient($wsdl);

and later, the actual call:

try {           
    $res = $myClient->Foo($someParameter);
}
catch(SoapFault $e){
    //...
}
catch(Exception $e){
    //...
}

This works great when everything is online, and the error handling works if the destination server is down on the time Foo is called.
Problem is that the SoapClient constructor fails, if the destination server is down, even though i’ve provided it with a static XML file with the WSDL (in oppose to a URL like “http://www.destination.com/MyService?wsdl“).

I believe this is happening because the WSDL contains a reference to another WSDL:

<wsdl:import namespace="http://MyCompany.Services" location="http://www.destination.com/MyService?wsdl=wsdl0"/>

This other WSDL contains the definitions of the call parameters.

So, how can I “Inline” the second “sub-WSDL” inside the original one?
Will this allow me to create a SoapClient without initiating a connection to the destination server?


This is my service definition:

[ServiceContract(Namespace = "http://MyCompany.Services")]
public interface IMyService
{
    [OperationContract]
    [XmlSerializerFormat(Style = OperationFormatStyle.Rpc, Use = OperationFormatUse.Literal)]
    string Foo(string myParameter);
}
  • 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-06-07T23:02:18+00:00Added an answer on June 7, 2026 at 11:02 pm

    You can use the single WSDL-file extension from here: http://wcfextras.codeplex.com/

    Note that when using .net4.5 there should be no need for it, as the default metadata endpoint now also generates single WSDL-files in addition to the linked versions.
    To do that simply add “?singleWSDL” to the URI (source: http://msdn.microsoft.com/en-us/library/dd456789(v=vs.110).aspx)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code written in .NET 4.0 using VS2010 Ultimate Beta 2: smtpClient.Send(mailMsg);
I'm using Php default SoapClient for communication. I have to send data that looks
I am trying to use the below code to send email from asp.net(C#). using
I am trying to consume a WSDL from WCF using PHPs SoapClient. When using
I am using asp.net 3.5 and C#. I want to send mail from asp.net,
I have written some simple code, to send en auto generated email, using the
I am using this code to send an SMTP email via the yahoo SMTP
Folks, I'm using SOAPClient in PHP to call a .NET webservice. All fine and
I'm using code like this to send email: var smtp = new SmtpClient {
Here's my problem I have some code and I'm using it to send an

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.