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 6599147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:27:09+00:00 2026-05-25T18:27:09+00:00

I am trying to build a sample wsdl file that will be read by

  • 0

I am trying to build a sample wsdl file that will be read by the PHP SoapClient, and although my wsdl document sort-of works (it returns the function correctly), something is still not right because PHP’s __getFunctions method returns the following:

array(1) { [0]=> string(35) "UNKNOWN getDocument(UNKNOWN $input)" } 

From what is returned by this function it seems that the type definitions are not 100% correct as the types are showing as UNKNOWN.

<?xml version="1.0"?>
<definitions name="Document" targetNamespace="urn:Document" xmlns:tns="urn:Document"     xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/"> 
<types>
    <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:Document">
    <xsd:element name="InputUserType" type="xsd:string" />
    <xsd:element name="DocumentResponseType" type="xsd:string" />         
    </xsd:schema>           
</types>

<message name="getDocumentInputUser">
    <part name="input" type="tns:InputUserType" />
</message> 

<message name="getDocumentResponse">
    <part name="return" type="tns:DocumentResponseType" />
</message>  

<portType name="DocumentPort">
    <operation name="getDocument">
        <input message="tns:getDocumentInputUser" />
        <output message="tns:getDocumentResponse" />
    </operation>
</portType>

<binding name="DocumentBinding" type="tns:DocumentPort">
    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
    <operation name="getDocument">
        <soap:operation soapAction="urn:DocumentAction" />
        <input>
            <soap:body use="encoded" namespace="urn:Document" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />        
        </input>
        <output>
            <soap:body use="encoded" namespace="urn:Document" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />        
        </output>
    </operation>      
</binding>

<service name="DocumentService">
    <port name="DocumentPort" binding="tns:DocumentBinding">
        <soap:address location="http://www.apollo.co.za/soap/test2server.php" />
    </port>
</service>

</definitions>

I am trying to define a simple wsdl document that has one operation “getDocument”, that takes a user name string parameter and returns a string result. I am very new to SOAP and am struggling a bit to get to grips with it, so would really appreciate it if someone could point out what is wrong in my wsdl definition.

  • 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-25T18:27:09+00:00Added an answer on May 25, 2026 at 6:27 pm

    Try type=’xsd:string’ instead of type=”tns:InputUserType”

    In hopes that examples are helpful, here’s one that I use:

    <?xml version='1.0' encoding='UTF-8' ?>
    <definitions name='AddWidget'
      targetNamespace='urn:ANYTHINGHEREAddWidget'
      xmlns:tns='urn:ANYTHINGHEREAddWidget'
      xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
      xmlns:xsd='http://www.w3.org/2001/XMLSchema'
      xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/'
      xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
      xmlns='http://schemas.xmlsoap.org/wsdl/'>
    
    <message name='AddWidgetRequest'>
      <part name='Auth_Username' type='xsd:string'/>
      <part name='Auth_Password' type='xsd:string'/>
      <part name='Widget_Name' type='xsd:string'/>
      <part name='Widget_Description' type='xsd:string'/>
    </message>
    <message name='AddWidgetResponse'>
      <part name='Result' type='xsd:string'/>
    </message>
    
    <portType name='AddWidgetPortType'>
      <operation name='AddWidget'>
        <input message='tns:AddWidgetRequest'/>
        <output message='tns:AddWidgetResponse'/>
      </operation>
    </portType>
    
    <binding name='AddWidgetBinding' type='tns:AddWidgetPortType'>
      <soap:binding style='rpc'
        transport='http://schemas.xmlsoap.org/soap/http'/>
      <operation name='AddWidget'>
        <soap:operation soapAction='urn:xmethods-delayed-quotes#AddWidget'/>
        <input>
          <soap:body use='encoded' namespace='urn:xmethods-delayed-quotes'
            encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/>
        </input>
        <output>
          <soap:body use='encoded' namespace='urn:xmethods-delayed-quotes'
            encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/>
        </output>
      </operation>
    </binding>
    
    <service name='AddWidgetService'>
      <port name='AddWidgetPort' binding='tns:AddWidgetBinding'>
        <soap:address location='https://www.yoursite.com/en/Soap_Server.html'/>
      </port>
    </service>
    </definitions>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to build a sample app that uses web sockets in .Net
I'm trying to build a simple Magento Module that needs to connect to the
I'm trying to build a simple jquery plugin that can take selectors as parameters.
I'm trying to build the sample project Action Bar Styled using the Action Bar
I'm trying to build a sample game in Silverlight 4 using the MVVM design
I'm trying to build the XPCOM component available here: http://mxr.mozilla.org/mozilla-central/source/xpcom/sample/ I tried to compile
we are trying to build the Haskell-MaybeMonad sample from http://www.haskell.org/all_about_monads/html/maybemonad.html in F#. The idea
I am trying to build on the WebSharingAppDemo-SqlProviderEndToEnd msdn sample application to build out
I'm trying to build a C# service in .NET 3.5 that supports both SOAP
I am trying to build a sample application using ANT build. But i am

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.