Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Webservice works fine with topic, not with queue?

0 views
Skip to first unread message

Nicolas Lejeune

unread,
Nov 8, 2001, 6:23:36 AM11/8/01
to
Hello guys

We are currenty evaluating WLS6.1 SP1 webservice support for our next B2B
application.

I encountered a strange issue while testing message-style webservices:
everything is fine when my webservice is linked to a topic, but I get an
error when I link it to a queue.

Description using a topic : runs fine
<messageservice action="receive"
name="Prepared_12345"
destination="com.b2boost.webservices.Prepared_12345"
destinationtype="topic"
uri="/Prepared_12345"

connectionfactory="examples.soap.msgService.MsgConnectionFactory"/>
</messageservices>

Description using a queue : generates exception when called
<messageservice action="receive"
name="Prepared_12345"
destination="com.b2boost.webservices.PreparedQ_1234"
destinationtype="queue"
uri="/Prepared_12345"

connectionfactory="examples.soap.msgService.MsgConnectionFactory"/>
</messageservices>

I also tried another connection factory,
weblogic.examples.jms.QueueConnectionFactory, but result is the same.

Exception:
Proxy initialized
method is : Object receive();
Exception in thread "main" java.io.FileNotFoundException:
http://localhost:7001/rip/Prepared_12345
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection
.java:574)
at
sun.net.www.protocol.http.HttpURLConnection.getHeaderFieldKey(HttpURLConnect
ion.java:839)
at
weblogic.soap.WebServiceProxy.getSessionCookie(WebServiceProxy.java:509)
at weblogic.soap.WebServiceProxy.receive(WebServiceProxy.java:477)
at weblogic.soap.WebServiceProxy.invoke(WebServiceProxy.java:431)
at weblogic.soap.SoapMethod.invoke(SoapMethod.java:186)
at
com.b2boost.webservices.client.RetailerClient.main(RetailerClient.java:74)

The weird thing about that exception is that if I try that URL in a browser,
it works and I get
SOAP Message Router
Sorry, I don't speak via HTTP GET - you have to use HTTP POST to talk to me.

This is the client code I use in both cases (remember that the topic version
works, so I assume my client is ok)
Context context = new InitialContext(h);
WebServiceProxy proxy = (WebServiceProxy) context.lookup(url +
"/rip/Prepared_12345/Prepared_12345.wsdl");
System.out.println("Proxy initialized");
SoapMethod method = proxy.getMethod("receive");
System.out.println("method is : " + method.toString());
Object result = method.invoke(null);
System.out.println("method invoked");

Of course I checked in the console that the queue
com.b2boost.webservices.PreparedQ_1234 is well defined and it is.
One more thing, this is what I see in the server console when I try the
queue version
<08-nov.-01 12:12:35 CET> <Error> <HTTP>
<[WebAppServletContext(4400125,web-services,/web-services)] Servlet failed
with Except
ion
java.lang.NullPointerException
at
weblogic.soap.server.servlet.QueueReceiveAdapter.doPost(QueueReceiveAdapter.
java:124)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:265)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:200)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:2456)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:2039)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>

Sorry that was quite a long description. So am I doing something really
stupid here or what? Is there something else to configure when using a jms
queue?

Thanks for your help

Nicolas


0 new messages