This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

document/literal axis webservice

 
Pablo Pires
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks!!
I need some help. I want to provide a document/literal webservice using jboss 3.2.1 (Axis). Is it possible? Every Axis webservice I have seen is rpc/encoded.
I want to create it starting from a wsdl file I have created.
I generated the wsdd file using:
java org.apache.axis.wsdl.WSDL2Java --server-side --skeletonDeploy true ObjetoDelegate.wsdl
My wsdl file is:
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:tns="http://smartprice.com/objeto"
targetNamespace="http://smartprice.com/objeto">
<types>
<xs:schema elementFormDefault="qualified" targetNamespace="http://smartprice.com/objeto">
<xs:complexType name="ObjetoTO">
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="1" name="Name" type="xs:string"/>
<xs:element minOccurs="1" maxOccurs="1" name="Description" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:element name="createObjetoRequest">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="1" name="Name" type="xs:string"/>
<xs:element minOccurs="1" maxOccurs="1" name="Description" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="createObjetoResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="1" name="Name" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="getObjetoRequest">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="1" name="Name" type="xs:string"/>
<xs:element minOccurs="1" maxOccurs="1" name="Description" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="getObjetoResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="1" name="ObjetoTO" type="tns:ObjetoTO"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ObjetoTO" nillable="true" type="tns:ObjetoTO"/>
</xs:schema>
</types>
<message name="createObjetoSoapIn">
<part name="parameters" element="tns:createObjetoRequest"/>
</message>
<message name="createObjetoSoapOut">
<part name="parameters" element="tns:createObjetoResponse"/>
</message>
<message name="getObjetoSoapIn">
<part name="parameters" element="tns:getObjetoRequest"/>
</message>
<message name="getObjetoSoapOut">
<part name="parameters" element="tns:getObjetoResponse"/>
</message>
<portType name="ObjetoDelegate">
<operation name="createObjeto">
<documentation>Cria um objeto</documentation>
<input message="tns:createObjetoSoapIn"/>
<output message="tns:createObjetoSoapOut"/>
</operation>
<operation name="getObjeto">
<documentation>Obtem um objeto</documentation>
<input message="tns:getObjetoSoapIn"/>
<output message="tns:getObjetoSoapOut"/>
</operation>
</portType>
<binding name="ObjetoDelegate" type="tns:ObjetoDelegate">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="createObjeto">
<soapperation soapAction="" style="document"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="getObjeto">
<soapperation soapAction="" style="document"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="ObjetoDelegateService">
<documentation>ObjetoDelegateWebService Teste</documentation>
<port name="Objeto" binding="tns:ObjetoDelegate">
<soap:address location="http://localhost:8080/jboss-net/services/Objeto"/>
</port>
</service>
</definitions>
Thanks
Regards
Pablo
Belo Horizonte-Brazil
 
Mark Secrist
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pablo,
I ran it through Axis wsdl2java (Axis 1.1) and it worked fine. I can send you the resulting files if you want. Axis has supported document/literal since at least 1.0, although it is not quite as straitforward as rpc. Some might disagree, but I'm biased toward starting with the WSDL file for document exchange style web services. The reason is that you want to be able to describe your interface and then use that to generate your implementation and linkage code to backend functionality. The tools aren't quite as mature for that yet, but they are getting there.
Hope this helps.
Mark
Originally posted by Pablo Pires:
Hi folks!!
I need some help. I want to provide a document/literal webservice using jboss 3.2.1 (Axis). Is it possible? Every Axis webservice I have seen is rpc/encoded.
I want to create it starting from a wsdl file I have created.
I generated the wsdd file using:
java org.apache.axis.wsdl.WSDL2Java --server-side --skeletonDeploy true ObjetoDelegate.wsdl
-- WSDL Content deleted --
Thanks
Regards
Pablo
Belo Horizonte-Brazil
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic