You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Paolo Albonico <pa...@wise-lab.it> on 2002/09/20 14:20:22 UTC
WSDL2Java
It's possible use wsdl2java for generating stub class when a complex type
in the wsdl description is a stateful enterprise bean?
Paolo Albonico
Re: WSDL2Java
Posted by Ulrich Winter <ul...@gmx.de>.
> Why can't one define a complexType with a <restriction
> base="<stateful-bean-type>"/>
> in WSDL. This should work right?
Of course you can do so.
But the call semantics are not what I would expect.
The types used as parameters to SOAP calls (more precisely JAX-RPC calls)
contain only their attributes - no other methods than getters/setters.
A statefull session bean is in general characterized by the business methods
it exposes.
If you use a reference to such a bean as a parameter in another EJB's
method, the
other side of the call can use that transferred reference to invoke the
original bean
remotely.
By contrast the corresponding type transmitted as a SOAP-Parameter would
contain only the
attributes and none of the business methods.
In general a session bean should be mapped to a service.
The methods of the session bean should not use remote references to other
enterprise beans.
But instead a DataTransferObject should be used for any complex parameter
type (see the j2ee patterns site for a description:
http://java.sun.com/blueprints/corej2eepatterns/Patterns/TransferObject.html
)
If you really need to transfer remote references to web services, you could
do so by transferring the service description and/or the service endpoint
address as an ordinary type (string or URL).
In thas case, the bean must be exposed as a web service either.
Bye,
Uli
Re: WSDL2Java
Posted by Harish Prabandham <ha...@mail.finex.com>.
Why can't one define a complexType with a <restriction
base="<stateful-bean-type>"/>
in WSDL. This should work right?
Harish
Ulrich Winter wrote:
>Paolo,
>
>you cannot transfer references to remote objects as parameters in JAX-RPC
>calls.
>
>I'm quite sure that WSDL doesn't provide the vocabulary to describe a
>service which uses remote references as parameters.
>
>So in my opinion the answer is: No.
>
>Uli
>
>
>----- Original Message -----
>From: "Paolo Albonico" <pa...@wise-lab.it>
>To: <ax...@xml.apache.org>
>Sent: Friday, September 20, 2002 2:20 PM
>Subject: WSDL2Java
>
>
>
>
>>It's possible use wsdl2java for generating stub class when a complex type
>>in the wsdl description is a stateful enterprise bean?
>>
>>Paolo Albonico
>>
>>
>>
>
>
>
>
>
Re: WSDL2Java
Posted by Ulrich Winter <ul...@gmx.de>.
Paolo,
you cannot transfer references to remote objects as parameters in JAX-RPC
calls.
I'm quite sure that WSDL doesn't provide the vocabulary to describe a
service which uses remote references as parameters.
So in my opinion the answer is: No.
Uli
----- Original Message -----
From: "Paolo Albonico" <pa...@wise-lab.it>
To: <ax...@xml.apache.org>
Sent: Friday, September 20, 2002 2:20 PM
Subject: WSDL2Java
> It's possible use wsdl2java for generating stub class when a complex type
> in the wsdl description is a stateful enterprise bean?
>
> Paolo Albonico
>
Re: Simple query about using primitive datatypes
Posted by Harish Prabandham <ha...@mail.finex.com>.
No, But it should not matter. Since web services could be called from
languages
other than Java, so, on the contrary, I would try to stay away from
Java's wrappers
on the primitive types. This perhaps could make it easier for other
tools generating
client code from the wsdl description of your service.
Harish
Amit Garg wrote:
>Hi all.
>
>Simple question: Is it recommended to always use Object types (like
>Integer) as opposed to primitive types (like int) when building web
>services?
>
>Thanks,
>;Amit
>
>
>
>
>
Re: Simple query about using primitive datatypes
Posted by James Black <jb...@ieee.org>.
Amit Garg wrote:
>Simple question: Is it recommended to always use Object types (like
>Integer) as opposed to primitive types (like int) when building web
>services?
>
I prefer to use int, personally, but I don't believe it really
matters. I like to use primitive types in my beans as much as possible,
and if I need to use an object method then I just instantiate it at that
time.
Simple query about using primitive datatypes
Posted by Amit Garg <am...@cs.utexas.edu>.
Hi all.
Simple question: Is it recommended to always use Object types (like
Integer) as opposed to primitive types (like int) when building web
services?
Thanks,
;Amit
HTTP method POST is not supported by this url
Posted by pengster <pe...@correlationtech.com>.
folks,
Can anyone using axis on weblogic give me suggestions on this error?
"HTTP method POST is not supported by this URL"
I got this error when I try to deploy my services by doing ...
"java org.apache.axis.client.AdminClient deploy.wsdd"
My setup... Weblogic 7.0 + Axis beta2 running on Win2K.
I captured the request/response using tcpmon. here they are...
The Response...
HTTP/1.0 400 Bad Request
Date: Fri, 20 Sep 2002 18:09:46 GMT
Server: WebLogic WebLogic Server 7.0 Thu Jun 20 11:47:11 PDT 2002 190955
Content-Length: 45
Content-Type: text/html
Connection: Close
HTTP method POST is not supported by this URL
The Request....
POST /axis/services/AdminService HTTP/1.0
Content-Length: 1197
Host: 192.168.102.21
Content-Type: text/xml; charset=utf-8
SOAPAction: "AdminService"
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body><deployment xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<service name="cc3:Login" provider="java:RPC">
<parameter name="className" value="com.correlationtech.ws.ServiceProviders.Login"/>
<parameter name="methodName" value="login"/>
</service>
<service name="cc3:User" provider="java:RPC">
<parameter name="className" value="com.correlationtech.ws.ServiceProviders.User"/>
<parameter name="methodName" value="list create delete"/>
</service>
<service name="cc3:Team" provider="java:RPC">
<parameter name="className" value="com.correlationtech.ws.ServiceProviders.Team"/>
<parameter name="methodName" value="create"/>
</service>
<service name="cc3:Individual" provider="java:RPC">
<parameter name="className" value="com.correlationtech.ws.ServiceProviders.Individual"/>
<parameter name="methodName" value="create"/>
</service>
</deployment> </SOAP-ENV:Body>
</SOAP-ENV:Envelope>