users@jax-ws.java.net

Re: what is wrong with my web service and its client ?

From: Rama Pulavarthi <Rama.Pulavarthi_at_Sun.COM>
Date: Wed, 17 Jan 2007 22:29:30 -0800

Why can't you use Provider<SOAPMessage> ?
https://jax-ws.dev.java.net/nonav/jax-ws-21-ea3/docs/provider.html
should explain the concept.
A sample
http://fisheye5.cenqua.com/browse/jax-ws-sources/jaxws-ri/samples/provider
shows usage of Provider<Source>, but you can use Provider<SOAPMessage>
to do the same thing you are doing in a handler.
 
thanks,
Rama Pulavarthi

legolas wood wrote:
> Sorry but I have a typo in my last post.
>
> I have correct it now. (first paragraph should be I want to send some
> Attachments to web service from the client and then in the server side i
> want to process those attachments.)
>
>
>
> Vijay Ramachandran wrote:
>
>> Can you please give info on on what you are trying to do ?
>>
> Sure I can.
> *I want to send some Attachments to web service from the client and
> then in the client side i want to process those attachments. *Is it
> correct way to use a handler to extract the SOAPMessage in Server Side?
> I searched all the web and i just find that i can use handlers to
> extract the soap message parts (attachments, header,...)
> So, I create a web service in netbeans IDE, then i made that web
> service to be a handler (as you can see in the source i attached )
> then I create a client for that web service.
>
> I searched the web for this error message and in all thread related to
> this problem, people suggest that it can happen when we have namespace
> mismatch, so I post here as I can not understand that namespace mismatch
>
>
>
>
>
>> From the attachment I see a handler class that also acts as the endpoint ?
>>
> Yes, In my case we need to process the attachment in same place that we
> process other attribute of soapMessage, I did not find any other way to
> extract the attachments, so i used a handler to extract the SOAPmessage....
>
>> Is this what you are trying to do ?
>>
> I am forced to do this, I can not find any other way to use attachments
> :-( .
>
>> And are you packaging any WSDL or are you depending on GF generated
>> WSDL ?
>>
> I am using netbeans to generate the web service and Operation, so I
> think i am depending on GF generated WSDLs.
> here is the WSDL that i can see in the browser when i navigate to its
> link ( http://localhost:8080/returnAttachService/returnAttach?wsdl )
>
> --------------
> <?xml version="1.0" encoding="UTF-8"?>
> <definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
> xmlns:tns="http://localhost:8080/returnAttachService/returnAttach"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> targetNamespace="http://localhost:8080/returnAttachService/returnAttach"
> name="returnAttachService">
> <types>
> <xsd:schema>
> <xsd:import
> namespace="http://localhost:8080/returnAttachService/returnAttach"
> schemaLocation="http://127.0.0.1:8080/returnAttachService/returnAttach/__container$publishing$subctx/META-INF/wsdl/ReturnAttachService_schema1.xsd"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>
> </xsd:schema>
> </types>
> <message name="dispartAttach"/>
> <message name="dispartAttachResponse">
> <part name="return" type="tns:soapMessage"/>
> </message>
> <portType name="returnAttach">
> <operation name="dispartAttach" parameterOrder="">
> <input message="tns:dispartAttach"/>
> <output message="tns:dispartAttachResponse"/>
> </operation>
> </portType>
> <binding name="returnAttachPortBinding" type="tns:returnAttach">
> <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
> style="rpc"/>
> <operation name="dispartAttach">
> <soap:operation soapAction=""/>
> <input>
> <soap:body use="literal"
> namespace="http://localhost:8080/returnAttachService/returnAttach"/>
> </input>
> <output>
> <soap:body use="literal"
> namespace="http://localhost:8080/returnAttachService/returnAttach"/>
> </output>
> </operation>
> </binding>
> <service name="returnAttachService">
> <port name="returnAttachPort" binding="tns:returnAttachPortBinding">
> <soap:address
> location="http://127.0.0.1:8080/returnAttachService/returnAttach"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>
> </port>
> </service>
> </definitions>
> --------------
>
>> legolas wood wrote:
>>
>>> Hi
>>> Thank you for reading my post.
>>> can some one tell me what is wrong with my web service and client that i
>>> write for it?
>>> I attached the source files to this email as a zip archive.
>>>
>>> [code]
>>> Error in decoding SOAP Message
>>> at
>>> com.sun.xml.ws.encoding.soap.server.SOAPXMLDecoder.toInternalMessage(SOAPXMLDecoder.java:91)
>>>
>>> at
>>> com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.toMessageInfo(SOAPMessageDispatcher.java:189)
>>>
>>> at
>>> com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher$SoapInvoker.invoke(SOAPMessageDispatcher.java:573)
>>>
>>> at
>>> com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.receive(SOAPMessageDispatcher.java:147)
>>>
>>> at com.sun.xml.ws.server.Tie.handle(Tie.java:90)
>>> at
>>> com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3MessageDispatcher.java:160)
>>>
>>> at
>>> com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3MessageDispatcher.java:89)
>>>
>>> at
>>> com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint(EjbWebServiceServlet.java:186)
>>>
>>> at
>>> com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebServiceServlet.java:117)
>>>
>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>>> at
>>> com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.java:101)
>>>
>>> at
>>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
>>>
>>> at
>>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
>>>
>>> at
>>> com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:71)
>>> at
>>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
>>>
>>> at
>>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
>>>
>>> at
>>> com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
>>>
>>> at
>>> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
>>> at
>>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
>>>
>>> at
>>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
>>>
>>> at
>>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
>>>
>>> at
>>> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
>>> at
>>> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239)
>>> at
>>> com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
>>>
>>> at
>>> com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
>>>
>>> at
>>> com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
>>>
>>> at
>>> com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
>>>
>>> at
>>> com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
>>>
>>> at
>>> com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
>>> at
>>> com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
>>>
>>> Caused by: javax.xml.ws.soap.SOAPFaultException: Cannot find the
>>> dispatch method
>>> at
>>> com.sun.xml.ws.encoding.soap.SOAPDecoder.raiseFault(SOAPDecoder.java:654)
>>>
>>> at
>>> com.sun.xml.ws.encoding.soap.server.SOAPXMLDecoder.decodeDispatchMethod(SOAPXMLDecoder.java:154)
>>>
>>> at
>>> com.sun.xml.ws.encoding.soap.SOAPDecoder.decodeBodyContent(SOAPDecoder.java:318)
>>>
>>> at
>>> com.sun.xml.ws.encoding.soap.SOAPDecoder.decodeBody(SOAPDecoder.java:308)
>>>
>>> at
>>> com.sun.xml.ws.encoding.soap.SOAPDecoder.decodeEnvelope(SOAPDecoder.java:231)
>>>
>>> at
>>> com.sun.xml.ws.encoding.soap.server.SOAPXMLDecoder.toInternalMessage(SOAPXMLDecoder.java:83)
>>>
>>> ... 29 more
>>> Error in decoding SOAP Message
>>> Error in decoding SOAP Message
>>> at
>>> com.sun.xml.ws.encoding.soap.server.SOAPXMLDecoder.toInternalMessage(SOAPXMLDecoder.java:91)
>>>
>>> at
>>> com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.toMessageInfo(SOAPMessageDispatcher.java:189)
>>>
>>> at
>>> com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher$SoapInvoker.invoke(SOAPMessageDispatcher.java:573)
>>>
>>> at
>>> com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.receive(SOAPMessageDispatcher.java:147)
>>>
>>> at com.sun.xml.ws.server.Tie.handle(Tie.java:90)
>>> at
>>> com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3MessageDispatcher.java:160)
>>>
>>> at
>>> com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3MessageDispatcher.java:89)
>>>
>>> at
>>> com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint(EjbWebServiceServlet.java:186)
>>>
>>> at
>>> com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebServiceServlet.java:117)
>>>
>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>>> at
>>> com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.java:101)
>>>
>>> at
>>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
>>>
>>> at
>>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
>>>
>>> at
>>> com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:71)
>>> at
>>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
>>>
>>> at
>>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
>>>
>>> at
>>> com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
>>>
>>> at
>>> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
>>> at
>>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
>>>
>>> at
>>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
>>>
>>> at
>>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
>>>
>>> at
>>> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
>>> at
>>> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239)
>>> at
>>> com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
>>>
>>> at
>>> com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
>>>
>>> at
>>> com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
>>>
>>> at
>>> com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
>>>
>>> at
>>> com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
>>>
>>> at
>>> com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
>>> at
>>> com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
>>>
>>> Caused by: javax.xml.ws.soap.SOAPFaultException: Cannot find the
>>> dispatch method
>>> at
>>> com.sun.xml.ws.encoding.soap.SOAPDecoder.raiseFault(SOAPDecoder.java:654)
>>>
>>> at
>>> com.sun.xml.ws.encoding.soap.server.SOAPXMLDecoder.decodeDispatchMethod(SOAPXMLDecoder.java:154)
>>>
>>> at
>>> com.sun.xml.ws.encoding.soap.SOAPDecoder.decodeBodyContent(SOAPDecoder.java:318)
>>>
>>> at
>>> com.sun.xml.ws.encoding.soap.SOAPDecoder.decodeBody(SOAPDecoder.java:308)
>>>
>>> at
>>> com.sun.xml.ws.encoding.soap.SOAPDecoder.decodeEnvelope(SOAPDecoder.java:231)
>>>
>>> at
>>> com.sun.xml.ws.encoding.soap.server.SOAPXMLDecoder.toInternalMessage(SOAPXMLDecoder.java:83)
>>>
>>> ... 29 more
>>> [/code]
>>>
>>> Thanks
>>>
>>> ------------------------------------------------------------------------
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe_at_jax-ws.dev.java.net
>>> For additional commands, e-mail: users-help_at_jax-ws.dev.java.net
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jax-ws.dev.java.net
>> For additional commands, e-mail: users-help_at_jax-ws.dev.java.net
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jax-ws.dev.java.net
> For additional commands, e-mail: users-help_at_jax-ws.dev.java.net
>
>