• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

How to provide interoperabilty?? RPC or document???

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi folks!!
I have a big question and I'll appreciate some comments.
Suppose I have a RPC style webservice with a complextype. Can every kind of clients (independent written language) acess a webservice like this one or just Java clients?
What is the best way to provide this webservice? RPC or document?
Thanks
Pablo

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://goya:8080/jboss-net/services/ObjetoWS" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://goya:8080/jboss-net/services/ObjetoWS" xmlns:intf="http://goya:8080/jboss-net/services/ObjetoWS" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns1="urn:ObjetoTO" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<schema targetNamespace="urn:ObjetoTO" xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType name="ObjetoTO">
<sequence>
<element name="description" nillable="true" type="xsd:string"/>
<element name="name" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<element name="ObjetoTO" nillable="true" type="tns1:ObjetoTO"/>
</schema>
</wsdl:types>
<wsdl:message name="getObjetoRequest">
<wsdl:part name="in0" type="xsd:string"/>
<wsdl:part name="in1" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="createObjetoResponse">
<wsdl:part name="createObjetoReturn" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="getObjetoResponse">
<wsdl:part name="getObjetoReturn" type="tns1:ObjetoTO"/>
</wsdl:message>
<wsdl:message name="createObjetoRequest">
<wsdl:part name="in0" type="xsd:string"/>
<wsdl:part name="in1" type="xsd:string"/>
</wsdl:message>
<wsdl:portType name="ObjetoLocal">
<wsdl:operation name="createObjeto" parameterOrder="in0 in1">
<wsdl:input message="impl:createObjetoRequest" name="createObjetoRequest"/>
<wsdl:output message="impl:createObjetoResponse" name="createObjetoResponse"/>
</wsdl:operation>
<wsdl:operation name="getObjeto" parameterOrder="in0 in1">
<wsdl:input message="impl:getObjetoRequest" name="getObjetoRequest"/>
<wsdl:output message="impl:getObjetoResponse" name="getObjetoResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="ObjetoWSSoapBinding" type="impl:ObjetoLocal">
<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="createObjeto">
<wsdlsoap:operation soapAction="ObjetoWS"/>
<wsdl:input name="createObjetoRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://goya:8080/jboss-net/services/ObjetoWS" use="encoded"/>
</wsdl:input>
<wsdl:output name="createObjetoResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://goya:8080/jboss-net/services/ObjetoWS" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getObjeto">
<wsdlsoap:operation soapAction="ObjetoWS"/>
<wsdl:input name="getObjetoRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://goya:8080/jboss-net/services/ObjetoWS" use="encoded"/>
</wsdl:input>
<wsdl:output name="getObjetoResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://goya:8080/jboss-net/services/ObjetoWS" use="encoded"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="ObjetoLocalService">
<wsdl:port binding="impl:ObjetoWSSoapBinding" name="ObjetoWS">
<wsdlsoap:address location="http://goya:8080/jboss-net/services/ObjetoWS"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions> ;)
 
Ranch Hand
Posts: 906
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sounds like the best way for interoperability is document.
That's why WS-I rallying cry is "rpc/encoded is dead; long live document/literal!"
 
Pablo Pires
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Jean-Louis!
I have seen a lot of papers and I'm convinced document/literal is the best choice.
But my problem is that first I write my session bean and deploy it. When I try to get the wsdl file using ?WSDL I always have a rpc/encoded on JBoss.
What is the way to provide a document/literal webservice using Jboss/Axis?
Thanks
Pablo
Belo Horizonte - Brazil
 
JeanLouis Marechaux
Ranch Hand
Posts: 906
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No idea about jBoss and the way it uses Axis.
What I have seen so far is that all SOAP tools use RPC/Encoded by default.
I do not know if and how you can change that with jBoss (but I would be surpised if you can't)
Most of the time, there is special flags to use during generation, to specify you want to use Document/Literal or RPC/Encoded.
For instance, with Axis Java2WSDL, you've got :
-y, --style
The style of binding in the WSDL, either DOCUMENT, RPC, or WRAPPED.
-u, --use
The use of items in the binding, either LITERAL or ENCODED
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic