开发者

How to quickly create a web-service for testing purposes?

I have to make a client for a web-service. The web-service is not ready yet. I want to make a web-service server with one mockup method. This method must take one parameter - a collection of objects. The only thing that I have for now is the xsd describing the data type for the web-service's method parameter. Here it is

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://localhost/1csite/Contractors" attributeFormDefault="unqualified" elementFormDefault="qualified"开发者_运维技巧 targetNamespace="http://localhost/1csite/Contractors">
<xsd:complexType name="Contractor">
    <xsd:sequence>
        <xsd:element name="Code" type="xsd:string"/>
        <xsd:element name="Name" type="xsd:string"/>
        <xsd:element name="ParentCode" type="xsd:string"/>
    </xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Contractors">
    <xsd:sequence>
        <xsd:element maxOccurs="unbounded" minOccurs="0" name="Element" nillable="true" type="tns:Contractor"/>
    </xsd:sequence>
</xsd:complexType>

How can I quickly make a web-service server with one method taking objects of this data type?

Thank you.


If I understand you correctly, you need a temporary server for a not yet complete web service, so you can build a client against the service. If that is the case, and you are comfortable with Linux, you can set up your own Apache web server and use the Apache Axis2 web services engine, along with your xsd file. Check out the quick start guide.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜