Is it me, NB 4.1, or sun.xml.rpc... again?

classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

Is it me, NB 4.1, or sun.xml.rpc... again?

Bruno Lotse
Hi everybody,
I am playing with various features of NB 4.1,
especially relating to web services.

Created a very simple WSDL

<?xml version="1.0" encoding="UTF-8"?>
<definitions
targetNamespace="http://my.webservice.namespace"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:y="http://my.webservice.namespace"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://schemas.xmlsoap.org/wsdl/
D:\xml\dtd\wsdl\schema\1.1\WSDL.1.1.xsd">
        <message name="EchoStringRequest">
                <part name="input" type="xs:string"/>
        </message>
        <message name="EchoStringResponse">
                <part name="output" type="xs:string"/>
        </message>
        <portType name="SOAPport">
                <operation name="y:EchoString">
                        <input message="y:EchoStringRequest"/>
                        <output message="y:EchoStringResponse"/>
                </operation>
        </portType>
        <binding name="MyServiceBinding" type="y:SOAPport">
                <soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
                <operation name="y:EchoString">
                        <input>
                                <soap:body use="literal"/>
                        </input>
                        <output>
                                <soap:body use="literal"/>
                        </output>
                </operation>
        </binding>
        <service name="MyService">
                <port binding="y:MyServiceBinding"
name="MyServicePort">
                        <soap:address
location="http:\\localhost:8080\MyService\"/>
                </port>
        </service>
</definitions>

Take a note to this scriplet

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://schemas.xmlsoap.org/wsdl/
D:\xml\dtd\wsdl\schema\1.1\WSDL.1.1.xsd"

So, I've checked validity of the document against
v.1.1 of the WSDL schema. No problems here. The WSDL
looks and feels perfectly valid.

But whenever I am trying to generate a web service
from this WSDL in NB4.1 Win and Linux platforms I am
getting this

input message of binding operation "y:EchoString" must
specify a value for the "namespace" attribute
        at
com.sun.xml.rpc.processor.modeler.wsdl.WSDLModelerBase.getRequestNamespaceURI(WSDLModelerBase.java:2216)
        at
com.sun.xml.rpc.processor.modeler.wsdl.WSDLModelerBase.processSOAPOperationRPCLiteralStyle(WSDLModelerBase.java:2325)
        at
com.sun.xml.rpc.processor.modeler.wsdl.WSDLModelerBase.processSOAPOperation(WSDLModelerBase.java:905)
        at
com.sun.xml.rpc.processor.modeler.wsdl.WSDLModelerBase.processPort(WSDLModelerBase.java:763)
        at
com.sun.xml.rpc.processor.modeler.wsdl.WSDLModelerBase.processService(WSDLModelerBase.java:519)
        at
com.sun.xml.rpc.processor.modeler.wsdl.WSDLModelerBase.internalBuildModel(WSDLModelerBase.java:354)
        at
com.sun.xml.rpc.processor.modeler.wsdl.WSDLModelerBase.buildModel(WSDLModelerBase.java:238)
        at
com.sun.xml.rpc.processor.config.ModelInfo.buildModel(ModelInfo.java:88)
        at
com.sun.xml.rpc.processor.Processor.runModeler(Processor.java:63)
        at
com.sun.xml.rpc.tools.wscompile.CompileTool.run(CompileTool.java:714)
        at
com.sun.xml.rpc.util.ToolBase.run(ToolBase.java:43)
        at
com.sun.xml.rpc.tools.wscompile.Main.main(Main.java:22)
error: input message of binding operation
"y:EchoString" must specify a value for the
"namespace" attribute
D:\project\netbeans\TestSchema\nbproject\build-impl.xml:237:
wscompile failed

Eh? Why is that? Why should I specify anything else if
W3C WSDL 1.1 schema says that my file is valid?

Any ideas?

Cheers,
Bruno




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 
Reply | Threaded
Open this post in threaded view
|

Re: Is it me, NB 4.1, or sun.xml.rpc... again?

Roderico Cruz
The SOAP binding entries for the input and output required the
declaration of the namespace, i.e.:

<binding name="MyServiceBinding" type="y:SOAPport">
        <soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="y:EchoString">
            <input>
                <soap:body use="literal"
namespace="http://my.webservice.namespace"/>
            </input>
            <output>
                <soap:body use="literal"
namespace="http://my.webservice.namespace"/>
            </output>
        </operation>
    </binding>

Attached is the revised wsdl that works.
Hope this helps.
Rico Cruz

Bruno Lotse wrote:

>Hi everybody,
>I am playing with various features of NB 4.1,
>especially relating to web services.
>
>Created a very simple WSDL
>
><?xml version="1.0" encoding="UTF-8"?>
><definitions
>targetNamespace="http://my.webservice.namespace"
>xmlns="http://schemas.xmlsoap.org/wsdl/"
>xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
>xmlns:xs="http://www.w3.org/2001/XMLSchema"
>xmlns:y="http://my.webservice.namespace"
>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>xsi:schemaLocation="http://schemas.xmlsoap.org/wsdl/
>D:\xml\dtd\wsdl\schema\1.1\WSDL.1.1.xsd">
> <message name="EchoStringRequest">
> <part name="input" type="xs:string"/>
> </message>
> <message name="EchoStringResponse">
> <part name="output" type="xs:string"/>
> </message>
> <portType name="SOAPport">
> <operation name="y:EchoString">
> <input message="y:EchoStringRequest"/>
> <output message="y:EchoStringResponse"/>
> </operation>
> </portType>
> <binding name="MyServiceBinding" type="y:SOAPport">
> <soap:binding style="rpc"
>transport="http://schemas.xmlsoap.org/soap/http"/>
> <operation name="y:EchoString">
> <input>
> <soap:body use="literal"/>
> </input>
> <output>
> <soap:body use="literal"/>
> </output>
> </operation>
> </binding>
> <service name="MyService">
> <port binding="y:MyServiceBinding"
>name="MyServicePort">
> <soap:address
>location="http:\\localhost:8080\MyService\"/>
> </port>
> </service>
></definitions>
>
>Take a note to this scriplet
>
>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>xsi:schemaLocation="http://schemas.xmlsoap.org/wsdl/
>D:\xml\dtd\wsdl\schema\1.1\WSDL.1.1.xsd"
>
>So, I've checked validity of the document against
>v.1.1 of the WSDL schema. No problems here. The WSDL
>looks and feels perfectly valid.
>
>But whenever I am trying to generate a web service
>from this WSDL in NB4.1 Win and Linux platforms I am
>getting this
>
>input message of binding operation "y:EchoString" must
>specify a value for the "namespace" attribute
>        at
>com.sun.xml.rpc.processor.modeler.wsdl.WSDLModelerBase.getRequestNamespaceURI(WSDLModelerBase.java:2216)
>        at
>com.sun.xml.rpc.processor.modeler.wsdl.WSDLModelerBase.processSOAPOperationRPCLiteralStyle(WSDLModelerBase.java:2325)
>        at
>com.sun.xml.rpc.processor.modeler.wsdl.WSDLModelerBase.processSOAPOperation(WSDLModelerBase.java:905)
>        at
>com.sun.xml.rpc.processor.modeler.wsdl.WSDLModelerBase.processPort(WSDLModelerBase.java:763)
>        at
>com.sun.xml.rpc.processor.modeler.wsdl.WSDLModelerBase.processService(WSDLModelerBase.java:519)
>        at
>com.sun.xml.rpc.processor.modeler.wsdl.WSDLModelerBase.internalBuildModel(WSDLModelerBase.java:354)
>        at
>com.sun.xml.rpc.processor.modeler.wsdl.WSDLModelerBase.buildModel(WSDLModelerBase.java:238)
>        at
>com.sun.xml.rpc.processor.config.ModelInfo.buildModel(ModelInfo.java:88)
>        at
>com.sun.xml.rpc.processor.Processor.runModeler(Processor.java:63)
>        at
>com.sun.xml.rpc.tools.wscompile.CompileTool.run(CompileTool.java:714)
>        at
>com.sun.xml.rpc.util.ToolBase.run(ToolBase.java:43)
>        at
>com.sun.xml.rpc.tools.wscompile.Main.main(Main.java:22)
>error: input message of binding operation
>"y:EchoString" must specify a value for the
>"namespace" attribute
>D:\project\netbeans\TestSchema\nbproject\build-impl.xml:237:
>wscompile failed
>
>Eh? Why is that? Why should I specify anything else if
>W3C WSDL 1.1 schema says that my file is valid?
>
>Any ideas?
>
>Cheers,
>Bruno
>
>
>
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam?  Yahoo! Mail has the best spam protection around
>http://mail.yahoo.com 
>  
>

--
Roderico Cruz
Sun Microsystems
(650) 786-4824


<?xml version="1.0" encoding="UTF-8"?>
<definitions
targetNamespace="http://my.webservice.namespace"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:y="http://my.webservice.namespace"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://schemas.xmlsoap.org/wsdl/
D:\xml\dtd\wsdl\schema\1.1\WSDL.1.1.xsd">
        <message name="EchoStringRequest">
                <part name="input" type="xs:string"/>
        </message>
        <message name="EchoStringResponse">
                <part name="output" type="xs:string"/>
        </message>
        <portType name="SOAPport">
                <operation name="y:EchoString">
                        <input message="y:EchoStringRequest"/>
                        <output message="y:EchoStringResponse"/>
                </operation>
        </portType>
        <binding name="MyServiceBinding" type="y:SOAPport">
                <soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
                <operation name="y:EchoString">
                        <input>
                                <soap:body use="literal" namespace="http://my.webservice.namespace"/>
                        </input>
                        <output>
                                <soap:body use="literal" namespace="http://my.webservice.namespace"/>
                        </output>
                </operation>
        </binding>
        <service name="MyService">
                <port binding="y:MyServiceBinding"
name="MyServicePort">
                        <soap:address
location="http:\\localhost:8080\MyService\"/>
                </port>
        </service>
</definitions>
Reply | Threaded
Open this post in threaded view
|

Re: Is it me, NB 4.1, or sun.xml.rpc... again?

Bruno Lotse
Hi, Roderico.
I've tried it and must say it works. Thank you! It
works though at least partially - in terms of just
creating a web service. Yet whenever I am trying to
create a handler to the service, register the service,
and test it, I am getting this:

#|2005-08-23T12:49:27.958-0400|SEVERE|sun-appserver-pe8.1_02|javax.xml.messaging.saaj.soap|_ThreadID=23;|SAAJ0511:
Unable to create envelope from given source|#]
[#|2005-08-23T12:49:27.958-0400|SEVERE|sun-appserver-pe8.1_02|com.sun.xml.rpc.server|_ThreadID=23;|Unable
to create envelope from given source:
com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable
to create envelope from given source:
        at
com.sun.xml.messaging.saaj.soap.EnvelopeFactory.createEnvelope(EnvelopeFactory.java:95)
        at
com.sun.xml.messaging.saaj.soap.ver1_1.SOAPPart1_1Impl.createEnvelopeFromSource(SOAPPart1_1Impl.java:34)
        at
com.sun.xml.messaging.saaj.soap.SOAPPartImpl.getEnvelope(SOAPPartImpl.java:82)
        at
com.sun.xml.rpc.client.HandlerChainImpl.checkMustUnderstand(HandlerChainImpl.java:235)
        at
com.sun.xml.rpc.server.StreamingHandler.callRequestHandlers(StreamingHandler.java:901)
        at
com.sun.xml.rpc.server.StreamingHandler.preHandlingHook(StreamingHandler.java:831)
        at
com.ileonov.net.SOAPport_Tie.preHandlingHook(SOAPport_Tie.java:238)
        at
com.sun.xml.rpc.server.StreamingHandler.handle(StreamingHandler.java:102)
        at
com.sun.xml.rpc.server.http.JAXRPCServletDelegate.doPost(JAXRPCServletDelegate.java:443)
        at
com.sun.enterprise.webservice.JAXRPCServlet.doPost(JAXRPCServlet.java:50)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:767)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
        at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at
java.lang.reflect.Method.invoke(Method.java:585)
        at
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
        at
java.security.AccessController.doPrivileged(Native
Method)
        at
javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
        at
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
        at
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
        at
org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
        at
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
        at
java.security.AccessController.doPrivileged(Native
Method)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
        at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
        at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:185)
        at
com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:653)
        at
com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:534)
        at
com.sun.enterprise.web.connector.grizzly.ProcessorTask.doTask(ProcessorTask.java:403)
        at
com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:55)
Caused by: javax.xml.transform.TransformerException:
org.xml.sax.SAXParseException: Element type "ns0:y"
must be followed by either attribute specifications,
">" or "/>".
        at
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:650)
        at
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:279)
        at
com.sun.xml.messaging.saaj.soap.EnvelopeFactory.createEnvelope(EnvelopeFactory.java:83)
        ... 40 more
Caused by: org.xml.sax.SAXParseException: Element type
"ns0:y" must be followed by either attribute
specifications, ">" or "/>".
        at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1269)
        at
org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333)
        at
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:584)
        at
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:638)
        ... 42 more
CAUSE:
javax.xml.t

Any hint what might be the cause of this. Service
created fine - any attempt of attaching a message
handler - boom. Evidently there's still something
wrong in wsdl from the standpoint of sun.xml.rpc.

Looking forward to hearing from you.
Cheers,
Bruno

 

--- Roderico Cruz <[hidden email]> wrote:

> The SOAP binding entries for the input and output
> required the
> declaration of the namespace, i.e.:
>
> <binding name="MyServiceBinding" type="y:SOAPport">
>         <soap:binding style="rpc"
> transport="http://schemas.xmlsoap.org/soap/http"/>
>         <operation name="y:EchoString">
>             <input>
>                 <soap:body use="literal"
> namespace="http://my.webservice.namespace"/>
>             </input>
>             <output>
>                 <soap:body use="literal"
> namespace="http://my.webservice.namespace"/>
>             </output>
>         </operation>
>     </binding>
>
> Attached is the revised wsdl that works.
> Hope this helps.
> Rico Cruz
>
> Bruno Lotse wrote:
>
> >Hi everybody,
> >I am playing with various features of NB 4.1,
> >especially relating to web services.
> >
> >Created a very simple WSDL
> >
> ><?xml version="1.0" encoding="UTF-8"?>
> ><definitions
> >targetNamespace="http://my.webservice.namespace"
> >xmlns="http://schemas.xmlsoap.org/wsdl/"
> >xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>
>xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> >xmlns:xs="http://www.w3.org/2001/XMLSchema"
> >xmlns:y="http://my.webservice.namespace"
>
>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
>xsi:schemaLocation="http://schemas.xmlsoap.org/wsdl/
> >D:\xml\dtd\wsdl\schema\1.1\WSDL.1.1.xsd">
> > <message name="EchoStringRequest">
> > <part name="input" type="xs:string"/>
> > </message>
> > <message name="EchoStringResponse">
> > <part name="output" type="xs:string"/>
> > </message>
> > <portType name="SOAPport">
> > <operation name="y:EchoString">
> > <input message="y:EchoStringRequest"/>
> > <output message="y:EchoStringResponse"/>
> > </operation>
> > </portType>
> > <binding name="MyServiceBinding"
> type="y:SOAPport">
> > <soap:binding style="rpc"
> >transport="http://schemas.xmlsoap.org/soap/http"/>
> > <operation name="y:EchoString">
> > <input>
> > <soap:body use="literal"/>
> > </input>
> > <output>
> > <soap:body use="literal"/>
> > </output>
> > </operation>
> > </binding>
> > <service name="MyService">
> > <port binding="y:MyServiceBinding"
> >name="MyServicePort">
> > <soap:address
> >location="http:\\localhost:8080\MyService\"/>
> > </port>
> > </service>
> ></definitions>
> >
> >Take a note to this scriplet
> >
>
>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
>xsi:schemaLocation="http://schemas.xmlsoap.org/wsdl/
> >D:\xml\dtd\wsdl\schema\1.1\WSDL.1.1.xsd"
> >
> >So, I've checked validity of the document against
> >v.1.1 of the WSDL schema. No problems here. The
> WSDL
> >looks and feels perfectly valid.
> >
> >But whenever I am trying to generate a web service
> >from this WSDL in NB4.1 Win and Linux platforms I
> am
> >getting this
> >
> >input message of binding operation "y:EchoString"
> must
> >specify a value for the "namespace" attribute
> >        at
>
>com.sun.xml.rpc.processor.modeler.wsdl.WSDLModelerBase.getRequestNamespaceURI(WSDLModelerBase.java:2216)
> >        at
>
>com.sun.xml.rpc.processor.modeler.wsdl.WSDLModelerBase.processSOAPOperationRPCLiteralStyle(WSDLModelerBase.java:2325)
> >        at
>
>com.sun.xml.rpc.processor.modeler.wsdl.WSDLModelerBase.processSOAPOperation(WSDLModelerBase.java:905)
> >        at
>
>com.sun.xml.rpc.processor.modeler.wsdl.WSDLModelerBase.processPort(WSDLModelerBase.java:763)
> >        at
>
>com.sun.xml.rpc.processor.modeler.wsdl.WSDLModelerBase.processService(WSDLModelerBase.java:519)
> >        at
>
>com.sun.xml.rpc.processor.modeler.wsdl.WSDLModelerBase.internalBuildModel(WSDLModelerBase.java:354)
> >        at
>
>com.sun.xml.rpc.processor.modeler.wsdl.WSDLModelerBase.buildModel(WSDLModelerBase.java:238)
> >        at
>
>com.sun.xml.rpc.processor.config.ModelInfo.buildModel(ModelInfo.java:88)
> >        at
>
>com.sun.xml.rpc.processor.Processor.runModeler(Processor.java:63)
> >        at
>
>com.sun.xml.rpc.tools.wscompile.CompileTool.run(CompileTool.java:714)
> >        at
> >com.sun.xml.rpc.util.ToolBase.run(ToolBase.java:43)
> >        at
>
>com.sun.xml.rpc.tools.wscompile.Main.main(Main.java:22)
> >error: input message of binding operation
> >"y:EchoString" must specify a value for the
> >"namespace" attribute
>
>D:\project\netbeans\TestSchema\nbproject\build-impl.xml:237:
> >wscompile failed
> >
> >Eh? Why is that? Why should I specify anything else
> if
> >W3C WSDL 1.1 schema says that my file is valid?
> >
> >Any ideas?
> >
> >Cheers,
> >Bruno
> >
> >
> >
> >
> >__________________________________________________
> >Do You Yahoo!?
> >Tired of spam?  Yahoo! Mail has the best spam
> protection around
> >http://mail.yahoo.com 
> >  
> >
>
>
> --
> Roderico Cruz
> Sun Microsystems
> (650) 786-4824
>
> > <?xml version="1.0" encoding="UTF-8"?>
> <definitions
> targetNamespace="http://my.webservice.namespace"
> xmlns="http://schemas.xmlsoap.org/wsdl/"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:y="http://my.webservice.namespace"
>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

> xsi:schemaLocation="http://schemas.xmlsoap.org/wsdl/
> D:\xml\dtd\wsdl\schema\1.1\WSDL.1.1.xsd">
> <message name="EchoStringRequest">
> <part name="input" type="xs:string"/>
> </message>
> <message name="EchoStringResponse">
> <part name="output" type="xs:string"/>
> </message>
> <portType name="SOAPport">
> <operation name="y:EchoString">
> <input message="y:EchoStringRequest"/>
> <output message="y:EchoStringResponse"/>
> </operation>
> </portType>
> <binding name="MyServiceBinding" type="y:SOAPport">
> <soap:binding style="rpc"
> transport="http://schemas.xmlsoap.org/soap/http"/>
> <operation name="y:EchoString">
> <input>
> <soap:body use="literal"
> namespace="http://my.webservice.namespace"/>
> </input>
> <output>
> <soap:body use="literal"
> namespace="http://my.webservice.namespace"/>
> </output>
> </operation>
> </binding>
> <service name="MyService">
> <port binding="y:MyServiceBinding"
> name="MyServicePort">
> <soap:address
> location="http:\\localhost:8080\MyService\"/>
> </port>
> </service>
> </definitions>
>



       

       
               
__________________________________________________________
Find your next car at http://autos.yahoo.ca
Reply | Threaded
Open this post in threaded view
|

Re: Is it me, NB 4.1, or sun.xml.rpc... again?

Bruno Lotse
I also tried a template wsdl with xml entities to see
how NB4.1 and com.sun.rpc handle this. Happy to say
that a template file was properly parsed and a web
service generated. But the same problem with a service
handler. Should I create one, register with the
service, deploy the service and try to test it, I am
getting exceptions all over - cannot generate a SOAP
envelope.
So the same problem as below.
This is wsdl which I ran:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE definitions [
        <!ENTITY SERVICE "MyNewService">
        <!ENTITY SERVICE_NS
"http://my.new.webservice/namespace">
        <!ENTITY SERVICE_URL
"http://localhost:8080/MyService">
        <!ENTITY OPERATION "myOperation">
        <!ENTITY INPUT "input">
        <!ENTITY OUTPUT "output">
        <!ENTITY PORT "SOAPport">
]>
<definitions name="&SERVICE;" xmlns:tns="&SERVICE_NS;"
targetNamespace="&SERVICE_NS;"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"  >
        <message name="&SERVICE;_request">
                <part name="&INPUT;" type="xs:string"/>
        </message>
        <message name="&SERVICE;_response">
                <part name="&OUTPUT;" type="xs:string"/>
        </message>
        <portType name="&PORT;_type">
                <operation name="tns:&OPERATION;">
                        <input message="tns:&SERVICE;_request"/>
                        <output message="tns:&SERVICE;_response"/>
                </operation>
        </portType>
        <binding name="&PORT;_binding"
type="tns:&PORT;_type">
                <soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
                <operation name="tns:&OPERATION;">
                        <input>
                                <soap:body use="literal"
namespace="&SERVICE_NS;"/>
                        </input>
                        <output>
                                <soap:body use="literal"
namespace="&SERVICE_NS;"/>
                        </output>
                </operation>
        </binding>
        <service name="&SERVICE;">
                <port name="My&PORT;" binding="tns:&PORT;_binding">
                        <soap:address location="&SERVICE_URL;"/>
                </port>
        </service>
</definitions>


--- Bruno Lotse <[hidden email]> wrote:

> Hi, Roderico.
> I've tried it and must say it works. Thank you! It
> works though at least partially - in terms of just
> creating a web service. Yet whenever I am trying to
> create a handler to the service, register the
> service,
> and test it, I am getting this:
>
>
#|2005-08-23T12:49:27.958-0400|SEVERE|sun-appserver-pe8.1_02|javax.xml.messaging.saaj.soap|_ThreadID=23;|SAAJ0511:
> Unable to create envelope from given source|#]
>
[#|2005-08-23T12:49:27.958-0400|SEVERE|sun-appserver-pe8.1_02|com.sun.xml.rpc.server|_ThreadID=23;|Unable
> to create envelope from given source:
> com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable
> to create envelope from given source:
>         at
>
com.sun.xml.messaging.saaj.soap.EnvelopeFactory.createEnvelope(EnvelopeFactory.java:95)
>         at
>
com.sun.xml.messaging.saaj.soap.ver1_1.SOAPPart1_1Impl.createEnvelopeFromSource(SOAPPart1_1Impl.java:34)
>         at
>
com.sun.xml.messaging.saaj.soap.SOAPPartImpl.getEnvelope(SOAPPartImpl.java:82)
>         at
>
com.sun.xml.rpc.client.HandlerChainImpl.checkMustUnderstand(HandlerChainImpl.java:235)
>         at
>
com.sun.xml.rpc.server.StreamingHandler.callRequestHandlers(StreamingHandler.java:901)
>         at
>
com.sun.xml.rpc.server.StreamingHandler.preHandlingHook(StreamingHandler.java:831)
>         at
>
com.ileonov.net.SOAPport_Tie.preHandlingHook(SOAPport_Tie.java:238)
>         at
>
com.sun.xml.rpc.server.StreamingHandler.handle(StreamingHandler.java:102)
>         at
>
com.sun.xml.rpc.server.http.JAXRPCServletDelegate.doPost(JAXRPCServletDelegate.java:443)
>         at
>
com.sun.enterprise.webservice.JAXRPCServlet.doPost(JAXRPCServlet.java:50)
>         at
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:767)
>         at
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
>         at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at
> java.lang.reflect.Method.invoke(Method.java:585)
>         at
>
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
>         at
> java.security.AccessController.doPrivileged(Native
> Method)
>         at
>
javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
>         at
>
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
>         at
>
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
>         at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
>         at
>
org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
>         at
>
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
>         at
> java.security.AccessController.doPrivileged(Native
> Method)
>         at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
>         at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
>         at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
>         at
>
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
>         at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
>         at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
>         at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
>         at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
>         at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)
>         at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
>         at
>
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
>         at
>
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:185)
>         at
>
com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:653)
>         at
>
com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:534)
>         at
>
com.sun.enterprise.web.connector.grizzly.ProcessorTask.doTask(ProcessorTask.java:403)
>         at
>
com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:55)
> Caused by: javax.xml.transform.TransformerException:
> org.xml.sax.SAXParseException: Element type "ns0:y"
> must be followed by either attribute specifications,
> ">" or "/>".
>         at
>
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:650)
>         at
>
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:279)
>         at
>
com.sun.xml.messaging.saaj.soap.EnvelopeFactory.createEnvelope(EnvelopeFactory.java:83)
>         ... 40 more
> Caused by: org.xml.sax.SAXParseException: Element
> type
> "ns0:y" must be followed by either attribute
> specifications, ">" or "/>".
>         at
>
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1269)
>         at
>
org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333)
>         at
>
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:584)
>         at
>
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:638)

>         ... 42 more
> CAUSE:
> javax.xml.t
>
> Any hint what might be the cause of this. Service
> created fine - any attempt of attaching a message
> handler - boom. Evidently there's still something
> wrong in wsdl from the standpoint of sun.xml.rpc.
>
> Looking forward to hearing from you.
> Cheers,
> Bruno
>
>  
>
> --- Roderico Cruz <[hidden email]> wrote:
>
> > The SOAP binding entries for the input and output
> > required the
> > declaration of the namespace, i.e.:
> >
> > <binding name="MyServiceBinding"
> type="y:SOAPport">
> >         <soap:binding style="rpc"
> > transport="http://schemas.xmlsoap.org/soap/http"/>
> >         <operation name="y:EchoString">
> >             <input>
> >                 <soap:body use="literal"
> > namespace="http://my.webservice.namespace"/>
> >             </input>
> >             <output>
> >                 <soap:body use="literal"
> > namespace="http://my.webservice.namespace"/>
> >             </output>
> >         </operation>
> >     </binding>
> >
> > Attached is the revised wsdl that works.
> > Hope this helps.
> > Rico Cruz
> >
> > Bruno Lotse wrote:
> >
> > >Hi everybody,
> > >I am playing with various features of NB 4.1,
> > >especially relating to web services.
> > >
> > >Created a very simple WSDL
> > >
> > ><?xml version="1.0" encoding="UTF-8"?>
> > ><definitions
> > >targetNamespace="http://my.webservice.namespace"
> > >xmlns="http://schemas.xmlsoap.org/wsdl/"
> >
> >xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> >
>
>xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> > >xmlns:xs="http://www.w3.org/2001/XMLSchema"
> > >xmlns:y="http://my.webservice.namespace"
> >
>
>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >
>
>xsi:schemaLocation="http://schemas.xmlsoap.org/wsdl/
> > >D:\xml\dtd\wsdl\schema\1.1\WSDL.1.1.xsd">
> > > <message name="EchoStringRequest">
> > > <part name="input" type="xs:string"/>
> > > </message>
> > > <message name="EchoStringResponse">
> > > <part name="output" type="xs:string"/>
> > > </message>
> > > <portType name="SOAPport">
> > > <operation name="y:EchoString">
> > > <input message="y:EchoStringRequest"/>
> > > <output message="y:EchoStringResponse"/>
> > > </operation>
> > > </portType>
> > > <binding name="MyServiceBinding"
> > type="y:SOAPport">
> > > <soap:binding style="rpc"
>
=== message truncated ===



       

       
               
__________________________________________________________
Find your next car at http://autos.yahoo.ca
Reply | Threaded
Open this post in threaded view
|

Re: Is it me, NB 4.1, or sun.xml.rpc... again?

Roderico Cruz
How did you configure the handler to work with the web service? Did you
use the facility provided by Netbeans? Also it would be helpful if you
can send the handler code.
Rico

Bruno Lotse wrote:

>I also tried a template wsdl with xml entities to see
>how NB4.1 and com.sun.rpc handle this. Happy to say
>that a template file was properly parsed and a web
>service generated. But the same problem with a service
>handler. Should I create one, register with the
>service, deploy the service and try to test it, I am
>getting exceptions all over - cannot generate a SOAP
>envelope.
>So the same problem as below.
>This is wsdl which I ran:
>
><?xml version="1.0" encoding="utf-8"?>
><!DOCTYPE definitions [
> <!ENTITY SERVICE "MyNewService">
> <!ENTITY SERVICE_NS
>"http://my.new.webservice/namespace">
> <!ENTITY SERVICE_URL
>"http://localhost:8080/MyService">
> <!ENTITY OPERATION "myOperation">
> <!ENTITY INPUT "input">
> <!ENTITY OUTPUT "output">
> <!ENTITY PORT "SOAPport">
>]>
><definitions name="&SERVICE;" xmlns:tns="&SERVICE_NS;"
>targetNamespace="&SERVICE_NS;"
>xmlns="http://schemas.xmlsoap.org/wsdl/"
>xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>xmlns:xs="http://www.w3.org/2001/XMLSchema"  >
> <message name="&SERVICE;_request">
> <part name="&INPUT;" type="xs:string"/>
> </message>
> <message name="&SERVICE;_response">
> <part name="&OUTPUT;" type="xs:string"/>
> </message>
> <portType name="&PORT;_type">
> <operation name="tns:&OPERATION;">
> <input message="tns:&SERVICE;_request"/>
> <output message="tns:&SERVICE;_response"/>
> </operation>
> </portType>
> <binding name="&PORT;_binding"
>type="tns:&PORT;_type">
> <soap:binding style="rpc"
>transport="http://schemas.xmlsoap.org/soap/http"/>
> <operation name="tns:&OPERATION;">
> <input>
> <soap:body use="literal"
>namespace="&SERVICE_NS;"/>
> </input>
> <output>
> <soap:body use="literal"
>namespace="&SERVICE_NS;"/>
> </output>
> </operation>
> </binding>
> <service name="&SERVICE;">
> <port name="My&PORT;" binding="tns:&PORT;_binding">
> <soap:address location="&SERVICE_URL;"/>
> </port>
> </service>
></definitions>
>
>
>--- Bruno Lotse <[hidden email]> wrote:
>
>  
>
>>Hi, Roderico.
>>I've tried it and must say it works. Thank you! It
>>works though at least partially - in terms of just
>>creating a web service. Yet whenever I am trying to
>>create a handler to the service, register the
>>service,
>>and test it, I am getting this:
>>
>>
>>    
>>
>#|2005-08-23T12:49:27.958-0400|SEVERE|sun-appserver-pe8.1_02|javax.xml.messaging.saaj.soap|_ThreadID=23;|SAAJ0511:
>  
>
>>Unable to create envelope from given source|#]
>>
>>    
>>
>[#|2005-08-23T12:49:27.958-0400|SEVERE|sun-appserver-pe8.1_02|com.sun.xml.rpc.server|_ThreadID=23;|Unable
>  
>
>>to create envelope from given source:
>>com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable
>>to create envelope from given source:
>>        at
>>
>>    
>>
>com.sun.xml.messaging.saaj.soap.EnvelopeFactory.createEnvelope(EnvelopeFactory.java:95)
>  
>
>>        at
>>
>>    
>>
>com.sun.xml.messaging.saaj.soap.ver1_1.SOAPPart1_1Impl.createEnvelopeFromSource(SOAPPart1_1Impl.java:34)
>  
>
>>        at
>>
>>    
>>
>com.sun.xml.messaging.saaj.soap.SOAPPartImpl.getEnvelope(SOAPPartImpl.java:82)
>  
>
>>        at
>>
>>    
>>
>com.sun.xml.rpc.client.HandlerChainImpl.checkMustUnderstand(HandlerChainImpl.java:235)
>  
>
>>        at
>>
>>    
>>
>com.sun.xml.rpc.server.StreamingHandler.callRequestHandlers(StreamingHandler.java:901)
>  
>
>>        at
>>
>>    
>>
>com.sun.xml.rpc.server.StreamingHandler.preHandlingHook(StreamingHandler.java:831)
>  
>
>>        at
>>
>>    
>>
>com.ileonov.net.SOAPport_Tie.preHandlingHook(SOAPport_Tie.java:238)
>  
>
>>        at
>>
>>    
>>
>com.sun.xml.rpc.server.StreamingHandler.handle(StreamingHandler.java:102)
>  
>
>>        at
>>
>>    
>>
>com.sun.xml.rpc.server.http.JAXRPCServletDelegate.doPost(JAXRPCServletDelegate.java:443)
>  
>
>>        at
>>
>>    
>>
>com.sun.enterprise.webservice.JAXRPCServlet.doPost(JAXRPCServlet.java:50)
>  
>
>>        at
>>
>>    
>>
>javax.servlet.http.HttpServlet.service(HttpServlet.java:767)
>  
>
>>        at
>>
>>    
>>
>javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
>  
>
>>        at
>>sun.reflect.NativeMethodAccessorImpl.invoke0(Native
>>Method)
>>        at
>>
>>    
>>
>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>  
>
>>        at
>>
>>    
>>
>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>  
>
>>        at
>>java.lang.reflect.Method.invoke(Method.java:585)
>>        at
>>
>>    
>>
>org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
>  
>
>>        at
>>java.security.AccessController.doPrivileged(Native
>>Method)
>>        at
>>
>>    
>>
>javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
>  
>
>>        at
>>
>>    
>>
>org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
>  
>
>>        at
>>
>>    
>>
>org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
>  
>
>>        at
>>
>>    
>>
>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
>  
>
>>        at
>>
>>    
>>
>org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
>  
>
>>        at
>>
>>    
>>
>org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
>  
>
>>        at
>>java.security.AccessController.doPrivileged(Native
>>Method)
>>        at
>>
>>    
>>
>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
>  
>
>>        at
>>
>>    
>>
>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
>  
>
>>        at
>>
>>    
>>
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
>  
>
>>        at
>>
>>    
>>
>org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
>  
>
>>        at
>>
>>    
>>
>org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
>  
>
>>        at
>>
>>    
>>
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
>  
>
>>        at
>>
>>    
>>
>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
>  
>
>>        at
>>
>>    
>>
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
>  
>
>>        at
>>
>>    
>>
>org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)
>  
>
>>        at
>>
>>    
>>
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
>  
>
>>        at
>>
>>    
>>
>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
>  
>
>>        at
>>
>>    
>>
>org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:185)
>  
>
>>        at
>>
>>    
>>
>com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:653)
>  
>
>>        at
>>
>>    
>>
>com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:534)
>  
>
>>        at
>>
>>    
>>
>com.sun.enterprise.web.connector.grizzly.ProcessorTask.doTask(ProcessorTask.java:403)
>  
>
>>        at
>>
>>    
>>
>com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:55)
>  
>
>>Caused by: javax.xml.transform.TransformerException:
>>org.xml.sax.SAXParseException: Element type "ns0:y"
>>must be followed by either attribute specifications,
>>">" or "/>".
>>        at
>>
>>    
>>
>com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:650)
>  
>
>>        at
>>
>>    
>>
>com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:279)
>  
>
>>        at
>>
>>    
>>
>com.sun.xml.messaging.saaj.soap.EnvelopeFactory.createEnvelope(EnvelopeFactory.java:83)
>  
>
>>        ... 40 more
>>Caused by: org.xml.sax.SAXParseException: Element
>>type
>>"ns0:y" must be followed by either attribute
>>specifications, ">" or "/>".
>>        at
>>
>>    
>>
>com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1269)
>  
>
>>        at
>>
>>    
>>
>org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333)
>  
>
>>        at
>>
>>    
>>
>com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:584)
>  
>
>>        at
>>
>>    
>>
>com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:638)
>  
>
>>        ... 42 more
>>CAUSE:
>>javax.xml.t
>>
>>Any hint what might be the cause of this. Service
>>created fine - any attempt of attaching a message
>>handler - boom. Evidently there's still something
>>wrong in wsdl from the standpoint of sun.xml.rpc.
>>
>>Looking forward to hearing from you.
>>Cheers,
>>Bruno
>>
>>
>>
>>--- Roderico Cruz <[hidden email]> wrote:
>>
>>    
>>
>>>The SOAP binding entries for the input and output
>>>required the
>>>declaration of the namespace, i.e.:
>>>
>>><binding name="MyServiceBinding"
>>>      
>>>
>>type="y:SOAPport">
>>    
>>
>>>        <soap:binding style="rpc"
>>>transport="http://schemas.xmlsoap.org/soap/http"/>
>>>        <operation name="y:EchoString">
>>>            <input>
>>>                <soap:body use="literal"
>>>namespace="http://my.webservice.namespace"/>
>>>            </input>
>>>            <output>
>>>                <soap:body use="literal"
>>>namespace="http://my.webservice.namespace"/>
>>>            </output>
>>>        </operation>
>>>    </binding>
>>>
>>>Attached is the revised wsdl that works.
>>>Hope this helps.
>>>Rico Cruz
>>>
>>>Bruno Lotse wrote:
>>>
>>>      
>>>
>>>>Hi everybody,
>>>>I am playing with various features of NB 4.1,
>>>>especially relating to web services.
>>>>
>>>>Created a very simple WSDL
>>>>
>>>><?xml version="1.0" encoding="UTF-8"?>
>>>><definitions
>>>>targetNamespace="http://my.webservice.namespace"
>>>>xmlns="http://schemas.xmlsoap.org/wsdl/"
>>>>        
>>>>
>>>xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>>>
>>>      
>>>
>>xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
>>    
>>
>>>>xmlns:xs="http://www.w3.org/2001/XMLSchema"
>>>>xmlns:y="http://my.webservice.namespace"
>>>>        
>>>>
>>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>    
>>
>>xsi:schemaLocation="http://schemas.xmlsoap.org/wsdl/
>>    
>>
>>>>D:\xml\dtd\wsdl\schema\1.1\WSDL.1.1.xsd">
>>>> <message name="EchoStringRequest">
>>>> <part name="input" type="xs:string"/>
>>>> </message>
>>>> <message name="EchoStringResponse">
>>>> <part name="output" type="xs:string"/>
>>>> </message>
>>>> <portType name="SOAPport">
>>>> <operation name="y:EchoString">
>>>> <input message="y:EchoStringRequest"/>
>>>> <output message="y:EchoStringResponse"/>
>>>> </operation>
>>>> </portType>
>>>> <binding name="MyServiceBinding"
>>>>        
>>>>
>>>type="y:SOAPport">
>>>      
>>>
>>>> <soap:binding style="rpc"
>>>>        
>>>>
>=== message truncated ===
>
>
>
>
>
>
>
>__________________________________________________________
>Find your next car at http://autos.yahoo.ca
>  
>


--
Roderico Cruz
Sun Microsystems
(650) 786-4824

Reply | Threaded
Open this post in threaded view
|

Re: Is it me, NB 4.1, or sun.xml.rpc... again?

Bruno Lotse
Hi Rico.
I am sending Test.tar.bz2 with my project which I am
running on NB 4.1. There you can find problems folder
with exceptions which I am getting when service with a
handler is deployed and tested in NB4.1 Runtime
tab(WebServiceClientException and Server.snippet.log).

I am using run-of-a-mill MessageHandler.java -
generated from NB4.1 template and attached to the
service according to NB tool. You can see config files
in the tarball.
Looking forward to hearing from you ;)
Cheers,
Bruno
--- Roderico Cruz <[hidden email]> wrote:

> How did you configure the handler to work with the
> web service? Did you
> use the facility provided by Netbeans? Also it would
> be helpful if you
> can send the handler code.
> Rico
>
> Bruno Lotse wrote:
>
> >I also tried a template wsdl with xml entities to
> see
> >how NB4.1 and com.sun.rpc handle this. Happy to say
> >that a template file was properly parsed and a web
> >service generated. But the same problem with a
> service
> >handler. Should I create one, register with the
> >service, deploy the service and try to test it, I
> am
> >getting exceptions all over - cannot generate a
> SOAP
> >envelope.
> >So the same problem as below.
> >This is wsdl which I ran:
> >
> ><?xml version="1.0" encoding="utf-8"?>
> ><!DOCTYPE definitions [
> > <!ENTITY SERVICE "MyNewService">
> > <!ENTITY SERVICE_NS
> >"http://my.new.webservice/namespace">
> > <!ENTITY SERVICE_URL
> >"http://localhost:8080/MyService">
> > <!ENTITY OPERATION "myOperation">
> > <!ENTITY INPUT "input">
> > <!ENTITY OUTPUT "output">
> > <!ENTITY PORT "SOAPport">
> >]>
> ><definitions name="&SERVICE;"
> xmlns:tns="&SERVICE_NS;"
> >targetNamespace="&SERVICE_NS;"
> >xmlns="http://schemas.xmlsoap.org/wsdl/"
> >xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> >xmlns:xs="http://www.w3.org/2001/XMLSchema"  >
> > <message name="&SERVICE;_request">
> > <part name="&INPUT;" type="xs:string"/>
> > </message>
> > <message name="&SERVICE;_response">
> > <part name="&OUTPUT;" type="xs:string"/>
> > </message>
> > <portType name="&PORT;_type">
> > <operation name="tns:&OPERATION;">
> > <input message="tns:&SERVICE;_request"/>
> > <output message="tns:&SERVICE;_response"/>
> > </operation>
> > </portType>
> > <binding name="&PORT;_binding"
> >type="tns:&PORT;_type">
> > <soap:binding style="rpc"
> >transport="http://schemas.xmlsoap.org/soap/http"/>
> > <operation name="tns:&OPERATION;">
> > <input>
> > <soap:body use="literal"
> >namespace="&SERVICE_NS;"/>
> > </input>
> > <output>
> > <soap:body use="literal"
> >namespace="&SERVICE_NS;"/>
> > </output>
> > </operation>
> > </binding>
> > <service name="&SERVICE;">
> > <port name="My&PORT;"
> binding="tns:&PORT;_binding">
> > <soap:address location="&SERVICE_URL;"/>
> > </port>
> > </service>
> ></definitions>
> >
> >
> >--- Bruno Lotse <[hidden email]> wrote:
> >
> >  
> >
> >>Hi, Roderico.
> >>I've tried it and must say it works. Thank you! It
> >>works though at least partially - in terms of just
> >>creating a web service. Yet whenever I am trying
> to
> >>create a handler to the service, register the
> >>service,
> >>and test it, I am getting this:
> >>
> >>
> >>    
> >>
>
>#|2005-08-23T12:49:27.958-0400|SEVERE|sun-appserver-pe8.1_02|javax.xml.messaging.saaj.soap|_ThreadID=23;|SAAJ0511:
> >  
> >
> >>Unable to create envelope from given source|#]
> >>
> >>    
> >>
>
>[#|2005-08-23T12:49:27.958-0400|SEVERE|sun-appserver-pe8.1_02|com.sun.xml.rpc.server|_ThreadID=23;|Unable
> >  
> >
> >>to create envelope from given source:
> >>com.sun.xml.messaging.saaj.SOAPExceptionImpl:
> Unable
> >>to create envelope from given source:
> >>        at
> >>
> >>    
> >>
>
>com.sun.xml.messaging.saaj.soap.EnvelopeFactory.createEnvelope(EnvelopeFactory.java:95)
> >  
> >
> >>        at
> >>
> >>    
> >>
>
>com.sun.xml.messaging.saaj.soap.ver1_1.SOAPPart1_1Impl.createEnvelopeFromSource(SOAPPart1_1Impl.java:34)
> >  
> >
> >>        at
> >>
> >>    
> >>
>
>com.sun.xml.messaging.saaj.soap.SOAPPartImpl.getEnvelope(SOAPPartImpl.java:82)
> >  
> >
> >>        at
> >>
> >>    
> >>
>
>com.sun.xml.rpc.client.HandlerChainImpl.checkMustUnderstand(HandlerChainImpl.java:235)
> >  
> >
> >>        at
> >>
> >>    
> >>
>
>com.sun.xml.rpc.server.StreamingHandler.callRequestHandlers(StreamingHandler.java:901)
> >  
> >
> >>        at
> >>
> >>    
> >>
>
>com.sun.xml.rpc.server.StreamingHandler.preHandlingHook(StreamingHandler.java:831)
> >  
> >
> >>        at
> >>
> >>    
> >>
>
>com.ileonov.net.SOAPport_Tie.preHandlingHook(SOAPport_Tie.java:238)
> >  
> >
> >>        at
> >>
> >>    
> >>
>
>com.sun.xml.rpc.server.StreamingHandler.handle(StreamingHandler.java:102)
> >  
> >
> >>        at
> >>
> >>    
> >>
>
>com.sun.xml.rpc.server.http.JAXRPCServletDelegate.doPost(JAXRPCServletDelegate.java:443)
> >  
> >
> >>        at
> >>
> >>    
> >>
>
>com.sun.enterprise.webservice.JAXRPCServlet.doPost(JAXRPCServlet.java:50)
> >  
> >
> >>        at
> >>
> >>    
> >>
>
>javax.servlet.http.HttpServlet.service(HttpServlet.java:767)
> >  
> >
> >>        at
> >>
> >>    
> >>
>
>javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
> >  
> >
> >>        at
>
>>sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> >>Method)
> >>        at
> >>
> >>    
> >>
>
>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >  
>
=== message truncated ===

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 

Test.tar.bz2 (15K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Is it me, NB 4.1, or sun.xml.rpc... again?

Roderico Cruz
Hi Bruno,
The operation name entries in the portType and SOAP binding sections of
the wsdl  had an unnecessary namespace prefix qualifier before it, e.g.,
operation name="tns:myOperation". This works fine until you add the SOAP
message handler which calls the SAAJ API to access the SOAP message.  To
fix this, I took out the unnecessary "tns:" qualifier in both the
operation name entries in the WSDL, i.e., operation name="myOperation".
Attached is the revised wsdl that works. I tested it and it worked fine
with the sample message handler. BTW, to get the output of the sample
message handler, you should look at the server log.
Rico

Bruno Lotse wrote:

>Hi Rico.
>I am sending Test.tar.bz2 with my project which I am
>running on NB 4.1. There you can find problems folder
>with exceptions which I am getting when service with a
>handler is deployed and tested in NB4.1 Runtime
>tab(WebServiceClientException and Server.snippet.log).
>
>I am using run-of-a-mill MessageHandler.java -
>generated from NB4.1 template and attached to the
>service according to NB tool. You can see config files
>in the tarball.
>Looking forward to hearing from you ;)
>Cheers,
>Bruno
>--- Roderico Cruz <[hidden email]> wrote:
>
>  
>
>>How did you configure the handler to work with the
>>web service? Did you
>>use the facility provided by Netbeans? Also it would
>>be helpful if you
>>can send the handler code.
>>Rico
>>
>>Bruno Lotse wrote:
>>
>>    
>>
>>>I also tried a template wsdl with xml entities to
>>>      
>>>
>>see
>>    
>>
>>>how NB4.1 and com.sun.rpc handle this. Happy to say
>>>that a template file was properly parsed and a web
>>>service generated. But the same problem with a
>>>      
>>>
>>service
>>    
>>
>>>handler. Should I create one, register with the
>>>service, deploy the service and try to test it, I
>>>      
>>>
>>am
>>    
>>
>>>getting exceptions all over - cannot generate a
>>>      
>>>
>>SOAP
>>    
>>
>>>envelope.
>>>So the same problem as below.
>>>This is wsdl which I ran:
>>>
>>><?xml version="1.0" encoding="utf-8"?>
>>><!DOCTYPE definitions [
>>> <!ENTITY SERVICE "MyNewService">
>>> <!ENTITY SERVICE_NS
>>>"http://my.new.webservice/namespace">
>>> <!ENTITY SERVICE_URL
>>>"http://localhost:8080/MyService">
>>> <!ENTITY OPERATION "myOperation">
>>> <!ENTITY INPUT "input">
>>> <!ENTITY OUTPUT "output">
>>> <!ENTITY PORT "SOAPport">
>>>]>
>>><definitions name="&SERVICE;"
>>>      
>>>
>>xmlns:tns="&SERVICE_NS;"
>>    
>>
>>>targetNamespace="&SERVICE_NS;"
>>>xmlns="http://schemas.xmlsoap.org/wsdl/"
>>>xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>>>xmlns:xs="http://www.w3.org/2001/XMLSchema"  >
>>> <message name="&SERVICE;_request">
>>> <part name="&INPUT;" type="xs:string"/>
>>> </message>
>>> <message name="&SERVICE;_response">
>>> <part name="&OUTPUT;" type="xs:string"/>
>>> </message>
>>> <portType name="&PORT;_type">
>>> <operation name="tns:&OPERATION;">
>>> <input message="tns:&SERVICE;_request"/>
>>> <output message="tns:&SERVICE;_response"/>
>>> </operation>
>>> </portType>
>>> <binding name="&PORT;_binding"
>>>type="tns:&PORT;_type">
>>> <soap:binding style="rpc"
>>>transport="http://schemas.xmlsoap.org/soap/http"/>
>>> <operation name="tns:&OPERATION;">
>>> <input>
>>> <soap:body use="literal"
>>>namespace="&SERVICE_NS;"/>
>>> </input>
>>> <output>
>>> <soap:body use="literal"
>>>namespace="&SERVICE_NS;"/>
>>> </output>
>>> </operation>
>>> </binding>
>>> <service name="&SERVICE;">
>>> <port name="My&PORT;"
>>>      
>>>
>>binding="tns:&PORT;_binding">
>>    
>>
>>> <soap:address location="&SERVICE_URL;"/>
>>> </port>
>>> </service>
>>></definitions>
>>>
>>>
>>>--- Bruno Lotse <[hidden email]> wrote:
>>>
>>>
>>>
>>>      
>>>
>>>>Hi, Roderico.
>>>>I've tried it and must say it works. Thank you! It
>>>>works though at least partially - in terms of just
>>>>creating a web service. Yet whenever I am trying
>>>>        
>>>>
>>to
>>    
>>
>>>>create a handler to the service, register the
>>>>service,
>>>>and test it, I am getting this:
>>>>
>>>>
>>>>  
>>>>
>>>>        
>>>>
>>#|2005-08-23T12:49:27.958-0400|SEVERE|sun-appserver-pe8.1_02|javax.xml.messaging.saaj.soap|_ThreadID=23;|SAAJ0511:
>>    
>>
>>>
>>>
>>>      
>>>
>>>>Unable to create envelope from given source|#]
>>>>
>>>>  
>>>>
>>>>        
>>>>
>>[#|2005-08-23T12:49:27.958-0400|SEVERE|sun-appserver-pe8.1_02|com.sun.xml.rpc.server|_ThreadID=23;|Unable
>>    
>>
>>>
>>>
>>>      
>>>
>>>>to create envelope from given source:
>>>>com.sun.xml.messaging.saaj.SOAPExceptionImpl:
>>>>        
>>>>
>>Unable
>>    
>>
>>>>to create envelope from given source:
>>>>       at
>>>>
>>>>  
>>>>
>>>>        
>>>>
>>com.sun.xml.messaging.saaj.soap.EnvelopeFactory.createEnvelope(EnvelopeFactory.java:95)
>>    
>>
>>>
>>>
>>>      
>>>
>>>>       at
>>>>
>>>>  
>>>>
>>>>        
>>>>
>>com.sun.xml.messaging.saaj.soap.ver1_1.SOAPPart1_1Impl.createEnvelopeFromSource(SOAPPart1_1Impl.java:34)
>>    
>>
>>>
>>>
>>>      
>>>
>>>>       at
>>>>
>>>>  
>>>>
>>>>        
>>>>
>>com.sun.xml.messaging.saaj.soap.SOAPPartImpl.getEnvelope(SOAPPartImpl.java:82)
>>    
>>
>>>
>>>
>>>      
>>>
>>>>       at
>>>>
>>>>  
>>>>
>>>>        
>>>>
>>com.sun.xml.rpc.client.HandlerChainImpl.checkMustUnderstand(HandlerChainImpl.java:235)
>>    
>>
>>>
>>>
>>>      
>>>
>>>>       at
>>>>
>>>>  
>>>>
>>>>        
>>>>
>>com.sun.xml.rpc.server.StreamingHandler.callRequestHandlers(StreamingHandler.java:901)
>>    
>>
>>>
>>>
>>>      
>>>
>>>>       at
>>>>
>>>>  
>>>>
>>>>        
>>>>
>>com.sun.xml.rpc.server.StreamingHandler.preHandlingHook(StreamingHandler.java:831)
>>    
>>
>>>
>>>
>>>      
>>>
>>>>       at
>>>>
>>>>  
>>>>
>>>>        
>>>>
>>com.ileonov.net.SOAPport_Tie.preHandlingHook(SOAPport_Tie.java:238)
>>    
>>
>>>
>>>
>>>      
>>>
>>>>       at
>>>>
>>>>  
>>>>
>>>>        
>>>>
>>com.sun.xml.rpc.server.StreamingHandler.handle(StreamingHandler.java:102)
>>    
>>
>>>
>>>
>>>      
>>>
>>>>       at
>>>>
>>>>  
>>>>
>>>>        
>>>>
>>com.sun.xml.rpc.server.http.JAXRPCServletDelegate.doPost(JAXRPCServletDelegate.java:443)
>>    
>>
>>>
>>>
>>>      
>>>
>>>>       at
>>>>
>>>>  
>>>>
>>>>        
>>>>
>>com.sun.enterprise.webservice.JAXRPCServlet.doPost(JAXRPCServlet.java:50)
>>    
>>
>>>
>>>
>>>      
>>>
>>>>       at
>>>>
>>>>  
>>>>
>>>>        
>>>>
>>javax.servlet.http.HttpServlet.service(HttpServlet.java:767)
>>    
>>
>>>
>>>
>>>      
>>>
>>>>       at
>>>>
>>>>  
>>>>
>>>>        
>>>>
>>javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
>>    
>>
>>>
>>>
>>>      
>>>
>>>>       at
>>>>        
>>>>
>>>sun.reflect.NativeMethodAccessorImpl.invoke0(Native
>>>      
>>>
>>>>Method)
>>>>       at
>>>>
>>>>  
>>>>
>>>>        
>>>>
>>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>    
>>
>>>
>>>      
>>>
>=== message truncated ===
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam?  Yahoo! Mail has the best spam protection around
>http://mail.yahoo.com 
>  
>

--
Roderico Cruz
Sun Microsystems
(650) 786-4824


<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://my.new.webservice/namespace" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="MyNewService" targetNamespace="http://my.new.webservice/namespace">
<message name="MyNewService_request">
                <part name="input" type="xs:string"/>
        </message>
<message name="MyNewService_response">
                <part name="output" type="xs:string"/>
        </message>
<portType name="SOAPport_type">
                <operation name="myOperation">
                        <input message="tns:MyNewService_request"/>
                        <output message="tns:MyNewService_response"/>
                </operation>
        </portType>
<binding name="SOAPport_binding" type="tns:SOAPport_type">
                <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
                <operation name="myOperation">
                        <input>
                                <soap:body use="literal" namespace="http://my.new.webservice/namespace"/>
                        </input>
                        <output>
                                <soap:body use="literal" namespace="http://my.new.webservice/namespace"/>
                        </output>
                </operation>
        </binding>
<wsdl:service xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" name="MyTestService">
<wsdl:port name="SOAPport_typePort" binding="tns:SOAPport_binding">
<soap:address location="PUT ACTUAL ADDRESS HERE"/>
</wsdl:port>
</wsdl:service>
</definitions>
Reply | Threaded
Open this post in threaded view
|

Re: Problemas migrando de version 3.6 a 4.1

WILLIAM PARRA
In reply to this post by Bruno Lotse
Hola compa?eros de lista.
 
Me estoy migrando la plataforma de desarrollo para lo cual necesito migrar los fuentes de mis aplicaci?nes, por si es preciso escribir mejoras a los programas. La plataforma 4.1 me parece r?pida, y excelente, exepto porque al tratar de correr la aplicaci?n, el servidor de aplicaciones Tomcat no sube, reportandome un error Deployment error: TomcatManager.undeploy invalid TargetModuleID passed. See the server log for details...Y en la consola, aparece errores como
D:\wp\pruebas\netbeans_4\admisiones\nbproject\build-impl.xml:367: Deployment error: TomcatManager.undeploy invalid TargetModuleID passed.  See the server log file for details.
BUILD FAILED (total time: 12 seconds)

Gracias por las sugerencias.


__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ?gratis!
Reg?strate ya - http://correo.espanol.yahoo.com/

Reply | Threaded
Open this post in threaded view
|

Re: Is it me, NB 4.1, or sun.xml.rpc... again?

Bruno Lotse
In reply to this post by Roderico Cruz
Hi Rico:
Hm... namespaces again.
Removed tns prefix from operation name, rebuild the
server, deployed the service with a handler, test it.
WORKS! Thank you very much Rico for the tip. Great
job!!!
Then I went to another machine and created a
com.sun.rpc. client using wsdl from the server and
wscompile tool.
(See TestServiceClient.zip). Generated request
POST /Test/TestWS HTTP/1.1

Content-Type: text/xml; charset=utf-8
Content-Length: 399
SOAPAction: ""
User-Agent: Java/1.4.2_05
Host: 127.0.0.1:8080
Accept: text/html, image/gif, image/jpeg, *; q=.2,
*/*; q=.2
Connection: keep-alive

<?xml version="1.0" encoding="UTF-8"?>
   <env:Envelope
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns0="http://my.new.webservice/namespace">
      <env:Body>
         <ns0:myOperation>
            <input>BRUNO</input>
         </ns0:myOperation>
      </env:Body>
   </env:Envelope>

Hop! I've got a proper response. Nothing broken. Stuff
is working!


Then I tried another thing. We are talking about web
service and therefore interoperability between system.
So I generated SOAP request to my server from XMLSpy
Enterprise v.5.
Request

POST /Test/TestWS HTTP/1.1
Content-Type: text/xml
User-Agent: XML Spy
SOAPAction: ""
Host: 127.0.0.1:8080
Content-Length: 416
Connection: Keep-Alive
Cache-Control: no-cache

<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/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <SOAP-ENV:Body>
        <m:myOperation
xmlns:m="http://my.new.webservice/namespace">
            <input>Bruno</input>
        </m:myOperation>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Boom! I've got a fault
<env:Envelope
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns0="http://my.new.webservice/namespace"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <env:Body>
        <env:Fault>
            <faultcode>env:Server</faultcode>
            <faultstring>JAXRPC.TIE.04: Internal
Server Error (JAXRPCTIE01: caught exception while
handling request: java.lang.ClassCastException:
com.sun.xml.messaging.saaj.soap.impl.TextImpl)</faultstring>
        </env:Fault>
    </env:Body>
</env:Envelope>

Checked out the server log - ClassCastException!!!
[#|2005-08-24T10:44:02.513-0400|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.tools.deployment|_ThreadID=12;|DPL5306:Servlet
Web Service Endpoint [TestWS] listening at address
[http://fedora:8080/Test/TestWS]|#]
[#|2005-08-24T10:44:28.083-0400|WARNING|sun-appserver-pe8.1_02|javax.enterprise.system.container.web|_ThreadID=13;|preWebHandlerError
java.lang.ClassCastException:
com.sun.xml.messaging.saaj.soap.impl.TextImpl
        at
com.sun.xml.rpc.server.StreamingHandler.getOpcodeForRequestMessage(StreamingHandler.java:628)
        at
com.sun.enterprise.webservice.WsUtil.getInvMethod(WsUtil.java:943)
        at
com.sun.enterprise.webservice.ServletPreHandler.handleRequest(ServletPreHandler.java:55)
        at
com.sun.xml.rpc.client.HandlerChainImpl.handleRequest(HandlerChainImpl.java:86)

Any thoughts why request generated from java to java
works with handler, yet should I try non-java client -
ClassCastException? Evidently SAAJ API does not like
something in the layout of SOAP request generated by
XMLSpy. The question - what is it? Is there something
wrong in XMLSpy request? Looks fine to me.

As always looking forward to hearing your thoughts.
They are extremely helpful.
I am attaching a zip file with data relating to the
test case.
Cheers
Bruno

P.S. Incidentally which tools are you using to check
validity of wsdl files. I've checked all the previous
versions on XMLSpy and Stylus Studio v.5. They did not
picked up those problems with namespaces. Which tool
would you recommend to generate wsdls compatible with
com.sun.rpc?



--- Roderico Cruz <[hidden email]> wrote:

> Hi Bruno,
> The operation name entries in the portType and SOAP
> binding sections of
> the wsdl  had an unnecessary namespace prefix
> qualifier before it, e.g.,
> operation name="tns:myOperation". This works fine
> until you add the SOAP
> message handler which calls the SAAJ API to access
> the SOAP message.  To
> fix this, I took out the unnecessary "tns:"
> qualifier in both the
> operation name entries in the WSDL, i.e., operation
> name="myOperation".
> Attached is the revised wsdl that works. I tested it
> and it worked fine
> with the sample message handler. BTW, to get the
> output of the sample
> message handler, you should look at the server log.
> Rico
>
> Bruno Lotse wrote:
>
> >Hi Rico.
> >I am sending Test.tar.bz2 with my project which I
> am
> >running on NB 4.1. There you can find problems
> folder
> >with exceptions which I am getting when service
> with a
> >handler is deployed and tested in NB4.1 Runtime
> >tab(WebServiceClientException and
> Server.snippet.log).
> >
> >I am using run-of-a-mill MessageHandler.java -
> >generated from NB4.1 template and attached to the
> >service according to NB tool. You can see config
> files
> >in the tarball.
> >Looking forward to hearing from you ;)
> >Cheers,
> >Bruno
> >--- Roderico Cruz <[hidden email]> wrote:
> >
> >  
> >
> >>How did you configure the handler to work with the
> >>web service? Did you
> >>use the facility provided by Netbeans? Also it
> would
> >>be helpful if you
> >>can send the handler code.
> >>Rico
> >>
> >>Bruno Lotse wrote:
> >>
> >>    
> >>
> >>>I also tried a template wsdl with xml entities to
> >>>      
> >>>
> >>see
> >>    
> >>
> >>>how NB4.1 and com.sun.rpc handle this. Happy to
> say
> >>>that a template file was properly parsed and a
> web
> >>>service generated. But the same problem with a
> >>>      
> >>>
> >>service
> >>    
> >>
> >>>handler. Should I create one, register with the
> >>>service, deploy the service and try to test it, I
> >>>      
> >>>
> >>am
> >>    
> >>
> >>>getting exceptions all over - cannot generate a
> >>>      
> >>>
> >>SOAP
> >>    
> >>
> >>>envelope.
> >>>So the same problem as below.
> >>>This is wsdl which I ran:
> >>>
> >>><?xml version="1.0" encoding="utf-8"?>
> >>><!DOCTYPE definitions [
> >>> <!ENTITY SERVICE "MyNewService">
> >>> <!ENTITY SERVICE_NS
> >>>"http://my.new.webservice/namespace">
> >>> <!ENTITY SERVICE_URL
> >>>"http://localhost:8080/MyService">
> >>> <!ENTITY OPERATION "myOperation">
> >>> <!ENTITY INPUT "input">
> >>> <!ENTITY OUTPUT "output">
> >>> <!ENTITY PORT "SOAPport">
> >>>]>
> >>><definitions name="&SERVICE;"
> >>>      
> >>>
> >>xmlns:tns="&SERVICE_NS;"
> >>    
> >>
> >>>targetNamespace="&SERVICE_NS;"
> >>>xmlns="http://schemas.xmlsoap.org/wsdl/"
>
>>>xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> >>>xmlns:xs="http://www.w3.org/2001/XMLSchema"  >
> >>> <message name="&SERVICE;_request">
> >>> <part name="&INPUT;" type="xs:string"/>
> >>> </message>
> >>> <message name="&SERVICE;_response">
> >>> <part name="&OUTPUT;" type="xs:string"/>
> >>> </message>
> >>> <portType name="&PORT;_type">
> >>> <operation name="tns:&OPERATION;">
> >>> <input message="tns:&SERVICE;_request"/>
> >>> <output message="tns:&SERVICE;_response"/>
> >>> </operation>
> >>> </portType>
> >>> <binding name="&PORT;_binding"
> >>>type="tns:&PORT;_type">
> >>> <soap:binding style="rpc"
>
>>>transport="http://schemas.xmlsoap.org/soap/http"/>
> >>> <operation name="tns:&OPERATION;">
> >>> <input>
> >>> <soap:body use="literal"
> >>>namespace="&SERVICE_NS;"/>
> >>> </input>
> >>> <output>
> >>> <soap:body use="literal"
> >>>namespace="&SERVICE_NS;"/>
> >>> </output>
> >>> </operation>
> >>> </binding>
> >>> <service name="&SERVICE;">
> >>> <port name="My&PORT;"
> >>>      
> >>>
> >>binding="tns:&PORT;_binding">
> >>    
> >>
> >>> <soap:address location="&SERVICE_URL;"/>
> >>> </port>
> >>> </service>
> >>></definitions>
> >>>
> >>>
> >>>--- Bruno Lotse <[hidden email]> wrote:
> >>>
> >>>
> >>>
> >>>      
> >>>
> >>>>Hi, Roderico.
> >>>>I've tried it and must say it works. Thank you!
> It
> >>>>works though at least partially - in terms of
> just
> >>>>creating a web service. Yet whenever I am trying
> >>>>        
> >>>>
> >>to
> >>    
> >>
> >>>>create a handler to the service, register the
> >>>>service,
> >>>>and test it, I am getting this:
> >>>>
> >>>>
> >>>>  
> >>>>
> >>>>        
> >>>>
>
>>#|2005-08-23T12:49:27.958-0400|SEVERE|sun-appserver-pe8.1_02|javax.xml.messaging.saaj.soap|_ThreadID=23;|SAAJ0511:
> >>    
> >>
> >>>
> >>>
> >>>      
> >>>
> >>>>Unable to create envelope from given source|#]
> >>>>
> >>>>  
> >>>>
> >>>>        
> >>>>
>
>>[#|2005-08-23T12:49:27.958-0400|SEVERE|sun-appserver-pe8.1_02|com.sun.xml.rpc.server|_ThreadID=23;|Unable
> >>    
> >>
> >>>
> >>>
> >>>      
> >>>
> >>>>to create envelope from given source:
> >>>>com.sun.xml.messaging.saaj.SOAPExceptionImpl:
> >>>>        
>
=== message truncated ===> <?xml version="1.0"
encoding="UTF-8"?>
> <definitions
> xmlns="http://schemas.xmlsoap.org/wsdl/"
> xmlns:tns="http://my.new.webservice/namespace"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> name="MyNewService"
>
targetNamespace="http://my.new.webservice/namespace">

> <message name="MyNewService_request">
> <part name="input" type="xs:string"/>
> </message>
> <message name="MyNewService_response">
> <part name="output" type="xs:string"/>
> </message>
> <portType name="SOAPport_type">
> <operation name="myOperation">
> <input message="tns:MyNewService_request"/>
> <output message="tns:MyNewService_response"/>
> </operation>
> </portType>
> <binding name="SOAPport_binding"
> type="tns:SOAPport_type">
> <soap:binding style="rpc"
> transport="http://schemas.xmlsoap.org/soap/http"/>
> <operation name="myOperation">
> <input>
> <soap:body use="literal"
> namespace="http://my.new.webservice/namespace"/>
> </input>
> <output>
> <soap:body use="literal"
> namespace="http://my.new.webservice/namespace"/>
> </output>
> </operation>
> </binding>
> <wsdl:service
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> name="MyTestService">
> <wsdl:port name="SOAPport_typePort"
> binding="tns:SOAPport_binding">
> <soap:address location="PUT ACTUAL ADDRESS HERE"/>
> </wsdl:port>
> </wsdl:service>
> </definitions>
>
__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 

Test.zip (19K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Is it me, NB 4.1, or sun.xml.rpc... again?

Bruno Lotse
Just for a fun generated a request from Axis 1.2
client

POST /Test/TestWS HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime,
multipart/related, text/*
User-Agent: Axis/1.2
Host: 127.0.0.1:8080
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: ""
Content-Length: 360

<?xml version="1.0" encoding="UTF-8"?>
   <soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <soapenv:Body>
         <myOperation
xmlns="http://my.new.webservice/namespace">
            <input xmlns="">BRUNO</input>
         </myOperation>
      </soapenv:Body>
   </soapenv:Envelope>

Axis was accepted by com.sun.rpc SAAJ. No problem
here.
Looks like java to java is OK. Yet it is a web
service.


 
--- Bruno Lotse <[hidden email]> wrote:

> Hi Rico:
> Hm... namespaces again.
> Removed tns prefix from operation name, rebuild the
> server, deployed the service with a handler, test
> it.
> WORKS! Thank you very much Rico for the tip. Great
> job!!!
> Then I went to another machine and created a
> com.sun.rpc. client using wsdl from the server and
> wscompile tool.
> (See TestServiceClient.zip). Generated request
> POST /Test/TestWS HTTP/1.1
>
> Content-Type: text/xml; charset=utf-8
> Content-Length: 399
> SOAPAction: ""
> User-Agent: Java/1.4.2_05
> Host: 127.0.0.1:8080
> Accept: text/html, image/gif, image/jpeg, *; q=.2,
> */*; q=.2
> Connection: keep-alive
>
> <?xml version="1.0" encoding="UTF-8"?>
>    <env:Envelope
>
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/"

> xmlns:ns0="http://my.new.webservice/namespace">
>       <env:Body>
>          <ns0:myOperation>
>             <input>BRUNO</input>
>          </ns0:myOperation>
>       </env:Body>
>    </env:Envelope>
>
> Hop! I've got a proper response. Nothing broken.
> Stuff
> is working!
>
>
> Then I tried another thing. We are talking about web
> service and therefore interoperability between
> system.
> So I generated SOAP request to my server from XMLSpy
> Enterprise v.5.
> Request
>
> POST /Test/TestWS HTTP/1.1
> Content-Type: text/xml
> User-Agent: XML Spy
> SOAPAction: ""
> Host: 127.0.0.1:8080
> Content-Length: 416
> Connection: Keep-Alive
> Cache-Control: no-cache
>
> <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/2001/XMLSchema-instance"

> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>     <SOAP-ENV:Body>
>         <m:myOperation
> xmlns:m="http://my.new.webservice/namespace">
>             <input>Bruno</input>
>         </m:myOperation>
>     </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
> Boom! I've got a fault
> <env:Envelope
>
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
>
xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:ns0="http://my.new.webservice/namespace"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>     <env:Body>
>         <env:Fault>
>             <faultcode>env:Server</faultcode>
>             <faultstring>JAXRPC.TIE.04: Internal
> Server Error (JAXRPCTIE01: caught exception while
> handling request: java.lang.ClassCastException:
>
com.sun.xml.messaging.saaj.soap.impl.TextImpl)</faultstring>
>         </env:Fault>
>     </env:Body>
> </env:Envelope>
>
> Checked out the server log - ClassCastException!!!
>
[#|2005-08-24T10:44:02.513-0400|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.tools.deployment|_ThreadID=12;|DPL5306:Servlet
> Web Service Endpoint [TestWS] listening at address
> [http://fedora:8080/Test/TestWS]|#]
>
[#|2005-08-24T10:44:28.083-0400|WARNING|sun-appserver-pe8.1_02|javax.enterprise.system.container.web|_ThreadID=13;|preWebHandlerError
> java.lang.ClassCastException:
> com.sun.xml.messaging.saaj.soap.impl.TextImpl
>         at
>
com.sun.xml.rpc.server.StreamingHandler.getOpcodeForRequestMessage(StreamingHandler.java:628)
>         at
>
com.sun.enterprise.webservice.WsUtil.getInvMethod(WsUtil.java:943)
>         at
>
com.sun.enterprise.webservice.ServletPreHandler.handleRequest(ServletPreHandler.java:55)
>         at
>
com.sun.xml.rpc.client.HandlerChainImpl.handleRequest(HandlerChainImpl.java:86)

>
> Any thoughts why request generated from java to java
> works with handler, yet should I try non-java client
> -
> ClassCastException? Evidently SAAJ API does not like
> something in the layout of SOAP request generated by
> XMLSpy. The question - what is it? Is there
> something
> wrong in XMLSpy request? Looks fine to me.
>
> As always looking forward to hearing your thoughts.
> They are extremely helpful.
> I am attaching a zip file with data relating to the
> test case.
> Cheers
> Bruno
>
> P.S. Incidentally which tools are you using to check
> validity of wsdl files. I've checked all the
> previous
> versions on XMLSpy and Stylus Studio v.5. They did
> not
> picked up those problems with namespaces. Which tool
> would you recommend to generate wsdls compatible
> with
> com.sun.rpc?
>
>
>
> --- Roderico Cruz <[hidden email]> wrote:
>
> > Hi Bruno,
> > The operation name entries in the portType and
> SOAP
> > binding sections of
> > the wsdl  had an unnecessary namespace prefix
> > qualifier before it, e.g.,
> > operation name="tns:myOperation". This works fine
> > until you add the SOAP
> > message handler which calls the SAAJ API to access
> > the SOAP message.  To
> > fix this, I took out the unnecessary "tns:"
> > qualifier in both the
> > operation name entries in the WSDL, i.e.,
> operation
> > name="myOperation".
> > Attached is the revised wsdl that works. I tested
> it
> > and it worked fine
> > with the sample message handler. BTW, to get the
> > output of the sample
> > message handler, you should look at the server
> log.
> > Rico
> >
> > Bruno Lotse wrote:
> >
> > >Hi Rico.
> > >I am sending Test.tar.bz2 with my project which I
> > am
> > >running on NB 4.1. There you can find problems
> > folder
> > >with exceptions which I am getting when service
> > with a
> > >handler is deployed and tested in NB4.1 Runtime
> > >tab(WebServiceClientException and
> > Server.snippet.log).
> > >
> > >I am using run-of-a-mill MessageHandler.java -
> > >generated from NB4.1 template and attached to the
> > >service according to NB tool. You can see config
> > files
> > >in the tarball.
> > >Looking forward to hearing from you ;)
> > >Cheers,
> > >Bruno
> > >--- Roderico Cruz <[hidden email]> wrote:
> > >
> > >  
> > >
> > >>How did you configure the handler to work with
> the
> > >>web service? Did you
> > >>use the facility provided by Netbeans? Also it
> > would
> > >>be helpful if you
> > >>can send the handler code.
> > >>Rico
> > >>
> > >>Bruno Lotse wrote:
> > >>
> > >>    
> > >>
> > >>>I also tried a template wsdl with xml entities
> to
> > >>>      
> > >>>
> > >>see
>
=== message truncated ===


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 
Reply | Threaded
Open this post in threaded view
|

Re: Is it me, NB 4.1, or sun.xml.rpc... again?

Roderico Cruz
In reply to this post by Bruno Lotse
Bruno,
I've posted the interoperability problem in the jaxrpc forum
([hidden email]). I'll let you know what I find out.
Currently, Netbeans does not have a WSDL validation tool. I am not using
any validation tool, I am on the lookout for a good one which should
include Basic Profile compliance (to ensure interoperability).
Rico

Bruno Lotse wrote:

>Hi Rico:
>Hm... namespaces again.
>Removed tns prefix from operation name, rebuild the
>server, deployed the service with a handler, test it.
>WORKS! Thank you very much Rico for the tip. Great
>job!!!
>Then I went to another machine and created a
>com.sun.rpc. client using wsdl from the server and
>wscompile tool.
>(See TestServiceClient.zip). Generated request
>POST /Test/TestWS HTTP/1.1
>
>Content-Type: text/xml; charset=utf-8
>Content-Length: 399
>SOAPAction: ""
>User-Agent: Java/1.4.2_05
>Host: 127.0.0.1:8080
>Accept: text/html, image/gif, image/jpeg, *; q=.2,
>*/*; q=.2
>Connection: keep-alive
>
><?xml version="1.0" encoding="UTF-8"?>
>   <env:Envelope
>xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
>xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/"
>xmlns:ns0="http://my.new.webservice/namespace">
>      <env:Body>
>         <ns0:myOperation>
>            <input>BRUNO</input>
>         </ns0:myOperation>
>      </env:Body>
>   </env:Envelope>
>
>Hop! I've got a proper response. Nothing broken. Stuff
>is working!
>
>
>Then I tried another thing. We are talking about web
>service and therefore interoperability between system.
>So I generated SOAP request to my server from XMLSpy
>Enterprise v.5.
>Request
>
>POST /Test/TestWS HTTP/1.1
>Content-Type: text/xml
>User-Agent: XML Spy
>SOAPAction: ""
>Host: 127.0.0.1:8080
>Content-Length: 416
>Connection: Keep-Alive
>Cache-Control: no-cache
>
><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/2001/XMLSchema-instance"
>xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>    <SOAP-ENV:Body>
>        <m:myOperation
>xmlns:m="http://my.new.webservice/namespace">
>            <input>Bruno</input>
>        </m:myOperation>
>    </SOAP-ENV:Body>
></SOAP-ENV:Envelope>
>
>Boom! I've got a fault
><env:Envelope
>xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
>xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/"
>xmlns:ns0="http://my.new.webservice/namespace"
>xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>    <env:Body>
>        <env:Fault>
>            <faultcode>env:Server</faultcode>
>            <faultstring>JAXRPC.TIE.04: Internal
>Server Error (JAXRPCTIE01: caught exception while
>handling request: java.lang.ClassCastException:
>com.sun.xml.messaging.saaj.soap.impl.TextImpl)</faultstring>
>        </env:Fault>
>    </env:Body>
></env:Envelope>
>
>Checked out the server log - ClassCastException!!!
>[#|2005-08-24T10:44:02.513-0400|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.tools.deployment|_ThreadID=12;|DPL5306:Servlet
>Web Service Endpoint [TestWS] listening at address
>[http://fedora:8080/Test/TestWS]|#]
>[#|2005-08-24T10:44:28.083-0400|WARNING|sun-appserver-pe8.1_02|javax.enterprise.system.container.web|_ThreadID=13;|preWebHandlerError
>java.lang.ClassCastException:
>com.sun.xml.messaging.saaj.soap.impl.TextImpl
>        at
>com.sun.xml.rpc.server.StreamingHandler.getOpcodeForRequestMessage(StreamingHandler.java:628)
>        at
>com.sun.enterprise.webservice.WsUtil.getInvMethod(WsUtil.java:943)
>        at
>com.sun.enterprise.webservice.ServletPreHandler.handleRequest(ServletPreHandler.java:55)
>        at
>com.sun.xml.rpc.client.HandlerChainImpl.handleRequest(HandlerChainImpl.java:86)
>
>Any thoughts why request generated from java to java
>works with handler, yet should I try non-java client -
>ClassCastException? Evidently SAAJ API does not like
>something in the layout of SOAP request generated by
>XMLSpy. The question - what is it? Is there something
>wrong in XMLSpy request? Looks fine to me.
>
>As always looking forward to hearing your thoughts.
>They are extremely helpful.
>I am attaching a zip file with data relating to the
>test case.
>Cheers
>Bruno
>
>P.S. Incidentally which tools are you using to check
>validity of wsdl files. I've checked all the previous
>versions on XMLSpy and Stylus Studio v.5. They did not
>picked up those problems with namespaces. Which tool
>would you recommend to generate wsdls compatible with
>com.sun.rpc?
>
>
>
>--- Roderico Cruz <[hidden email]> wrote:
>
>  
>
>>Hi Bruno,
>>The operation name entries in the portType and SOAP
>>binding sections of
>>the wsdl  had an unnecessary namespace prefix
>>qualifier before it, e.g.,
>>operation name="tns:myOperation". This works fine
>>until you add the SOAP
>>message handler which calls the SAAJ API to access
>>the SOAP message.  To
>>fix this, I took out the unnecessary "tns:"
>>qualifier in both the
>>operation name entries in the WSDL, i.e., operation
>>name="myOperation".
>>Attached is the revised wsdl that works. I tested it
>>and it worked fine
>>with the sample message handler. BTW, to get the
>>output of the sample
>>message handler, you should look at the server log.
>>Rico
>>
>>Bruno Lotse wrote:
>>
>>    
>>
>>>Hi Rico.
>>>I am sending Test.tar.bz2 with my project which I
>>>      
>>>
>>am
>>    
>>
>>>running on NB 4.1. There you can find problems
>>>      
>>>
>>folder
>>    
>>
>>>with exceptions which I am getting when service
>>>      
>>>
>>with a
>>    
>>
>>>handler is deployed and tested in NB4.1 Runtime
>>>tab(WebServiceClientException and
>>>      
>>>
>>Server.snippet.log).
>>    
>>
>>>I am using run-of-a-mill MessageHandler.java -
>>>generated from NB4.1 template and attached to the
>>>service according to NB tool. You can see config
>>>      
>>>
>>files
>>    
>>
>>>in the tarball.
>>>Looking forward to hearing from you ;)
>>>Cheers,
>>>Bruno
>>>--- Roderico Cruz <[hidden email]> wrote:
>>>
>>>
>>>
>>>      
>>>
>>>>How did you configure the handler to work with the
>>>>web service? Did you
>>>>use the facility provided by Netbeans? Also it
>>>>        
>>>>
>>would
>>    
>>
>>>>be helpful if you
>>>>can send the handler code.
>>>>Rico
>>>>
>>>>Bruno Lotse wrote:
>>>>
>>>>  
>>>>
>>>>        
>>>>
>>>>>I also tried a template wsdl with xml entities to
>>>>>    
>>>>>
>>>>>          
>>>>>
>>>>see
>>>>  
>>>>
>>>>        
>>>>
>>>>>how NB4.1 and com.sun.rpc handle this. Happy to
>>>>>          
>>>>>
>>say
>>    
>>
>>>>>that a template file was properly parsed and a
>>>>>          
>>>>>
>>web
>>    
>>
>>>>>service generated. But the same problem with a
>>>>>    
>>>>>
>>>>>          
>>>>>
>>>>service
>>>>  
>>>>
>>>>        
>>>>
>>>>>handler. Should I create one, register with the
>>>>>service, deploy the service and try to test it, I
>>>>>    
>>>>>
>>>>>          
>>>>>
>>>>am
>>>>  
>>>>
>>>>        
>>>>
>>>>>getting exceptions all over - cannot generate a
>>>>>    
>>>>>
>>>>>          
>>>>>
>>>>SOAP
>>>>  
>>>>
>>>>        
>>>>
>>>>>envelope.
>>>>>So the same problem as below.
>>>>>This is wsdl which I ran:
>>>>>
>>>>><?xml version="1.0" encoding="utf-8"?>
>>>>><!DOCTYPE definitions [
>>>>> <!ENTITY SERVICE "MyNewService">
>>>>> <!ENTITY SERVICE_NS
>>>>>"http://my.new.webservice/namespace">
>>>>> <!ENTITY SERVICE_URL
>>>>>"http://localhost:8080/MyService">
>>>>> <!ENTITY OPERATION "myOperation">
>>>>> <!ENTITY INPUT "input">
>>>>> <!ENTITY OUTPUT "output">
>>>>> <!ENTITY PORT "SOAPport">
>>>>>]>
>>>>><definitions name="&SERVICE;"
>>>>>    
>>>>>
>>>>>          
>>>>>
>>>>xmlns:tns="&SERVICE_NS;"
>>>>  
>>>>
>>>>        
>>>>
>>>>>targetNamespace="&SERVICE_NS;"
>>>>>xmlns="http://schemas.xmlsoap.org/wsdl/"
>>>>>          
>>>>>
>>>>xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>>>>        
>>>>
>>>>>xmlns:xs="http://www.w3.org/2001/XMLSchema"  >
>>>>> <message name="&SERVICE;_request">
>>>>> <part name="&INPUT;" type="xs:string"/>
>>>>> </message>
>>>>> <message name="&SERVICE;_response">
>>>>> <part name="&OUTPUT;" type="xs:string"/>
>>>>> </message>
>>>>> <portType name="&PORT;_type">
>>>>> <operation name="tns:&OPERATION;">
>>>>> <input message="tns:&SERVICE;_request"/>
>>>>> <output message="tns:&SERVICE;_response"/>
>>>>> </operation>
>>>>> </portType>
>>>>> <binding name="&PORT;_binding"
>>>>>type="tns:&PORT;_type">
>>>>> <soap:binding style="rpc"
>>>>>          
>>>>>
>>>>transport="http://schemas.xmlsoap.org/soap/http"/>
>>>>        
>>>>
>>>>> <operation name="tns:&OPERATION;">
>>>>> <input>
>>>>> <soap:body use="literal"
>>>>>namespace="&SERVICE_NS;"/>
>>>>> </input>
>>>>> <output>
>>>>> <soap:body use="literal"
>>>>>namespace="&SERVICE_NS;"/>
>>>>> </output>
>>>>> </operation>
>>>>> </binding>
>>>>> <service name="&SERVICE;">
>>>>> <port name="My&PORT;"
>>>>>    
>>>>>
>>>>>          
>>>>>
>>>>binding="tns:&PORT;_binding">
>>>>  
>>>>
>>>>        
>>>>
>>>>> <soap:address location="&SERVICE_URL;"/>
>>>>> </port>
>>>>> </service>
>>>>></definitions>
>>>>>
>>>>>
>>>>>--- Bruno Lotse <[hidden email]> wrote:
>>>>>
>>>>>
>>>>>
>>>>>    
>>>>>
>>>>>          
>>>>>
>>>>>>Hi, Roderico.
>>>>>>I've tried it and must say it works. Thank you!
>>>>>>            
>>>>>>
>>It
>>    
>>
>>>>>>works though at least partially - in terms of
>>>>>>            
>>>>>>
>>just
>>    
>>
>>>>>>creating a web service. Yet whenever I am trying
>>>>>>      
>>>>>>
>>>>>>            
>>>>>>
>>>>to
>>>>  
>>>>
>>>>        
>>>>
>>>>>>create a handler to the service, register the
>>>>>>service,
>>>>>>and test it, I am getting this:
>>>>>>
>>>>>>
>>>>>>  
>>>>>>
>>>>>>      
>>>>>>
>>>>>>            
>>>>>>
>>>#|2005-08-23T12:49:27.958-0400|SEVERE|sun-appserver-pe8.1_02|javax.xml.messaging.saaj.soap|_ThreadID=23;|SAAJ0511:
>>>      
>>>
>>>>  
>>>>
>>>>        
>>>>
>>>>>    
>>>>>
>>>>>          
>>>>>
>>>>>>Unable to create envelope from given source|#]
>>>>>>
>>>>>>  
>>>>>>
>>>>>>      
>>>>>>
>>>>>>            
>>>>>>
>>>[#|2005-08-23T12:49:27.958-0400|SEVERE|sun-appserver-pe8.1_02|com.sun.xml.rpc.server|_ThreadID=23;|Unable
>>>      
>>>
>>>>  
>>>>
>>>>        
>>>>
>>>>>    
>>>>>
>>>>>          
>>>>>
>>>>>>to create envelope from given source:
>>>>>>com.sun.xml.messaging.saaj.SOAPExceptionImpl:
>>>>>>      
>>>>>>            
>>>>>>
>=== message truncated ===> <?xml version="1.0"
>encoding="UTF-8"?>
>  
>
>><definitions
>>xmlns="http://schemas.xmlsoap.org/wsdl/"
>>xmlns:tns="http://my.new.webservice/namespace"
>>xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>>xmlns:xs="http://www.w3.org/2001/XMLSchema"
>>name="MyNewService"
>>
>>    
>>
>targetNamespace="http://my.new.webservice/namespace">
>  
>
>><message name="MyNewService_request">
>> <part name="input" type="xs:string"/>
>> </message>
>><message name="MyNewService_response">
>> <part name="output" type="xs:string"/>
>> </message>
>><portType name="SOAPport_type">
>> <operation name="myOperation">
>> <input message="tns:MyNewService_request"/>
>> <output message="tns:MyNewService_response"/>
>> </operation>
>> </portType>
>><binding name="SOAPport_binding"
>>type="tns:SOAPport_type">
>> <soap:binding style="rpc"
>>transport="http://schemas.xmlsoap.org/soap/http"/>
>> <operation name="myOperation">
>> <input>
>> <soap:body use="literal"
>>namespace="http://my.new.webservice/namespace"/>
>> </input>
>> <output>
>> <soap:body use="literal"
>>namespace="http://my.new.webservice/namespace"/>
>> </output>
>> </operation>
>> </binding>
>><wsdl:service
>>xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>>name="MyTestService">
>><wsdl:port name="SOAPport_typePort"
>>binding="tns:SOAPport_binding">
>><soap:address location="PUT ACTUAL ADDRESS HERE"/>
>></wsdl:port>
>></wsdl:service>
>></definitions>
>>
>>    
>>
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam?  Yahoo! Mail has the best spam protection around
>http://mail.yahoo.com 
>


--
Roderico Cruz
Sun Microsystems
(650) 786-4824

Reply | Threaded
Open this post in threaded view
|

Re: Is it me, NB 4.1, or sun.xml.rpc... again?

Bruno Lotse
Thank you very much, Rico.

Looking forward to a solution whenever it is available
to the interoperability problem.

RE: Currently, Netbeans does not have a WSDL
validation tool.

Perhaps it should be a great wish-list item for future
NetBeans releases and Sun Studio Creator. A client
would deliver his/her wsdl, you validate it in NB and
immediately aware whether client's service or a
client's call WS-I Basic Profile compliant or not.

Cheers,
Bruno


--- Roderico Cruz <[hidden email]> wrote:

> Bruno,
> I've posted the interoperability problem in the
> jaxrpc forum
> ([hidden email]). I'll let you know what
> I find out.
> Currently, Netbeans does not have a WSDL validation
> tool. I am not using
> any validation tool, I am on the lookout for a good
> one which should
> include Basic Profile compliance (to ensure
> interoperability).
> Rico
>
> Bruno Lotse wrote:
>
> >Hi Rico:
> >Hm... namespaces again.
> >Removed tns prefix from operation name, rebuild the
> >server, deployed the service with a handler, test
> it.
> >WORKS! Thank you very much Rico for the tip. Great
> >job!!!
> >Then I went to another machine and created a
> >com.sun.rpc. client using wsdl from the server and
> >wscompile tool.
> >(See TestServiceClient.zip). Generated request
> >POST /Test/TestWS HTTP/1.1
> >
> >Content-Type: text/xml; charset=utf-8
> >Content-Length: 399
> >SOAPAction: ""
> >User-Agent: Java/1.4.2_05
> >Host: 127.0.0.1:8080
> >Accept: text/html, image/gif, image/jpeg, *; q=.2,
> >*/*; q=.2
> >Connection: keep-alive
> >
> ><?xml version="1.0" encoding="UTF-8"?>
> >   <env:Envelope
>
>xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
> >xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>
>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
>xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/"
> >xmlns:ns0="http://my.new.webservice/namespace">
> >      <env:Body>
> >         <ns0:myOperation>
> >            <input>BRUNO</input>
> >         </ns0:myOperation>
> >      </env:Body>
> >   </env:Envelope>
> >
> >Hop! I've got a proper response. Nothing broken.
> Stuff
> >is working!
> >
> >
> >Then I tried another thing. We are talking about
> web
> >service and therefore interoperability between
> system.
> >So I generated SOAP request to my server from
> XMLSpy
> >Enterprise v.5.
> >Request
> >
> >POST /Test/TestWS HTTP/1.1
> >Content-Type: text/xml
> >User-Agent: XML Spy
> >SOAPAction: ""
> >Host: 127.0.0.1:8080
> >Content-Length: 416
> >Connection: Keep-Alive
> >Cache-Control: no-cache
> >
> ><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/2001/XMLSchema-instance"
> >xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> >    <SOAP-ENV:Body>
> >        <m:myOperation
> >xmlns:m="http://my.new.webservice/namespace">
> >            <input>Bruno</input>
> >        </m:myOperation>
> >    </SOAP-ENV:Body>
> ></SOAP-ENV:Envelope>
> >
> >Boom! I've got a fault
> ><env:Envelope
>
>xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
>
>xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/"
> >xmlns:ns0="http://my.new.webservice/namespace"
> >xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>
>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> >    <env:Body>
> >        <env:Fault>
> >            <faultcode>env:Server</faultcode>
> >            <faultstring>JAXRPC.TIE.04: Internal
> >Server Error (JAXRPCTIE01: caught exception while
> >handling request: java.lang.ClassCastException:
>
>com.sun.xml.messaging.saaj.soap.impl.TextImpl)</faultstring>
> >        </env:Fault>
> >    </env:Body>
> ></env:Envelope>
> >
> >Checked out the server log - ClassCastException!!!
>
>[#|2005-08-24T10:44:02.513-0400|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.tools.deployment|_ThreadID=12;|DPL5306:Servlet
> >Web Service Endpoint [TestWS] listening at address
> >[http://fedora:8080/Test/TestWS]|#]
>
>[#|2005-08-24T10:44:28.083-0400|WARNING|sun-appserver-pe8.1_02|javax.enterprise.system.container.web|_ThreadID=13;|preWebHandlerError
> >java.lang.ClassCastException:
> >com.sun.xml.messaging.saaj.soap.impl.TextImpl
> >        at
>
>com.sun.xml.rpc.server.StreamingHandler.getOpcodeForRequestMessage(StreamingHandler.java:628)
> >        at
>
>com.sun.enterprise.webservice.WsUtil.getInvMethod(WsUtil.java:943)
> >        at
>
>com.sun.enterprise.webservice.ServletPreHandler.handleRequest(ServletPreHandler.java:55)
> >        at
>
>com.sun.xml.rpc.client.HandlerChainImpl.handleRequest(HandlerChainImpl.java:86)
> >
> >Any thoughts why request generated from java to
> java
> >works with handler, yet should I try non-java
> client -
> >ClassCastException? Evidently SAAJ API does not
> like
> >something in the layout of SOAP request generated
> by
> >XMLSpy. The question - what is it? Is there
> something
> >wrong in XMLSpy request? Looks fine to me.
> >
> >As always looking forward to hearing your thoughts.
> >They are extremely helpful.
> >I am attaching a zip file with data relating to the
> >test case.
> >Cheers
> >Bruno
> >
> >P.S. Incidentally which tools are you using to
> check
> >validity of wsdl files. I've checked all the
> previous
> >versions on XMLSpy and Stylus Studio v.5. They did
> not
> >picked up those problems with namespaces. Which
> tool
> >would you recommend to generate wsdls compatible
> with
> >com.sun.rpc?
> >
> >
> >
> >--- Roderico Cruz <[hidden email]> wrote:
> >
> >  
> >
> >>Hi Bruno,
> >>The operation name entries in the portType and
> SOAP
> >>binding sections of
> >>the wsdl  had an unnecessary namespace prefix
> >>qualifier before it, e.g.,
> >>operation name="tns:myOperation". This works fine
> >>until you add the SOAP
> >>message handler which calls the SAAJ API to access
> >>the SOAP message.  To
> >>fix this, I took out the unnecessary "tns:"
> >>qualifier in both the
> >>operation name entries in the WSDL, i.e.,
> operation
> >>name="myOperation".
> >>Attached is the revised wsdl that works. I tested
> it
> >>and it worked fine
> >>with the sample message handler. BTW, to get the
> >>output of the sample
> >>message handler, you should look at the server
> log.
> >>Rico
> >>
> >>Bruno Lotse wrote:
> >>
> >>    
> >>
> >>>Hi Rico.
> >>>I am sending Test.tar.bz2 with my project which I
> >>>      
> >>>
> >>am
> >>    
> >>
> >>>running on NB 4.1. There you can find problems
> >>>      
> >>>
> >>folder
> >>    
> >>
> >>>with exceptions which I am getting when service
> >>>      
>
=== message truncated ===


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 
Reply | Threaded
Open this post in threaded view
|

Re: Is it me, NB 4.1, or sun.xml.rpc... again?

Roderico Cruz
Bruno,
I wonder if the handler code itself is doing something to the SOAP
message that makes the client call fail. Kindly comment out the code in
the handleRequest method (except the return statement, of course) and
test it with the XMLSpy client again. (Sorry I don't have XMLSpy).
Rico
Bruno Lotse wrote:

>Thank you very much, Rico.
>
>Looking forward to a solution whenever it is available
>to the interoperability problem.
>
>RE: Currently, Netbeans does not have a WSDL
>validation tool.
>
>Perhaps it should be a great wish-list item for future
>NetBeans releases and Sun Studio Creator. A client
>would deliver his/her wsdl, you validate it in NB and
>immediately aware whether client's service or a
>client's call WS-I Basic Profile compliant or not.
>
>Cheers,
>Bruno
>
>
>--- Roderico Cruz <[hidden email]> wrote:
>
>  
>
>>Bruno,
>>I've posted the interoperability problem in the
>>jaxrpc forum
>>([hidden email]). I'll let you know what
>>I find out.
>>Currently, Netbeans does not have a WSDL validation
>>tool. I am not using
>>any validation tool, I am on the lookout for a good
>>one which should
>>include Basic Profile compliance (to ensure
>>interoperability).
>>Rico
>>
>>Bruno Lotse wrote:
>>
>>    
>>
>>>Hi Rico:
>>>Hm... namespaces again.
>>>Removed tns prefix from operation name, rebuild the
>>>server, deployed the service with a handler, test
>>>      
>>>
>>it.
>>    
>>
>>>WORKS! Thank you very much Rico for the tip. Great
>>>job!!!
>>>Then I went to another machine and created a
>>>com.sun.rpc. client using wsdl from the server and
>>>wscompile tool.
>>>(See TestServiceClient.zip). Generated request
>>>POST /Test/TestWS HTTP/1.1
>>>
>>>Content-Type: text/xml; charset=utf-8
>>>Content-Length: 399
>>>SOAPAction: ""
>>>User-Agent: Java/1.4.2_05
>>>Host: 127.0.0.1:8080
>>>Accept: text/html, image/gif, image/jpeg, *; q=.2,
>>>*/*; q=.2
>>>Connection: keep-alive
>>>
>>><?xml version="1.0" encoding="UTF-8"?>
>>>  <env:Envelope
>>>      
>>>
>>xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
>>    
>>
>>>xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>>>      
>>>
>>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>
>>xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/"
>>    
>>
>>>xmlns:ns0="http://my.new.webservice/namespace">
>>>     <env:Body>
>>>        <ns0:myOperation>
>>>           <input>BRUNO</input>
>>>        </ns0:myOperation>
>>>     </env:Body>
>>>  </env:Envelope>
>>>
>>>Hop! I've got a proper response. Nothing broken.
>>>      
>>>
>>Stuff
>>    
>>
>>>is working!
>>>
>>>
>>>Then I tried another thing. We are talking about
>>>      
>>>
>>web
>>    
>>
>>>service and therefore interoperability between
>>>      
>>>
>>system.
>>    
>>
>>>So I generated SOAP request to my server from
>>>      
>>>
>>XMLSpy
>>    
>>
>>>Enterprise v.5.
>>>Request
>>>
>>>POST /Test/TestWS HTTP/1.1
>>>Content-Type: text/xml
>>>User-Agent: XML Spy
>>>SOAPAction: ""
>>>Host: 127.0.0.1:8080
>>>Content-Length: 416
>>>Connection: Keep-Alive
>>>Cache-Control: no-cache
>>>
>>><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/2001/XMLSchema-instance"
>>    
>>
>>>xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>>>   <SOAP-ENV:Body>
>>>       <m:myOperation
>>>xmlns:m="http://my.new.webservice/namespace">
>>>           <input>Bruno</input>
>>>       </m:myOperation>
>>>   </SOAP-ENV:Body>
>>></SOAP-ENV:Envelope>
>>>
>>>Boom! I've got a fault
>>><env:Envelope
>>>      
>>>
>>xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
>>
>>xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/"
>>    
>>
>>>xmlns:ns0="http://my.new.webservice/namespace"
>>>xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>>>      
>>>
>>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>>    
>>
>>>   <env:Body>
>>>       <env:Fault>
>>>           <faultcode>env:Server</faultcode>
>>>           <faultstring>JAXRPC.TIE.04: Internal
>>>Server Error (JAXRPCTIE01: caught exception while
>>>handling request: java.lang.ClassCastException:
>>>      
>>>
>>com.sun.xml.messaging.saaj.soap.impl.TextImpl)</faultstring>
>>    
>>
>>>       </env:Fault>
>>>   </env:Body>
>>></env:Envelope>
>>>
>>>Checked out the server log - ClassCastException!!!
>>>      
>>>
>>[#|2005-08-24T10:44:02.513-0400|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.tools.deployment|_ThreadID=12;|DPL5306:Servlet
>>    
>>
>>>Web Service Endpoint [TestWS] listening at address
>>>[http://fedora:8080/Test/TestWS]|#]
>>>      
>>>
>>[#|2005-08-24T10:44:28.083-0400|WARNING|sun-appserver-pe8.1_02|javax.enterprise.system.container.web|_ThreadID=13;|preWebHandlerError
>>    
>>
>>>java.lang.ClassCastException:
>>>com.sun.xml.messaging.saaj.soap.impl.TextImpl
>>>       at
>>>      
>>>
>>com.sun.xml.rpc.server.StreamingHandler.getOpcodeForRequestMessage(StreamingHandler.java:628)
>>    
>>
>>>       at
>>>      
>>>
>>com.sun.enterprise.webservice.WsUtil.getInvMethod(WsUtil.java:943)
>>    
>>
>>>       at
>>>      
>>>
>>com.sun.enterprise.webservice.ServletPreHandler.handleRequest(ServletPreHandler.java:55)
>>    
>>
>>>       at
>>>      
>>>
>>com.sun.xml.rpc.client.HandlerChainImpl.handleRequest(HandlerChainImpl.java:86)
>>    
>>
>>>Any thoughts why request generated from java to
>>>      
>>>
>>java
>>    
>>
>>>works with handler, yet should I try non-java
>>>      
>>>
>>client -
>>    
>>
>>>ClassCastException? Evidently SAAJ API does not
>>>      
>>>
>>like
>>    
>>
>>>something in the layout of SOAP request generated
>>>      
>>>
>>by
>>    
>>
>>>XMLSpy. The question - what is it? Is there
>>>      
>>>
>>something
>>    
>>
>>>wrong in XMLSpy request? Looks fine to me.
>>>
>>>As always looking forward to hearing your thoughts.
>>>They are extremely helpful.
>>>I am attaching a zip file with data relating to the
>>>test case.
>>>Cheers
>>>Bruno
>>>
>>>P.S. Incidentally which tools are you using to
>>>      
>>>
>>check
>>    
>>
>>>validity of wsdl files. I've checked all the
>>>      
>>>
>>previous
>>    
>>
>>>versions on XMLSpy and Stylus Studio v.5. They did
>>>      
>>>
>>not
>>    
>>
>>>picked up those problems with namespaces. Which
>>>      
>>>
>>tool
>>    
>>
>>>would you recommend to generate wsdls compatible
>>>      
>>>
>>with
>>    
>>
>>>com.sun.rpc?
>>>
>>>
>>>
>>>--- Roderico Cruz <[hidden email]> wrote:
>>>
>>>
>>>
>>>      
>>>
>>>>Hi Bruno,
>>>>The operation name entries in the portType and
>>>>        
>>>>
>>SOAP
>>    
>>
>>>>binding sections of
>>>>the wsdl  had an unnecessary namespace prefix
>>>>qualifier before it, e.g.,
>>>>operation name="tns:myOperation". This works fine
>>>>until you add the SOAP
>>>>message handler which calls the SAAJ API to access
>>>>the SOAP message.  To
>>>>fix this, I took out the unnecessary "tns:"
>>>>qualifier in both the
>>>>operation name entries in the WSDL, i.e.,
>>>>        
>>>>
>>operation
>>    
>>
>>>>name="myOperation".
>>>>Attached is the revised wsdl that works. I tested
>>>>        
>>>>
>>it
>>    
>>
>>>>and it worked fine
>>>>with the sample message handler. BTW, to get the
>>>>output of the sample
>>>>message handler, you should look at the server
>>>>        
>>>>
>>log.
>>    
>>
>>>>Rico
>>>>
>>>>Bruno Lotse wrote:
>>>>
>>>>  
>>>>
>>>>        
>>>>
>>>>>Hi Rico.
>>>>>I am sending Test.tar.bz2 with my project which I
>>>>>    
>>>>>
>>>>>          
>>>>>
>>>>am
>>>>  
>>>>
>>>>        
>>>>
>>>>>running on NB 4.1. There you can find problems
>>>>>    
>>>>>
>>>>>          
>>>>>
>>>>folder
>>>>  
>>>>
>>>>        
>>>>
>>>>>with exceptions which I am getting when service
>>>>>    
>>>>>          
>>>>>
>=== message truncated ===
>
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam?  Yahoo! Mail has the best spam protection around
>http://mail.yahoo.com 
>  
>


--
Roderico Cruz
Sun Microsystems
(650) 786-4824

Reply | Threaded
Open this post in threaded view
|

Re: Is it me, NB 4.1, or sun.xml.rpc... again?

Roderico Cruz
In reply to this post by Bruno Lotse
Yes, we should include this (if it is not already) in the Netbeans wish
list.
Rico

Bruno Lotse wrote:

>
>RE: Currently, Netbeans does not have a WSDL
>validation tool.
>
>Perhaps it should be a great wish-list item for future
>NetBeans releases and Sun Studio Creator. A client
>would deliver his/her wsdl, you validate it in NB and
>immediately aware whether client's service or a
>client's call WS-I Basic Profile compliant or not.
>
>Cheers,
>Bruno
>
>
>
>  
>


--
Roderico Cruz
Sun Microsystems
(650) 786-4824

Reply | Threaded
Open this post in threaded view
|

Re: Is it me, NB 4.1, or sun.xml.rpc... again?

Petr Blaha
Hi,
thanks for good idea. I filed new RFE, see
http://www.netbeans.org/issues/show_bug.cgi?id=63088

Petr

Roderico Cruz wrote:

> Yes, we should include this (if it is not already) in the Netbeans wish
> list.
> Rico
>
> Bruno Lotse wrote:
>
>>
>> RE: Currently, Netbeans does not have a WSDL
>> validation tool.
>>
>> Perhaps it should be a great wish-list item for future
>> NetBeans releases and Sun Studio Creator. A client
>> would deliver his/her wsdl, you validate it in NB and
>> immediately aware whether client's service or a
>> client's call WS-I Basic Profile compliant or not.
>>
>> Cheers,
>> Bruno
>>
>>
>>
>>  
>>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Is it me, NB 4.1, or sun.xml.rpc... again?

Bruno Lotse
In reply to this post by Roderico Cruz
Sure thing, Rico.

Commented out the handleRequest body.
Now it looks this way

public boolean handleRequest(MessageContext context) {
        System.out.println("handleRequest() called");
        /*
        try{
            SOAPMessageContext smc =
(SOAPMessageContext) context;
            SOAPMessage msg = smc.getMessage();
            SOAPPart sp = msg.getSOAPPart();
            SOAPEnvelope se = sp.getEnvelope();
            SOAPHeader shd = se.getHeader();
           
            SOAPBody sb = se.getBody();
            java.util.Iterator childElems =
sb.getChildElements();
            SOAPElement child;
            StringBuffer message = new StringBuffer();
            while (childElems.hasNext()) {
                child = (SOAPElement)
childElems.next();
                message.append(new Date().toString() +
"--");
                formLogMessage(child, message);
            }
           
            System.out.println("Log message from
server: " + message.toString());
        } catch(Exception e){
            e.printStackTrace();
        }
         */
        return true;
    }

Sending the same XML Spy http requst. And I am getting
this

[#|2005-08-25T12:22:53.857-0400|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.container.web|_ThreadID=14;|WEB0100:
Loading web module [Test] in virtual server [server]
at [/Test]|#]
[#|2005-08-25T12:22:53.924-0400|INFO|sun-appserver-pe8.1_02|javax.enterprise.resource.webservices.rpc.server.http|_ThreadID=14;|JAXRPCSERVLET14:
JAX-RPC servlet initializing|#]
[#|2005-08-25T12:22:54.057-0400|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.tools.admin|_ThreadID=14;|ADM1042:Status
of dynamic reconfiguration event
processing:[success]|#]
[#|2005-08-25T12:23:16.452-0400|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.tools.deployment|_ThreadID=16;|DPL5306:Servlet
Web Service Endpoint [TestWS] listening at address
[http://fedora:8080/Test/TestWS]|#]
[#|2005-08-25T12:23:16.988-0400|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.tools.deployment|_ThreadID=16;|DPL5306:Servlet
Web Service Endpoint [TestWS] listening at address
[http://fedora:8080/Test/TestWS]|#]
[#|2005-08-25T12:23:41.128-0400|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=17;|handleRequest()
called|#]

//
// OK. we are through the empty handleRequest. Nothing
added, none removed - BL
//


[#|2005-08-25T12:24:32.104-0400|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.tools.deployment|_ThreadID=18;|DPL5306:Servlet
Web Service Endpoint [TestWS] listening at address
[http://fedora:8080/Test/TestWS]|#]
[#|2005-08-25T12:24:49.023-0400|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.tools.deployment|_ThreadID=19;|DPL5306:Servlet
Web Service Endpoint [TestWS] listening at address
[http://fedora:8080/Test/TestWS]|#]
[#|2005-08-25T12:25:03.388-0400|WARNING|sun-appserver-pe8.1_02|javax.enterprise.system.container.web|_ThreadID=20;|preWebHandlerError
java.lang.ClassCastException:
com.sun.xml.messaging.saaj.soap.impl.TextImpl
        at
com.sun.xml.rpc.server.StreamingHandler.getOpcodeForRequestMessage(StreamingHandler.java:628)
        at
com.sun.enterprise.webservice.WsUtil.getInvMethod(WsUtil.java:943)
        at
com.sun.enterprise.webservice.ServletPreHandler.handleRequest(ServletPreHandler.java:55)
        at
com.sun.xml.rpc.client.HandlerChainImpl.handleRequest(HandlerChainImpl.java:86)
        at
com.sun.xml.rpc.server.StreamingHandler.callRequestHandlers(StreamingHandler.java:918)
        at
com.sun.xml.rpc.server.StreamingHandler.preHandlingHook(StreamingHandler.java:831)
        at
com.bruno.net.SOAPport_type_Tie.preHandlingHook(SOAPport_type_Tie.java:238)
        at
com.sun.xml.rpc.server.StreamingHandler.handle(StreamingHandler.java:102)
        at
com.sun.xml.rpc.server.http.JAXRPCServletDelegate.doPost(JAXRPCServletDelegate.java:443)
        at
com.sun.enterprise.webservice.JAXRPCServlet.doPost(JAXRPCServlet.java:50)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:767)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
        at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at
java.lang.reflect.Method.invoke(Method.java:585)
        at
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
        at
java.security.AccessController.doPrivileged(Native
Method)
        at
javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
        at
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
        at
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
        at
org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
        at
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
        at
java.security.AccessController.doPrivileged(Native
Method)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
        at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
        at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:185)
        at
com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:653)
        at
com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:534)
        at
com.sun.enterprise.web.connector.grizzly.ProcessorTask.doTask(ProcessorTask.java:403)
        at
com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:55)
|#]
[#|2005-08-25T12:25:03.391-0400|SEVERE|sun-appserver-pe8.1_02|com.sun.xml.rpc.server|_ThreadID=20;|com.sun.xml.messaging.saaj.soap.impl.TextImpl
java.lang.ClassCastException:
com.sun.xml.messaging.saaj.soap.impl.TextImpl
        at
com.sun.enterprise.webservice.WsUtil.throwSOAPFaultException(WsUtil.java:972)
        at
com.sun.enterprise.webservice.ServletPreHandler.handleRequest(ServletPreHandler.java:68)
        at
com.sun.xml.rpc.client.HandlerChainImpl.handleRequest(HandlerChainImpl.java:86)
        at
com.sun.xml.rpc.server.StreamingHandler.callRequestHandlers(StreamingHandler.java:918)
        at
com.sun.xml.rpc.server.StreamingHandler.preHandlingHook(StreamingHandler.java:831)
        at
com.bruno.net.SOAPport_type_Tie.preHandlingHook(SOAPport_type_Tie.java:238)
        at
com.sun.xml.rpc.server.StreamingHandler.handle(StreamingHandler.java:102)
        at
com.sun.xml.rpc.server.http.JAXRPCServletDelegate.doPost(JAXRPCServletDelegate.java:443)
        at
com.sun.enterprise.webservice.JAXRPCServlet.doPost(JAXRPCServlet.java:50)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:767)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
        at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at
java.lang.reflect.Method.invoke(Method.java:585)
        at
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
        at
java.security.AccessController.doPrivileged(Native
Method)
        at
javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
        at
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
        at
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
        at
org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
        at
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
        at
java.security.AccessController.doPrivileged(Native
Method)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
        at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
        at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:185)
        at
com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:653)
        at
com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:534)
        at
com.sun.enterprise.web.connector.grizzly.ProcessorTask.doTask(ProcessorTask.java:403)
        at
com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:55)
|#]
[#|2005-08-25T12:25:03.399-0400|SEVERE|sun-appserver-pe8.1_02|com.sun.xml.rpc.server|_ThreadID=20;|JAXRPCTIE01:
caught exception while handling request:
java.lang.ClassCastException:
com.sun.xml.messaging.saaj.soap.impl.TextImpl
java.lang.ClassCastException:
com.sun.xml.messaging.saaj.soap.impl.TextImpl
        at
com.sun.enterprise.webservice.WsUtil.throwSOAPFaultException(WsUtil.java:972)
        at
com.sun.enterprise.webservice.ServletPreHandler.handleRequest(ServletPreHandler.java:68)
        at
com.sun.xml.rpc.client.HandlerChainImpl.handleRequest(HandlerChainImpl.java:86)
        at
com.sun.xml.rpc.server.StreamingHandler.callRequestHandlers(StreamingHandler.java:918)
        at
com.sun.xml.rpc.server.StreamingHandler.preHandlingHook(StreamingHandler.java:831)
        at
com.bruno.net.SOAPport_type_Tie.preHandlingHook(SOAPport_type_Tie.java:238)
        at
com.sun.xml.rpc.server.StreamingHandler.handle(StreamingHandler.java:102)
        at
com.sun.xml.rpc.server.http.JAXRPCServletDelegate.doPost(JAXRPCServletDelegate.java:443)
        at
com.sun.enterprise.webservice.JAXRPCServlet.doPost(JAXRPCServlet.java:50)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:767)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
        at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at
java.lang.reflect.Method.invoke(Method.java:585)
        at
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
        at
java.security.AccessController.doPrivileged(Native
Method)
        at
javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
        at
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
        at
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
        at
org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
        at
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
        at
java.security.AccessController.doPrivileged(Native
Method)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)

;(( wscompile or axis client is fine.

Bruno
--- Roderico Cruz <[hidden email]> wrote:

> Bruno,
> I wonder if the handler code itself is doing
> something to the SOAP
> message that makes the client call fail. Kindly
> comment out the code in
> the handleRequest method (except the return
> statement, of course) and
> test it with the XMLSpy client again. (Sorry I don't
> have XMLSpy).
> Rico
> Bruno Lotse wrote:
>
> >Thank you very much, Rico.
> >
> >Looking forward to a solution whenever it is
> available
> >to the interoperability problem.
> >
> >RE: Currently, Netbeans does not have a WSDL
> >validation tool.
> >
> >Perhaps it should be a great wish-list item for
> future
> >NetBeans releases and Sun Studio Creator. A client
> >would deliver his/her wsdl, you validate it in NB
> and
> >immediately aware whether client's service or a
> >client's call WS-I Basic Profile compliant or not.
> >
> >Cheers,
> >Bruno
> >
> >
> >--- Roderico Cruz <[hidden email]> wrote:
> >
> >  
> >
> >>Bruno,
> >>I've posted the interoperability problem in the
> >>jaxrpc forum
> >>([hidden email]). I'll let you know
> what
> >>I find out.
> >>Currently, Netbeans does not have a WSDL
> validation
> >>tool. I am not using
> >>any validation tool, I am on the lookout for a
> good
> >>one which should
> >>include Basic Profile compliance (to ensure
> >>interoperability).
> >>Rico
> >>
> >>Bruno Lotse wrote:
> >>
> >>    
> >>
> >>>Hi Rico:
> >>>Hm... namespaces again.
> >>>Removed tns prefix from operation name, rebuild
> the
> >>>server, deployed the service with a handler, test
> >>>      
> >>>
> >>it.
> >>    
> >>
> >>>WORKS! Thank you very much Rico for the tip.
> Great
> >>>job!!!
> >>>Then I went to another machine and created a
> >>>com.sun.rpc. client using wsdl from the server
> and
> >>>wscompile tool.
> >>>(See TestServiceClient.zip). Generated request
> >>>POST /Test/TestWS HTTP/1.1
> >>>
> >>>Content-Type: text/xml; charset=utf-8
> >>>Content-Length: 399
> >>>SOAPAction: ""
> >>>User-Agent: Java/1.4.2_05
> >>>Host: 127.0.0.1:8080
> >>>Accept: text/html, image/gif, image/jpeg, *;
> q=.2,
> >>>*/*; q=.2
> >>>Connection: keep-alive
> >>>
> >>><?xml version="1.0" encoding="UTF-8"?>
> >>>  <env:Envelope
> >>>      
> >>>
>
>>xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
> >>    
> >>
> >>>xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> >>>      
> >>>
>
>>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >>
>
>>xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/"
> >>    
> >>
> >>>xmlns:ns0="http://my.new.webservice/namespace">
> >>>     <env:Body>
> >>>        <ns0:myOperation>
> >>>           <input>BRUNO</input>
> >>>        </ns0:myOperation>
> >>>     </env:Body>
> >>>  </env:Envelope>
> >>>
> >>>Hop! I've got a proper response. Nothing broken.
> >>>      
> >>>
> >>Stuff
> >>    
> >>
> >>>is working!
> >>>
> >>>
> >>>Then I tried another thing. We are talking about
> >>>      
> >>>
> >>web
> >>    
> >>
> >>>service and therefore interoperability between
> >>>      
> >>>
> >>system.
> >>    
> >>
> >>>So I generated SOAP request to my server from
> >>>      
> >>>
> >>XMLSpy
> >>    
> >>
> >>>Enterprise v.5.
> >>>Request
> >>>
> >>>POST /Test/TestWS HTTP/1.1
> >>>Content-Type: text/xml
> >>>User-Agent: XML Spy
> >>>SOAPAction: ""
> >>>Host: 127.0.0.1:8080
> >>>Content-Length: 416
> >>>Connection: Keep-Alive
> >>>Cache-Control: no-cache
> >>>
> >>><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/2001/XMLSchema-instance"
> >>    
> >>
> >>>xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> >>>   <SOAP-ENV:Body>
> >>>       <m:myOperation
> >>>xmlns:m="http://my.new.webservice/namespace">
> >>>           <input>Bruno</input>
> >>>       </m:myOperation>
> >>>   </SOAP-ENV:Body>
> >>></SOAP-ENV:Envelope>
> >>>
> >>>Boom! I've got a fault
> >>><env:Envelope
> >>>      
> >>>
>
>>xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
> >>
>
>>xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/"
> >>    
> >>
> >>>xmlns:ns0="http://my.new.webservice/namespace"
> >>>xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> >>>      
> >>>
>
>>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> >>    
> >>
> >>>   <env:Body>
> >>>       <env:Fault>
> >>>           <faultcode>env:Server</faultcode>
> >>>           <faultstring>JAXRPC.TIE.04: Internal
> >>>Server Error (JAXRPCTIE01: caught exception while
> >>>handling request: java.lang.ClassCastException:
> >>>      
> >>>
>
>>com.sun.xml.messaging.saaj.soap.impl.TextImpl)</faultstring>
> >>    
> >>
> >>>       </env:Fault>
> >>>   </env:Body>
> >>></env:Envelope>
> >>>
> >>>Checked out the server log -
> ClassCastException!!!
>
=== message truncated ===



       

       
               
__________________________________________________________
Find your next car at http://autos.yahoo.ca
Reply | Threaded
Open this post in threaded view
|

Re: Is it me, NB 4.1, or sun.xml.rpc... again?

Bruno Lotse
In reply to this post by Petr Blaha
Thanks Petr.

WSDL WS-I Basic Profile compliance tool would be a
great addition to the IDE.

Cheers,
Bruno

--- Petr Blaha <[hidden email]> wrote:

> Hi,
> thanks for good idea. I filed new RFE, see
> http://www.netbeans.org/issues/show_bug.cgi?id=63088
>
> Petr
>
> Roderico Cruz wrote:
> > Yes, we should include this (if it is not already)
> in the Netbeans wish
> > list.
> > Rico
> >
> > Bruno Lotse wrote:
> >
> >>
> >> RE: Currently, Netbeans does not have a WSDL
> >> validation tool.
> >>
> >> Perhaps it should be a great wish-list item for
> future
> >> NetBeans releases and Sun Studio Creator. A
> client
> >> would deliver his/her wsdl, you validate it in NB
> and
> >> immediately aware whether client's service or a
> >> client's call WS-I Basic Profile compliant or
> not.
> >>
> >> Cheers,
> >> Bruno
> >>
> >>
> >>
> >>  
> >>
> >
> >
>


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 
Reply | Threaded
Open this post in threaded view
|

Re: Is it me, NB 4.1, or sun.xml.rpc... again?

Bruno Lotse
In reply to this post by Bruno Lotse
RE: Doug Kohlert wrote:

> I have not heard of this problem.  If they remove
the Handlers, does
> the test still fail?  If not, then the handlers
might be doing
> something to the message to cause the problem.
>

OK. If I remove the handler from the service, then the
test succeeds. I am sending request from XML Spy and
receiving proper response.

Handler, handler... Yet I need the handler thing.

Cheers,
Bruno



--- Bruno Lotse <[hidden email]> wrote:

> Sure thing, Rico.
>
> Commented out the handleRequest body.
> Now it looks this way
>
> public boolean handleRequest(MessageContext context)
> {
>         System.out.println("handleRequest()
> called");
>         /*
>         try{
>             SOAPMessageContext smc =
> (SOAPMessageContext) context;
>             SOAPMessage msg = smc.getMessage();
>             SOAPPart sp = msg.getSOAPPart();
>             SOAPEnvelope se = sp.getEnvelope();
>             SOAPHeader shd = se.getHeader();
>            
>             SOAPBody sb = se.getBody();
>             java.util.Iterator childElems =
> sb.getChildElements();
>             SOAPElement child;
>             StringBuffer message = new
> StringBuffer();
>             while (childElems.hasNext()) {
>                 child = (SOAPElement)
> childElems.next();
>                 message.append(new Date().toString()
> +
> "--");
>                 formLogMessage(child, message);
>             }
>            
>             System.out.println("Log message from
> server: " + message.toString());
>         } catch(Exception e){
>             e.printStackTrace();
>         }
>          */
>         return true;
>     }
>
> Sending the same XML Spy http requst. And I am
> getting
> this
>
>
[#|2005-08-25T12:22:53.857-0400|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.container.web|_ThreadID=14;|WEB0100:
> Loading web module [Test] in virtual server [server]
> at [/Test]|#]
>
[#|2005-08-25T12:22:53.924-0400|INFO|sun-appserver-pe8.1_02|javax.enterprise.resource.webservices.rpc.server.http|_ThreadID=14;|JAXRPCSERVLET14:
> JAX-RPC servlet initializing|#]
>
[#|2005-08-25T12:22:54.057-0400|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.tools.admin|_ThreadID=14;|ADM1042:Status
> of dynamic reconfiguration event
> processing:[success]|#]
>
[#|2005-08-25T12:23:16.452-0400|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.tools.deployment|_ThreadID=16;|DPL5306:Servlet
> Web Service Endpoint [TestWS] listening at address
> [http://fedora:8080/Test/TestWS]|#]
>
[#|2005-08-25T12:23:16.988-0400|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.tools.deployment|_ThreadID=16;|DPL5306:Servlet
> Web Service Endpoint [TestWS] listening at address
> [http://fedora:8080/Test/TestWS]|#]
>
[#|2005-08-25T12:23:41.128-0400|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=17;|handleRequest()

> called|#]
>
> //
> // OK. we are through the empty handleRequest.
> Nothing
> added, none removed - BL
> //
>
>
>
[#|2005-08-25T12:24:32.104-0400|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.tools.deployment|_ThreadID=18;|DPL5306:Servlet
> Web Service Endpoint [TestWS] listening at address
> [http://fedora:8080/Test/TestWS]|#]
>
[#|2005-08-25T12:24:49.023-0400|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.tools.deployment|_ThreadID=19;|DPL5306:Servlet
> Web Service Endpoint [TestWS] listening at address
> [http://fedora:8080/Test/TestWS]|#]
>
[#|2005-08-25T12:25:03.388-0400|WARNING|sun-appserver-pe8.1_02|javax.enterprise.system.container.web|_ThreadID=20;|preWebHandlerError
> java.lang.ClassCastException:
> com.sun.xml.messaging.saaj.soap.impl.TextImpl
>         at
>
com.sun.xml.rpc.server.StreamingHandler.getOpcodeForRequestMessage(StreamingHandler.java:628)
>         at
>
com.sun.enterprise.webservice.WsUtil.getInvMethod(WsUtil.java:943)
>         at
>
com.sun.enterprise.webservice.ServletPreHandler.handleRequest(ServletPreHandler.java:55)
>         at
>
com.sun.xml.rpc.client.HandlerChainImpl.handleRequest(HandlerChainImpl.java:86)
>         at
>
com.sun.xml.rpc.server.StreamingHandler.callRequestHandlers(StreamingHandler.java:918)
>         at
>
com.sun.xml.rpc.server.StreamingHandler.preHandlingHook(StreamingHandler.java:831)
>         at
>
com.bruno.net.SOAPport_type_Tie.preHandlingHook(SOAPport_type_Tie.java:238)
>         at
>
com.sun.xml.rpc.server.StreamingHandler.handle(StreamingHandler.java:102)
>         at
>
com.sun.xml.rpc.server.http.JAXRPCServletDelegate.doPost(JAXRPCServletDelegate.java:443)
>         at
>
com.sun.enterprise.webservice.JAXRPCServlet.doPost(JAXRPCServlet.java:50)
>         at
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:767)
>         at
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
>         at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at
> java.lang.reflect.Method.invoke(Method.java:585)
>         at
>
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
>         at
> java.security.AccessController.doPrivileged(Native
> Method)
>         at
>
javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
>         at
>
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
>         at
>
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
>         at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
>         at
>
org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
>         at
>
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
>         at
> java.security.AccessController.doPrivileged(Native
> Method)
>         at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
>         at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
>         at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
>         at
>
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
>         at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
>         at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
>         at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
>         at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
>         at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)
>         at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
>         at
>
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
>         at
>
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:185)
>         at
>
com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:653)
>         at
>
com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:534)
>         at
>
com.sun.enterprise.web.connector.grizzly.ProcessorTask.doTask(ProcessorTask.java:403)
>         at
>
com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:55)
> |#]
>
[#|2005-08-25T12:25:03.391-0400|SEVERE|sun-appserver-pe8.1_02|com.sun.xml.rpc.server|_ThreadID=20;|com.sun.xml.messaging.saaj.soap.impl.TextImpl
> java.lang.ClassCastException:
> com.sun.xml.messaging.saaj.soap.impl.TextImpl
>         at
>
com.sun.enterprise.webservice.WsUtil.throwSOAPFaultException(WsUtil.java:972)
>         at
>
com.sun.enterprise.webservice.ServletPreHandler.handleRequest(ServletPreHandler.java:68)
>         at
>
com.sun.xml.rpc.client.HandlerChainImpl.handleRequest(HandlerChainImpl.java:86)
>         at
>
com.sun.xml.rpc.server.StreamingHandler.callRequestHandlers(StreamingHandler.java:918)
>         at
>
com.sun.xml.rpc.server.StreamingHandler.preHandlingHook(StreamingHandler.java:831)
>         at
>
com.bruno.net.SOAPport_type_Tie.preHandlingHook(SOAPport_type_Tie.java:238)
>         at
>
com.sun.xml.rpc.server.StreamingHandler.handle(StreamingHandler.java:102)
>         at
>
com.sun.xml.rpc.server.http.JAXRPCServletDelegate.doPost(JAXRPCServletDelegate.java:443)
>         at
>
com.sun.enterprise.webservice.JAXRPCServlet.doPost(JAXRPCServlet.java:50)
>         at
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:767)
>         at
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
>         at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at
> java.lang.reflect.Method.invoke(Method.java:585)
>         at
>
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
>
=== message truncated ===



       

       
               
__________________________________________________________
Find your next car at http://autos.yahoo.ca