Problem invoking Webservice

Hi there,

i've developed a webservice on windows, using netbeans 5.5 with its integrated tomcat and jax-ws. It works without problems. then I'm trying to run the service on another maschine with RHEL4, tomcat 5.5, jdk-ibm 1.5. unfortunately it doesn't work as I thought.

The service is successfuly deployed on tomcat. I can even see the wsdl file on browser. Now I'm trying to invoke the service from my windows maschine. I built a webservice client. As the client tries to invoke the service, I get this error message:

26.04.2007 10:17:34 com.sun.xml.messaging.saaj.soap.MessageImpl identifyContentType

SCHWERWIEGEND: SAAJ0537: Invalid Content-Type. Could be an error message instead of a SOAP message

javax.xml.ws.WebServiceException: Couldn't create SOAP message due to exception: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Invalid Content-Type:text/html. Is this an error message instead of a SOAP response?

at com.sun.xml.ws.util.SOAPConnectionUtil.getSOAPMessage(SOAPConnectionUtil.java:81)

at com.sun.xml.ws.encoding.soap.client.SOAPXMLDecoder.toSOAPMessage(SOAPXMLDecoder.java:100)

at com.sun.xml.ws.protocol.soap.client.SOAPMessageDispatcher.receive(SOAPMessageDispatcher.java:438)

at com.sun.xml.ws.protocol.soap.client.SOAPMessageDispatcher.doSend(SOAPMessageDispatcher.java:258)

at com.sun.xml.ws.protocol.soap.client.SOAPMessageDispatcher.send(SOAPMessageDispatcher.java:137)

at com.sun.xml.ws.encoding.soap.internal.DelegateBase.send(DelegateBase.java:84)

at com.sun.xml.ws.client.EndpointIFInvocationHandler.implementSEIMethod(EndpointIFInvocationHandler.java:172)

at com.sun.xml.ws.client.EndpointIFInvocationHandler.invoke(EndpointIFInvocationHandler.java:106)

at $Proxy16.operation(Unknown Source)

at test.Main.main(Main.java:32)

Caused by: Couldn't create SOAP message due to exception: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Invalid Content-Type:text/html. Is this an error message instead of a SOAP response?

at com.sun.xml.ws.util.SOAPUtil.createMessage(SOAPUtil.java:152)

at com.sun.xml.ws.util.SOAPConnectionUtil.getSOAPMessage(SOAPConnectionUtil.java:76)

... 9 more

Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Invalid Content-Type:text/html. Is this an error message instead of a SOAP response?

at com.sun.xml.messaging.saaj.soap.MessageImpl.identifyContentType(MessageImpl.java:600)

at com.sun.xml.messaging.saaj.soap.MessageImpl.<init>(MessageImpl.java:273)

at com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl.<init>(Message1_1Impl.java:68)

at com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl.createMessage(SOAPMessageFactory1_1Impl.java:62)

at com.sun.xml.ws.util.SOAPUtil.createMessage(SOAPUtil.java:150)

... 10 more

has anybody got this issue? maybe one of you had experiences solving this issue. thanks a lot.

Erwin

[2984 byte] By [cemoxa] at [2007-11-27 2:26:37]
# 1

It looks like the client is not invoking a valid endpoint as it is probably getting back an HTML response. You can try to explicitly set the endpoint address on the client port by doing the following.

port = myService.getXXX();

port.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, address);

dkohlerta at 2007-7-12 2:36:10 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2

Are you sure that this statement is correct? I wrote it down

in my source code, but there is no such a method for port.

getRequestContext() is unknown.

> port.getRequestContext().put(BindingProvider.ENDPOINT_

> ADDRESS_PROPERTY, address);

Recently I made some experimentals with Axis. I installed it on the linux maschine. And then I try to create a client based on JAX-WS on windows maschine, just want to make sure if everything is ok! As JAX-WS is trying to generate the source code from entered WSDL, a new error message comes. It says:

"rpc/encoded wsdls are not supported in JAX-WS 2.0."

hhhmm... confused!!!!

Message was edited by:

cemox

cemoxa at 2007-7-12 2:36:10 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3
Sorry, I forgot the cast.((BindingProvider)port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, address);
dkohlerta at 2007-7-12 2:36:10 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...