[SoapRMI] Session-like behaviour

Pollähne. Ullrich U.Pollaehne_at_seeburger.de
Wed, 6 Feb 2002 09:14:57 +0100


Hi Alek,

>i was able to do sessions and cookies and interact correctly with
sessions in
>Apache SOAP in previous version of XSOAP but did not test it in the
current one.

do you use any special libraries or the normal runtime classes, which
version of the JDK do you use?


>try to do:
>
>
SoapServices.getDefault().setInvoker(HttpConnectionSoapInvoker.getDefaul
t());

Ok, we tried, but again no success, following is the output ("-Ddebug"
is set):

E:\Java\jdk1.3.1_01\bin\javaw -classpath "..."
-Duser.dir=E:\Java\JBossAndProjects\JBoss-2.4.1\bin
-Dserver.dir="E:\Entwicklung\BIS_GUI_NEW" -Dserver=brachmann
-DclientAuth=C:/Java/JBossAndProjects/JBoss-2.4.1/client/auth.conf
-Djava.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-Djava.naming.provider.url=brachmann:1099
-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.crimson.jaxp.Docum
entBuilderFactoryImpl
-Djavax.xml.parsers.SAXParserFactory=org.apache.crimson.jaxp.SAXParserFa
ctoryImpl -Ddebug com.seeburger.test.XSoapTestClient 
[ main: HttpConnectionSoapInvocationHandler.java:61 invokeTransport ]
opening HTTP connection to http://localhost:8080/xsoap/statefuldbaccess
to execute remote method initDBResult
port=Port[name=,portType=PortType[uri=urn:soaprmi-v11:temp-java-port-typ
e,name=com.seeburger.test.StatefulDBAccessService],endpoint=Endpoint[loc
ation=http://localhost:8080/xsoap/statefuldbaccess,binding=null]] [
main: MethodInvoker.java:203 sendRequest ] invoking remote method
initDBResult [ main: MethodInvoker.java:205 sendRequest ] method
initDBResult params[0]=com.seeburger.test.XSoapTestClient [ main:
MethodInvoker.java:205 sendRequest ] method initDBResult params[1]=test
[ main: MethodInvoker.java:259 sendRequest ] TRACE sending len=511:---
<SOAP-ENV:Envelope
xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'
xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/'
xmlns:xsi='http://www.w3.org/1999/XMLSchema-instance'
xmlns:xsd='http://www.w3.org/1999/XMLSchema'
SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
<SOAP-ENV:Body>
<initDBResult>
<initDBResult
xsi:type='xsd:string'>com.seeburger.test.XSoapTestClient</initDBResult>
<p2 xsi:type='xsd:string'>test</p2>
</initDBResult>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
---
 [ main: Util.java:121 getContentTypeCharset ] ndx=-1 from
contentType=text/xml [ main:
HttpConnectionSoapInvocationHandler.java:101 invokeTransport ] got
charset=null from contentType=text/xml [ main: MethodInvoker.java:272
receiveResponse ] TRACE reading response to buffer [ main:
MethodInvoker.java:282 receiveResponse ] TRACE received: len=446
---
<SOAP-ENV:Envelope
xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'
xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/'
xmlns:xsi='http://www.w3.org/1999/XMLSchema-instance'
xmlns:xsd='http://www.w3.org/1999/XMLSchema'
SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
<SOAP-ENV:Body>
<initDBResultResponse>
<return xsi:type='xsd:int'>4711</return>
</initDBResultResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
---
Server said '4711'  [ main: MethodInvoker.java:431 receiveResponse ]
method initDBResult result=4711 [ main:
HttpConnectionSoapInvocationHandler.java:61 invokeTransport ] opening
HTTP connection to http://localhost:8080/xsoap/statefuldbaccess to
execute remote method initDBResult
port=Port[name=,portType=PortType[uri=urn:soaprmi-v11:temp-java-port-typ
e,name=com.seeburger.test.StatefulDBAccessService],endpoint=Endpoint[loc
ation=http://localhost:8080/xsoap/statefuldbaccess,binding=null]] [
main: MethodInvoker.java:203 sendRequest ] invoking remote method
initDBResult [ main: MethodInvoker.java:205 sendRequest ] method
initDBResult params[0]=com.seeburger.test.XSoapTestClient [ main:
MethodInvoker.java:205 sendRequest ] method initDBResult params[1]=test
[ main: MethodInvoker.java:259 sendRequest ] TRACE sending len=511:---
<SOAP-ENV:Envelope
xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'
xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/'
xmlns:xsi='http://www.w3.org/1999/XMLSchema-instance'
xmlns:xsd='http://www.w3.org/1999/XMLSchema'
SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
<SOAP-ENV:Body>
<initDBResult>
<initDBResult
xsi:type='xsd:string'>com.seeburger.test.XSoapTestClient</initDBResult>
<p2 xsi:type='xsd:string'>test</p2>
</initDBResult>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
---
 [ main: Util.java:121 getContentTypeCharset ] ndx=-1 from
contentType=text/xml [ main:
HttpConnectionSoapInvocationHandler.java:101 invokeTransport ] got
charset=null from contentType=text/xml [ main: MethodInvoker.java:272
receiveResponse ] TRACE reading response to buffer [ main:
MethodInvoker.java:282 receiveResponse ] TRACE received: len=446
---
<SOAP-ENV:Envelope
xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'
xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/'
xmlns:xsi='http://www.w3.org/1999/XMLSchema-instance'
xmlns:xsd='http://www.w3.org/1999/XMLSchema'
SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
<SOAP-ENV:Body>
<initDBResultResponse>
<return xsi:type='xsd:int'>4711</return>
</initDBResultResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
---
Now, server said '4711'  [ main: MethodInvoker.java:431 receiveResponse
] method initDBResult result=4711 



What are we doing wrong?

Ullrich.