Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

Help with a WSDL and namespaces.

namespace

  • Please log in to reply
No replies to this topic

#1 firen

firen

    CC Lurker

  • Just Joined
  • Pip
  • 1 posts

Posted 30 July 2010 - 01:00 AM

First of all im sorry if i post this in the wrong forum but i really dont know where else to post it. Im having a problem building a webservice with the WSDL file. Currently i have (In PHP) one function:
returnData($value)
{
//calculate something
return $result
}

Now my problem lies with the WSDL file. I think i made it pretty well but i just dont understand the namespaces part. I looked up on the internet for examples and explanations but i really do not get it. I used an example to make the .WSDL but at definations, i have no clue what "HelloWorld" does or where it comes from (in the first 3 lines). i also see this line:
" <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:Hello">" but i dont know where urn:Hello comes from and same with this line:
<soap:operation soapAction="urn:HelloAction" />

So im just wondering can anyone tell me what i need to put there. I know it has to do with namespaces but i cant really figure it out. Just for some extra information im really not someone that programs alot. I made our small corprate website (we have only 5 employees) and thats it. So IF it is possible mayb it can be explained in a simple way ? Thx in advance.

<?xml version="1.0"?>
<definitions name="HelloWorld"
targetNamespace="urn:HelloWorld"
xmlns:tns="urn:HelloWorld"
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:Hello">
<xsd:element name="returnDataRequest" type="xsd:string" />
<xsd:element name="returnDataResponse" type="xsd:string" />
</xsd:schema>
</types>

<message name="doreturnDataRequest">
<part name="symbol" type="tns:returnDatagRequest" />
</message>
<message name="doreturnDataResponse">
<part name="Result" type="tns:returnDataResponse" />
</message>

<portType name="ReturnDataPort">
<operation name="returnData">
<input message="tns:returnDataRequest" />
<output message="tns:returnDataResponse" />
</operation>
</portType>

<binding name="returnDataBinding" type="tns:ReturnDataPort">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
<operation name="returnData">
<soap:operation soapAction="urn:HelloAction" />
<input>
<soap:body use="encoded" namespace="urn:Hello" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</input>
<output>
<soap:body use="encoded" namespace="urn:Hello" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</output>
</operation>
</binding>

<service name="ReturnDataService">
<port name="ReturnDataPort" binding="tns:ReturnDataBinding">
<soap:address location="http://www.ourwebsite/WebService/Service.php" />
</port>
</service>

</definitions>
  • 0





Also tagged with one or more of these keywords: namespace

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download