axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom Deckers (tdeckers)" <tdeck...@cisco.com>
Subject RE: WSDL2java and java:MSG
Date Tue, 11 Feb 2003 22:57:48 GMT
That is exactly what I needed to know... It's not me, it's the wording
;-)

This helped me (and hopefully others) a lot!

Thanks!
Tom.

-----Original Message-----
From: Mike Burati [mailto:mburati@bowstreet.com] 
Sent: Tuesday, February 11, 2003 11:32 PM
To: 'axis-user@ws.apache.org'
Subject: RE: WSDL2java and java:MSG



> I was expecting java:MSG as a provider for the service.
> Can anyone help me understand why it says java:RPC?

TomD, the AXIS naming of the types of services can be fairly confusing
until
you wrap your mind around it...

If you've worked with WSDL and SOAP for a while, you're probably used to
seeing/using "RPC style" vs "Document style", where RPC style typically
includes a named method with arguments and Document style is typically
an
XML document passed across the wire as the child of the SOAP body
element
and dispatched based on the schema type of the document or in some rare
circumstances by SOAP Action.

AXIS, as you can see in the Users Guide, lists 4 "styles" of Service:
RPC,
Document, Wrapped and Message (where Wrapped Document is a variation on
AXIS
Document service type).

It might be clearer if it was described as 2 styles of service "RPC" and
"Document", where "Document" style services have 3 possible service
implementation types:

- AXIS Document service (which is actually somewhat like typical RPC
services where there's a XML -> JAVA data binding and automatic
deserialization to Java types, rather than just passing you an XML
Document
(eg, DOM Doc or Elem)).
- Wrapped (which appears to be some mutation of a Document style service
implementation to make it look more like an RPC service with separate
deserialized args for children of the SOAP body element).
- Message (which is really what I used to think of as Document style
services where you're sending an XML document to a service method that's
expecting an XML Document).

Now, if you've followed me so far, here's another monkey wrench that
also
seems to be confusing you:
There's two AXIS "Providers" that are used for SOAP with http:
RPCProvider
and MSGProvider.
Believe it or not, RPCProvider appears to be used for what AXIS calls
"Document" style above (doc style with auto-deserialization) where
MSGProvider is used for the Message style above (which is WSDL/SOAP
docstyle
where the service implementation wants an XML document, not deserialized
data).  Take a look in the RPCProvider code at
src/org/apache/axis/providers/java/RPCProvider.java and MSGProvider.java
and
it'll hopefully make a little more sense...

Hope that clears up as much as it adds to the confusion - I'm fairly new
at
AXIS too (been using a customized version of ApacheSOAP2.2 til recently)
so
the above may not be a complete and totally accurate picture, but
hopefully
it'll help explain why you're seeing an RPC Provider being used for a
Document style service (confused me at first too).

Good luck,
..Mike Burati
http://www.bowstreet.com


-----Original Message-----
From: Tom Deckers (tdeckers) [mailto:tdeckers@cisco.com]
Sent: Tuesday, February 11, 2003 4:56 PM
To: axis-user@ws.apache.org
Cc: Tom Deckers (tdeckers)
Subject: WSDL2java and java:MSG


All,

I'm having troubles to understand how WSDL2java translates WSDL to code
and WSDD.

This is an excerpt from my WSDL:
	<portType name="Test">
		<operation name="test">
			<input message="tns:testRequest"/>
		</operation>
	</portType>
	<binding name="TestBinding" type="tns:Test">
		<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
		<operation name="test">
			<soap:operation soapAction="" style="document"/>
 			<input>
				<soap:body use="literal" />
			</input>
		</operation>
	</binding>
	<service name="TestService">
		<port name="Test" binding="tns:TestBinding">
			<soap:address
location="http://mysecreturl.cisco.com"/>
		</port>
	</service>

This generates following WSDD:

  <service name="Test" provider="java:RPC" style="document">
      <parameter name="wsdlTargetNamespace"
value="http://www.cisco.com/anc/test.wsdl"/>
      <parameter name="wsdlServiceElement" value="TestService"/>
      <parameter name="wsdlServicePort" value="Test"/>
      <parameter name="className"
value="com.cisco.anc.test.TestBindingSkeleton"/>
      <parameter name="wsdlPortType" value="Test"/>
      <parameter name="allowedMethods" value="*"/>
  </service>

I was expecting java:MSG as a provider for the service.  Can anyone help
me understand why it says java:RPC?

I've seen this issue mentioned more or less in earlier threads, but I
didn't get a clear answer there.  I'm using the 1.0 version of Axis.

Thanks!
Tom Deckers.

Mime
View raw message